Skip to content

Keep local pins collapsed when revealing a remote workspace - #25836

Merged
nwparker merged 2 commits into
mainfrom
nwparker/active-workspace-remote-pin-reveal-bug-eye-pinching-hand
Oct 6, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/active-workspace-remote-pin-reveal-bug-eye-pinching-hand

Conversation

@nwparker

@nwparker nwparker commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​217 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​217
Prod 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​112 $\color{#cf222e}{\Huge{\mathbf{−}}}$​32 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​80

ELI5

Revealing a pinned remote workspace now opens only its host's Pinned section. Local pins stay collapsed.

What Changed

Local and remote Pinned headers previously shared the same saved collapse key, so revealing a remote workspace expanded both sections. Host-specific Pinned headers now use independent collapse keys. The sidebar applies those keys after separating rows by host, and reveal and the agent-send picker use the target workspace's host key. Clicking a Pinned header follows the same rule.

The existing local collapse preference and the combined Projects view keep their existing keys.

Why

Reveal must open the section containing the selected workspace while preserving the user's choices elsewhere. Independent keys reuse the existing saved collapse state; merely skipping the local toggle would leave a collapsed remote workspace hidden.

Linked Issue

User-reported reproduction; no existing issue was linked.

Visual Proof

Same selected remote workspace immediately after clicking Reveal active workspace, captured from hidden Electron renderers using the visual-proof skill. The original build expands local pins; the fixed build keeps them collapsed.

Before After
before-fix.png fixed-after.png

Testing

  • Rendered UI exercised locally via Playwright CDP and screenshots inspected
  • Automated regression tests added

Local checks passed:

  • pnpm tc and pnpm run check:code-quality:changed (zero new findings).
  • 74 focused unit tests covering pinned section ownership, grouping, host sections, and reveal requests.
  • Electron E2E build with --mode e2e.
  • Seven rendered reveal tests, including the existing filter, virtual scrolling, and folder-workspace cases.
  • All four new remote reveal cases repeated three times: 12/12 passed. Each also checks that revealing local pins preserves a collapsed remote section.
  • The same regression test fails on the original build because the local Pinned header expands.

Run the rendered regression with:

ORCA_BACKGROUND_LAUNCH=1 SKIP_BUILD=1 pnpm exec playwright test tests/e2e/worktree-reveal-host-pinned.spec.ts --config tests/playwright.config.ts --project electron-headless --workers=1 --repeat-each=3

Validation ran on macOS with hidden Electron windows and seeded connected SSH / paired-runtime catalogs, including collapsed remote host headers. Live remote transport and native Linux/Windows execution were not exercised. The optional repository-wide E2E typecheck reports unrelated existing-file / missing cloud dependency errors; there are no diagnostics in the changed files.

Review

Self-reviewed host ownership, header clicks, reveal retries, saved local collapse state, and unchanged folder-workspace reveal behavior.

Agent skill upstream boundary

  • Not applicable; no upstream skill source or artifacts copied.

Notes

Renderer presentation change only. No remote protocol, execution routing, filesystem path, keyboard shortcut, or mobile changes. Existing unscoped saved keys remain readable.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Before/after screenshots attached
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered
  • Full repository lint, tests, and release build left to CI; targeted local checks above pass

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 20a8c4f9-0257-443c-adb4-82573de787de
📥 Commits

Reviewing files that changed from the base of the PR and between 59b533c and 386d9c4.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 472567c6-e961-4734-8597-0d49cc75a7cf
📥 Commits

Reviewing files that changed from the base of the PR and between 13ea359 and 59b533c.

📒 Files selected for processing (10)
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/components/sidebar/host-pinned-sections.test.ts
  • src/renderer/src/components/sidebar/host-pinned-sections.ts
  • src/renderer/src/components/sidebar/worktree-list/grouping/row-types.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-collapsed-groups.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-section-rows.ts
  • src/renderer/src/components/sidebar/worktree-list/navigation/pending-reveal-inputs.ts
  • src/renderer/src/components/sidebar/worktree-list/navigation/reveal-ancestors.ts
  • src/renderer/src/components/sidebar/worktree-list/rows/SectionHeader.tsx
  • tests/e2e/worktree-reveal-host-pinned.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Host-scoped sidebar views now collapse pinned worktrees independently by host. Section headers use their configured collapse keys for state lookup and toggling. Worktree reveal logic uses the target host’s pinned group key when applicable. Tests cover row scoping and revealing local and remote pinned worktrees on SSH and runtime hosts.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 59b53

Host-specific Pinned collapse and reveal use matching keys in the inspected views; no issue requiring a fix before merge was established.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 10 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: revealing a remote workspace keeps local pinned sections collapsed.
Description check ✅ Passed The description covers the user-facing behavior, implementation, rationale, visual proof, testing, and compatibility notes. It states that no issue is linked; the template requires an actual issue lin…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • 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.

…pace-remote-pin-reveal-bug-eye-pinching-hand
@nwparker
nwparker merged commit d9cf07d into main Oct 6, 2026
36 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.

1 participant