Skip to content

Make sidebar worktree hover title editable - #7307

Merged
nwparker merged 3 commits into
mainfrom
hover-tiltle-v2
Jul 4, 2026
Merged

nwparker merged 3 commits into
mainfrom
hover-tiltle-v2

Conversation

@nwparker

@nwparker nwparker commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Makes the worktree card hover title editable in the sidebar. Hovering a worktree card now surfaces an inline rename field in the hovercard identity header, with the cursor-flicker and field-polish issues resolved.

Changes

  • Add WorktreeCardHoverIdentityHeader with an inline-editable title
  • Wire the editable title into WorktreeCard / WorktreeCardMeta
  • Polish the inline rename field (WorktreeTitleInlineRename) and fix a cursor flicker on hover

Tests

  • WorktreeCardMeta.test.tsx and WorktreeCardMeta.interaction.test.tsx cover the rename field and interaction behavior

Commits

  • fix(sidebar): make hover title editable
  • polish hovercard title rename field
  • fix hovercard title cursor flicker

Made with Orca 🐋

@nwparker
nwparker merged commit c29ee51 into main Jul 4, 2026
2 checks passed
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 896fc032-b1fb-4384-a3da-7df580fd70c3

📥 Commits

Reviewing files that changed from the base of the PR and between e4ac582 and 8def5f7.

📒 Files selected for processing (7)
  • src/renderer/src/components/sidebar/WorktreeCard.tsx
  • src/renderer/src/components/sidebar/WorktreeCardHoverIdentityHeader.tsx
  • src/renderer/src/components/sidebar/WorktreeCardMeta.interaction.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCardMeta.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCardMeta.tsx
  • src/renderer/src/components/sidebar/WorktreeTitleInlineRename.tsx
  • src/renderer/src/components/sidebar/worktree-card-meta-types.ts

📝 Walkthrough

Walkthrough

This PR adds inline workspace-title renaming support to the worktree hover card. A new WorktreeCardHoverIdentityHeader component renders branch/workspace identity with optional inline rename. WorktreeCardDetailsHoverProps gains rename-related props, and WorktreeCardMeta.tsx tracks editing state to keep the hover card open and defer closing while a rename is in progress. WorktreeCard.tsx wires the new props based on deletion/affiliate-list state. WorktreeTitleInlineRename gains editingPresentation and wrapTitle options affecting styling and tooltip behavior. New and updated tests cover markup and interaction behavior.

Changes

Cohort / File(s) Summary
Types Extended WorktreeCardDetailsHoverProps with rename-disabled flag and rename/editing callbacks
New component Added WorktreeCardHoverIdentityHeader for branch/workspace identity rendering with inline rename
Inline rename Added editingPresentation and wrapTitle props, computed classnames, spellcheck disable, tooltip/truncation changes
Hover lifecycle WorktreeCardMeta.tsx tracks editing state, defers hover close, delegates identity rendering
Wiring WorktreeCard.tsx passes rename props based on delete/affiliate-list state
Tests Added/updated tests for markup and interaction (hover-open-during-edit, escape-to-close)

Sequence Diagram(s)

See hidden diagram for the hover-open-during-edit interaction flow.

Related PRs: None specified.

Suggested labels: enhancement, ui, sidebar

Suggested reviewers: None specified.

🚀

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

nwparker added a commit that referenced this pull request Jul 4, 2026
…fix garbled comments (#7322)

Quality pass on renderer/shared PRs merged 2026-07-03:

- WorktreeTitleInlineRename: skip the truncation measure + ResizeObserver in `wrapTitle`
  mode, where wrapped titles never truncate — it could only churn unused state (#7307).
- editor slice: reuse the `removeEditorStateForReplacedPreview` helper this PR added
  instead of a hand-rolled copy of the same six-field eviction (drops ~50 lines) (#6476).
- useFileExplorerTree: extract `readWorktreeDirectory` so the connectionId/settings
  assembly for `readRuntimeDirectory` lives in one place, not three (#6321).
- comment-markdown-github-attachment-media: extract a shared `AttachmentFallbackLink`
  for the image/video error-fallback link (#6759).
- repository-icon-github: fold the two near-identical live resolvers into one
  parameterized `resolveRepositoryIdentityLive`; trim a 3-line comment to 2 (#6507).
- resource-usage-open-slices: delete the `shouldReadPopoverSlices` identity wrapper and
  inline `open` at the four call sites (#7275).
- BrowserPane: drop the pointerEvents assignment already applied inside
  `ensureBrowserPageWebview` for the reused-webview path (#6958).
- github slice: fix two garbled "…a commit main confirmed…" comments (#7277).
- runtime-file-client: trim the binary-file fallback comment to its whys (#6606).
- composer-branch-selection: drop the inline comment that restated the JSDoc (#6748).
- TabBarQuickCommandsButton: correct the stale "+ Command" comment (button shows no +).

No behavior change (the editor-helper reuse is behavior-equivalent, only more
conservative on an edge case); typecheck, oxlint, react-doctor, oxfmt, and touched
unit suites all pass.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…fix garbled comments (stablyai#7322)

Quality pass on renderer/shared PRs merged 2026-07-03:

- WorktreeTitleInlineRename: skip the truncation measure + ResizeObserver in `wrapTitle`
  mode, where wrapped titles never truncate — it could only churn unused state (stablyai#7307).
- editor slice: reuse the `removeEditorStateForReplacedPreview` helper this PR added
  instead of a hand-rolled copy of the same six-field eviction (drops ~50 lines) (stablyai#6476).
- useFileExplorerTree: extract `readWorktreeDirectory` so the connectionId/settings
  assembly for `readRuntimeDirectory` lives in one place, not three (stablyai#6321).
- comment-markdown-github-attachment-media: extract a shared `AttachmentFallbackLink`
  for the image/video error-fallback link (stablyai#6759).
- repository-icon-github: fold the two near-identical live resolvers into one
  parameterized `resolveRepositoryIdentityLive`; trim a 3-line comment to 2 (stablyai#6507).
- resource-usage-open-slices: delete the `shouldReadPopoverSlices` identity wrapper and
  inline `open` at the four call sites (stablyai#7275).
- BrowserPane: drop the pointerEvents assignment already applied inside
  `ensureBrowserPageWebview` for the reused-webview path (stablyai#6958).
- github slice: fix two garbled "…a commit main confirmed…" comments (stablyai#7277).
- runtime-file-client: trim the binary-file fallback comment to its whys (stablyai#6606).
- composer-branch-selection: drop the inline comment that restated the JSDoc (stablyai#6748).
- TabBarQuickCommandsButton: correct the stale "+ Command" comment (button shows no +).

No behavior change (the editor-helper reuse is behavior-equivalent, only more
conservative on an edge case); typecheck, oxlint, react-doctor, oxfmt, and touched
unit suites all pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant