refactor(penpal): clean up ERD requirements that parrot PRODUCT.md - #527
Conversation
Rewrite ERD requirements to specify implementation details (components, state, CSS, APIs) rather than restating user-facing behavior. Closes PENPAL-18 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8b1b6339c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ← [P-PENPAL-PROJECT-BREADCRUMB](PRODUCT.md#P-PENPAL-PROJECT-BREADCRUMB), [P-PENPAL-AGENT-PRESENCE](PRODUCT.md#P-PENPAL-AGENT-PRESENCE) | ||
|
|
||
| - <a id="E-PENPAL-WORKTREE-DROPDOWN"></a>**E-PENPAL-WORKTREE-DROPDOWN**: When the active project has multiple worktrees, a dropdown in the breadcrumb bar shows "main repo" for the main worktree or a worktree icon + name for non-main worktrees. Clicking opens a menu listing all worktrees; selecting one navigates to that worktree's view. Single-worktree projects show dimmed static text "no worktrees". State: `showWorktreeDropdown`. | ||
| - <a id="E-PENPAL-WORKTREE-DROPDOWN"></a>**E-PENPAL-WORKTREE-DROPDOWN**: Rendered in `Layout.tsx` breadcrumb bar as a `.worktree-dropdown` div with `worktreeDropdownRef` for click-outside dismiss (via `mousedown` document listener). The `::after` pseudo-element renders a `▾` indicator. The `.worktree-dropdown-menu` is absolutely positioned, right-aligned. Each worktree button shows `active` class for the current selection; selecting a worktree navigates to `/project/{qn}@{worktreeName}`. Single-worktree projects render a static `.worktree-label` span instead (no ref, no click handler). State: `showWorktreeDropdown` boolean, toggled on click. |
There was a problem hiding this comment.
Describe main worktree route separately in dropdown spec
This ERD line says selecting a worktree navigates to /project/{qn}@{worktreeName}, but the implementation in Layout.tsx uses /project/{qualifiedName} for the main repo and only adds @{worktree} for non-main entries. That mismatch can mislead future tests/docs to assert the wrong URL when users pick “main repo”, so the requirement should explicitly document both route forms.
Useful? React with 👍 / 👎.
Summary
Closes https://linear.app/squareup/issue/PENPAL-18
🤖 Generated with Claude Code