Skip to content

Keep remote folder sidebar rows distinct across execution hosts - #26634

Merged
OrcaWin merged 1 commit into
mainfrom
nwparker/remote-folder-row-identity
Oct 9, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
nwparker/remote-folder-row-identity

Conversation

@nwparker

@nwparker nwparker commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​136 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​134
Prod 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​92 $\color{#cf222e}{\Huge{\mathbf{−}}}$​27 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​65

ELI5

Two remote machines can have folders with the same ID. Selecting one now highlights that machine's folder and gives its row a distinct identity for keyboard navigation and rendering.

What Changed

Before, folder rows compared only the folder ID for active styling and used that same unqualified ID for activation, DOM IDs and virtual rows. A real A→B click left the accessibility marker on A while the explorer correctly displayed B; other captures highlighted both rows. Both rows also had identical DOM and virtual keys.

Folder rows now carry the existing host-qualified worktree identity through active-state checks, immediate activation, DOM IDs, virtual keys and navigation. The synthetic-folder host projection also supplies the row identity without building another ownership resolver. Reveal lookup accepts qualified keys and checks the requested host; legacy bare folder-ID reveal matching remains supported.

Why

Git worktree rows already use host-qualified identity. Applying that same identity consistently to folder rows fixes both the immediate click and subsequent rendering, instead of patching only the highlight while leaving duplicate keys and accessibility pointers.

Linked Issue

Found during SSH → Remote consolidation testing; no existing issue.

Visual Proof

Two valid, independently converted Linux SSH hosts publish the same folder ID and path. The untouched parent displays the new host's files but marks the wrong row or both rows active; runtime logs show duplicate DOM and virtual keys. Corrected screenshots highlight only the selected host, and the test verifies its active marker, unique keys and listbox pointer.

folder-row-identity-a-to-b-before-final.png
folder-row-identity-a-to-b-after-final.png
folder-row-identity-b-to-a-before-final.png
folder-row-identity-b-to-a-after-final.png
folder-row-identity-runtime-red-final.log
folder-row-identity-runtime-green-final.log

Testing

  • Hidden macOS Electron client, two owned Linux Docker SSH hosts and the installed production server template.
  • Checked rendering, navigation, row-identity and qualified-reveal regressions; local/legacy SSH host controls and dedicated Docker CI routing updated.

Identical final baseline fails A→B in 31.1 s and B→A in 20.0 s. Fresh corrected cases pass in 20.9 / 20.6 s (43.4 s total), including root/nested ownership, actual sidebar clicks, row identities/accessibility, host file creation/deletion, shared events, switching back and hide/reopen.

Five initial regressions fail before the row fix; two additional qualified-reveal regressions fail on the unchanged reveal lookup. All 215 tests / 18 files pass afterward. Full pnpm tc, pnpm lint, changed quality, standalone React Doctor, fresh E2E build and commit hooks pass.

Combined stack verification: C18–C21 rebased on #26637/#26645 preserves their renderer changes exactly. 547 tests / 49 files, full typecheck/lint, changed quality (including React Doctor/design-system checks), a fresh E2E build and both real-host switch directions pass. CI reruns on the new head; prior green results are not claimed for it.

Review

Now based directly on main (no longer stacked). The renderer change has no dependency on #26637/#26645/#26616/#26627/#26632, so it was rebased alone onto main. The real-host E2E assertions lived in tests/e2e/ssh-orcad-explorer-selected-host.spec.ts, which #26616 introduces; they were dropped here along with the matching CI routing entries and can be folded into that spec once it lands. Unit coverage (row identity, active marker, listbox pointer, qualified reveal) remains. The product change concerns folder-row presentation and navigation; it does not change host execution or server lifecycle.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source or resources copied.

Notes

No server or remote wire change. Actual runtime coverage is macOS client / Linux SSH hosts; Windows was not exercised. All host writes target disposable fixtures. The previous head was fully green (24 successes / 22 conditional skips). The new head includes the exercised startup fixes #26637/#26645, addressing the parent CI's canceled-start race and premature idle-record observation. The original failure receipts remain recorded; CI will rerun on the rebased head.

Checklist

  • Focused change
  • ELI5, user-facing before/after, mechanism and approach explained
  • Both before/after screenshot pairs and runtime logs attached
  • Self-reviewed for correctness, security and performance
  • Cross-platform, SSH, folder workspaces, paths and compatibility considered
  • Local lint, typechecks, affected tests and fresh build pass

@nwparker
nwparker force-pushed the nwparker/remote-folder-row-identity branch from f7c2505 to b7613ca Compare October 8, 2026 18:56
@nwparker
nwparker force-pushed the nwparker/remote-watcher-selected-host branch from 70bf530 to 61f4d6c Compare October 8, 2026 18:56
Folder rows used the bare folder ID for active state, DOM IDs, virtual keys
and activation, so same-ID folders on two hosts collided. Use the existing
host-qualified worktree identity, matching git worktree rows.
@OrcaWin
OrcaWin force-pushed the nwparker/remote-folder-row-identity branch from b7613ca to 09577cc Compare October 9, 2026 02:27
@OrcaWin
OrcaWin changed the base branch from nwparker/remote-watcher-selected-host to main October 9, 2026 02:27
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 61356992-0898-4151-97a5-a429f9b63635
📥 Commits

Reviewing files that changed from the base of the PR and between d191386 and 09577cc.

📒 Files selected for processing (11)
  • src/renderer/src/components/sidebar/WorktreeList.folder-workspace-rows.test.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/render-row.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-section-rows.ts
  • src/renderer/src/components/sidebar/worktree-list/navigation/active-descendant-option.ts
  • src/renderer/src/components/sidebar/worktree-list/navigation/folder-reveal.ts
  • src/renderer/src/components/sidebar/worktree-list/navigation/folder-row-host-identity.test.ts
  • src/renderer/src/components/sidebar/worktree-list/navigation/render-row-lookup.ts
  • src/renderer/src/components/sidebar/worktree-list/rows/folder-row.tsx
  • src/renderer/src/components/sidebar/worktree-list/viewport/virtual-row-context.ts
  • src/shared/folder-workspace-worktree.test.ts
  • src/shared/folder-workspace-worktree.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@OrcaWin OrcaWin closed this Oct 9, 2026
@OrcaWin OrcaWin reopened this Oct 9, 2026
@OrcaWin
OrcaWin merged commit 4e232f9 into main Oct 9, 2026
33 checks passed
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.

2 participants