Skip to content

Fix send picker reveal under collapsed hosts and parents - #25950

Merged
nwparker merged 2 commits into
mainfrom
nwparker/sidebar-agent-picker-reveal
Oct 6, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/sidebar-agent-picker-reveal

Conversation

@nwparker

@nwparker nwparker commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Opening Send notes should make the receiving agent visible, even when its workspace is inside a collapsed host or parent. Closing the picker should put the sidebar back as it was.

What Changed

The picker previously opened section headings but left host headings closed, and it removed parent keys without the host prefix used by the rendered rows. Normal Reveal and the picker now share the existing ancestor-resolution logic: execution host, every parent, and the owning section. The picker applies that result to a temporary copy of the saved collapse set. Parent lookup uses the full host-scoped catalog, while pinned membership still follows the visible catalog.

Why

Fixing only the missing host key would leave nested workspaces hidden. Sharing the resolver fixes both causes and keeps normal Reveal and picker disclosure consistent, without changing saved preferences to compensate for the picker.

Linked Issue

Internal follow-up to #25836. Follow-up to #25944, which supplies the host-owned section keys on main.

Visual Proof

Both builds start with the same collapsed ancestor and use the actual Send notes to an agent button. These screenshots show the sidebar after opening the picker. Before: the receiving workspace remains hidden. After: its host or parent opens and the eligible Claude row is outlined. The unrelated host stays visible.

Hidden by Before fix After fix
Collapsed SSH host Host before Host after
Collapsed local parent Parent before Parent after

Testing

  • Hidden Electron on macOS: all four local/SSH host/parent cases pass three consecutive runs (12 checks), using the real Send notes button. Each check verifies the eligible agent is rendered, Escape hides the workspace again, and both in-memory and persisted collapse preferences are unchanged.
  • Six regression tests cover local, SSH, and paired runtime hosts, nested parents omitted by a filter, section ownership, unrelated host keys, pinned membership, and restoration of the original set on close.
  • Full sidebar suite on the updated main base: 330 files, 2,896 tests pass.
  • Full pnpm tc, full oxlint, changed-code quality gate, and Electron e2e build pass on the repaired main base.
  • Full PR CI passed on the rebased head: all five unit shards, relay integration, all four rendered picker cases on Linux, Linux/Windows packaging and final verification gates.
  • The baseline build fails both rendered host/parent regressions. Remote catalogs, terminal handles, and agent status are seeded; no message is sent. This verifies actual rendered disclosure, not live SSH transport or a live paired-runtime agent. Paired-runtime picker coverage is in the regression tests; normal Reveal has rendered coverage in Keep sidebar section collapse independent across execution hosts #25944.

Review

The shared resolver retains folder-workspace handling, combined grouping, pinned policy, and qualified parent identities. The picker only changes presentation while open. No status producer, process control, wire format, paths, shortcuts, or styling changed.

Agent skill upstream boundary

  • Not applicable; no upstream skill source copied.

Checklist

  • Focused root cause fix; before/after, mechanism, and choice explained.
  • Before/after rendered proof attached using the requested visual-proof skill.
  • Self-reviewed, including remote hosts, folder workspaces, filtered parents, and saved preferences.
  • Local typecheck, lint, tests, e2e build and full PR CI passed.

@nwparker
nwparker changed the base branch from nwparker/sidebar-host-section-collapse to main October 6, 2026 20:12
@nwparker
nwparker force-pushed the nwparker/sidebar-agent-picker-reveal branch from 737817c to 9ed4a61 Compare October 6, 2026 20:12
@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: 0b30c727-01b7-42a7-9b8f-0c1440d7f02b
📥 Commits

Reviewing files that changed from the base of the PR and between 9ed4a61cbd8ef9ebc16709194563a6393c58e8d0 and 207abb0.

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: 40ded8ab-beb2-4817-a538-c4e54fb11f75
📥 Commits

Reviewing files that changed from the base of the PR and between ac8ea9f and 9ed4a61cbd8ef9ebc16709194563a6393c58e8d0.

📒 Files selected for processing (6)
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/components/sidebar/agent-send-picker-collapse.test.tsx
  • src/renderer/src/components/sidebar/worktree-list/listing/use-collapsed-groups.ts
  • src/renderer/src/components/sidebar/worktree-list/navigation/pending-reveal-inputs.ts
  • src/renderer/src/components/sidebar/worktree-list/navigation/worktree-reveal-group-keys.ts
  • tests/e2e/agent-send-picker-reveal.spec.ts

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


📝 Walkthrough

Walkthrough

Worktree reveal logic now uses a shared helper to identify collapsed groups that hide a target. The effective collapsed-group hook receives all worktrees, and pending reveals use the same key-selection helper. Tests cover agent-send targets hidden by collapsed host or lineage groups and verify that collapse state is restored when the target is cleared.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 9ed4a

No actionable issue remains from this review; the PR is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 6 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 describes the main change: fixing Send notes picker disclosure for workspaces hidden under collapsed hosts or parents.
Description check ✅ Passed The description covers the user-facing change, cause, approach, linked follow-ups, visual proof, testing, review notes, and checklist. It is mostly complete; the optional Notes section is not included…
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 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • 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.

@nwparker
nwparker force-pushed the nwparker/sidebar-agent-picker-reveal branch from 9ed4a61 to 207abb0 Compare October 6, 2026 21:12
@nwparker
nwparker merged commit 28ed544 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