Skip to content

feat(sidebar): drop a lone Host's PC header, and let Settings hide the filter row - #2073

Merged
devswha merged 6 commits into
mainfrom
feat/sidebar-declutter
Oct 27, 2026
Merged

devswha merged 6 commits into
mainfrom
feat/sidebar-declutter

Conversation

@devswha

@devswha devswha commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

What it does for the user

Two small sidebar options from the owner's request.

1. One PC, no PC header. When the sidebar shows exactly one PC and it is the Host (the only PC, or every
other PC hidden on this device through Settings → Remote PCs → Show in sidebar, #1947), the PC's group
header row (name, Host tag, state dot, fold caret, +) is gone and its workspaces start the list. With two
or more PCs shown nothing changes.

Nothing the header offered is lost:

The header had Now
+ New workspace A New workspace row after the workspaces (left out while a filter is on, while the PC is offline, and when the empty No workspaces yet box already offers it). The shortcut and the palette's New workspace are unchanged.
Fold caret Not needed: one PC folded would leave an empty list with nothing to open it, so the group is never folded and a fold stored earlier (ovis:pc-collapsed:local) is ignored.
State dot Connected is the quiet default. Every other state already writes its words on a line of its own (Connecting…, Reconnecting…, Disconnected, Connection error with its detail and next step), and that line, the action notice and the error stay.
PC name, Host tag The group keeps aria-label="PC <name>". The filter no longer searches or suggests a name no row shows. When other PCs are hidden, the existing "1 PC hidden on this device" line under the list says so and opens the switches.
Manage panel (rename, reconnect, update, remove) The Host has none. A remote PC shown alone (Host hidden here) keeps its header, because its name says which PC this is and its manage panel has no other place.
Add PC Never in the header: it is in Settings → Remote PCs and the palette.

No setting turns this off: it is simply how one PC looks, since nothing is lost.

2. Settings → Appearance → Sidebar filter. On by default (shown, as today). Off, the Filter row
above the lists is gone on this device. Filtering stays reachable: the command palette's new
Filter workspaces and agents opens the drawer (phone) or the sidebar (desktop) and draws the field,
focused. It stays while it holds words, and goes on its Close filter (its X while empty), Escape in it
empty, the focus leaving the sidebar from it empty, or the phone's drawer closing. A press on a row keeps it,
so rows never move under the pointer. With the setting on, the same palette entry just focuses the field.
There was no keyboard shortcut for the filter before. The palette entry (Mod+Shift+K, then "filter") is
the way in, on a phone too. English, Korean, Japanese and Chinese strings are included.

Design: the Claude app lists its sessions with no heading for the computer they run on, and the Codex and
Claude apps keep search in the palette alone. Both are followed here only where nothing is lost. Their
New button sits at the top; here the + closes the list so the workspaces come first. DESIGN.md
(Sidebar roster row and footer) has the details.

Screenshots

Demo client. Each sheet shows the 1440 px sidebar in dark and light, then the 390 px phone drawer in dark
and light.

Lone Host (a fold stored for it beforehand is ignored):
lone host

The Host shown alone of two (Work PC hidden on this device):
host shown of two

Lone Host offline (its state words stay; no New workspace row):
lone host offline

Sidebar filter off:
filter off

Opened from the palette's Filter workspaces and agents, filtering:
filter from the palette

The setting:
settings desktop
settings phone

Stored format

sidebarFilter is a device setting kept in a key of its own, ovis:sidebar-filter (written by
saveSettings, read by loadSettings in src/lib/settings.ts), as ovis:mirror-wrap and ovis:ui-font
are. It is never inside ovis:settings, so an older tab's whole-record save cannot erase it
(settings.test.ts checks that against the pinned legacy writer). Older versions ignore the key. It goes
through no HTTP or WebSocket contract and no telemetry.

Browser scripts touched

The test session and the demo both have one PC, so three scripts that reached into its header move to the row:

  • ui-regression.ts: New workspace opens from the row. The block that folded the only PC now checks the
    lone Host has no header and has the row, and keeps its Agents-selection checks.
  • recent-folders-regression.ts: New workspace opens from the row.
  • sidebar-spacing-demo-regression.ts: rewrites the demo into two PCs (as hide-pc-demo-regression.ts
    does) and folds both. It also takes over the check that picking an agent of a folded PC keeps the fold.

New: sidebar-declutter-demo-regression.ts (added to the browser lane).

How it was verified

  • Regression, fails on main and passes here: scripts/sidebar-declutter-demo-regression.ts on origin/main
    (42bd1ef) fails at its first check: AssertionError: 1440-dark: a lone Host is drawn without its header
    (actual 1, expected 0). On this branch 20/20 pass: 5 scenarios × 1440/390 × dark/light.
  • Browser scripts on one fresh demo build of this branch, all exit 0: sidebar-declutter, sidebar-spacing,
    sidebar-filter, hide-pc, sidebar-machine-layout, sidebar-machine-removal, palette-machines.
    bun run check run --build (isolated herdr): ui-regression and recent-folders-regression: both pass (ui-regression 76 PASS lines, recent-folders 390/1440/1920 light and dark). These and the seven demo scripts ran on fd17f796c, just before the last change below. That change moved the palette request's state from App.tsx into src/lib/useSidebarLayout.ts (the App hook ceiling), and sidebar-declutter-demo-regression.ts passed again on the final commit.
  • Unit: settings.test.ts (default, own key, old-tab save, malformed key), sidebarFilter.test.ts (a
    headerless PC's name is neither searched nor suggested), i18n and conventions.
  • bun run check fast: passes on cb818dc (report status verified, source unchanged; unit 7674 pass, 0 fail).
  • The first two commits typecheck and pass their unit tests on their own. Screenshots were reviewed at 390 and 1440 px, light and dark.

Review fixes (f3b6cf6)

From the merge pass's review of cb818dc (omo and Codex):

  • M1, focus lost on dismissal: closing the field the palette opened (Escape in it empty, or Close filter) now
    gives the focus back to what had it when the field came, else to the list's first row, as useFocusReturn
    does. The Escape that closes it goes no further.
  • M2, an empty asked-for field survived leaving: a press outside the sidebar now closes it, as does the
    keyboard's focus leaving the sidebar from the field or any row. A press inside keeps it, also when the row
    it picks moves the focus to its pane.
  • L1: the lone Host's New workspace row also shows while its first roster loads, as the header's + did.
  • L2: turning the setting off while the field holds words keeps it as an asked-for field, so Clear no longer
    takes it from under the focus.
  • L3: sidebar-declutter-demo-regression.ts now checks Escape with words, the focus after each dismissal,
    that the closing Escape goes no further, that Tab into the list and a row press keep the field, and that a
    press outside takes it. On cb818dc it fails at "Close filter gives the focus back, not to the body". On
    f3b6cf6 it passes 20/20, and bun run check fast passes (unit 7674 pass, 0 fail).

devswha and others added 5 commits October 28, 2026 02:05
…wn key

sidebarFilter is a device setting, on by default, saved in ovis:sidebar-filter as
ovis:mirror-wrap and ovis:ui-font are, so an older tab's whole-record save of
ovis:settings cannot erase it. Telemetry does not carry it.

Co-authored-by: sisyphus-dev-ai <[email protected]>
When the sidebar shows one PC and it is the Host (the only PC, or the others
hidden on this device), its group header is not drawn and its workspaces start
the list. Nothing it held is lost: the state words, notice and error are lines
of their own; the group is never folded (a stored fold is ignored, since no caret
could open it); its + is a New workspace row after the workspaces; the PC name
stays the group's accessible name and is no longer searched or suggested by the
filter, as no row shows it. A lone PC that is not the Host keeps its header, for
its name and its manage panel. Two PCs or more are unchanged.

The test session and the demo have one PC: ui-regression.ts and
recent-folders-regression.ts open New workspace from the row, and
sidebar-spacing-demo-regression.ts folds two PCs, and now also checks that
picking an agent of a folded PC keeps the fold (moved from ui-regression.ts).

Co-authored-by: sisyphus-dev-ai <[email protected]>
… palette

Settings -> Appearance -> Sidebar filter (on by default) leaves the Filter row out
of the sidebar on this device. Filtering stays reachable: the command palette's
new Filter workspaces and agents opens the drawer or the sidebar and draws the
field, focused. It stays while it holds words and goes on its Close filter (the X
while empty), Escape in it empty, the focus leaving the sidebar from it empty (a
press on a row keeps it, so rows never move under the pointer) or the phone's
drawer closing. With the setting on, the same palette entry focuses the field.

"Filter workspaces and agents" moves to the base dictionaries, since the palette
and the sidebar both use it; new strings are in Korean, Japanese and Chinese.

Co-authored-by: sisyphus-dev-ai <[email protected]>
…er lane

sidebar-declutter-demo-regression.ts drives the demo client at 390 and 1440 px,
light and dark: a lone Host has no header, ignores a stored fold, keeps its state
words offline and opens New workspace from its row; the Host shown alone of two
does the same and names the hidden PC; a lone remote PC and two PCs keep their
headers; Sidebar filter off removes the row, the palette opens and focuses it,
and Settings turns it off and on. On origin/main it fails at its first check.

Co-authored-by: sisyphus-dev-ai <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

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 11 minutes.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 42bd1ef and f3b6cf6.

Files selected for processing: 30
  • DESIGN.md
  • changelog.d/sidebar-declutter.md
  • scripts/ci-browser.sh
  • scripts/recent-folders-regression.ts
  • scripts/session-history-fixture.tsx
  • scripts/sidebar-declutter-demo-regression.ts
  • scripts/sidebar-spacing-demo-regression.ts
  • scripts/ui-regression.ts
  • src/App.tsx
  • src/components/CommandPalette.tsx
  • src/components/MachineSidebar.tsx
  • src/components/Machines.css
  • src/components/SettingsDialog.tsx
  • src/lib/actions.ts
  • src/lib/i18n.ja.ts
  • src/lib/i18n.ko.ts
  • src/lib/i18n.zh.ts
  • src/lib/i18n/machines.ja.ts
  • src/lib/i18n/machines.ko.ts
  • src/lib/i18n/machines.zh.ts
  • src/lib/i18n/settings.ja.ts
  • src/lib/i18n/settings.ko.ts
  • src/lib/i18n/settings.zh.ts
  • src/lib/paletteSettings.ts
  • src/lib/settings.legacy-fixture.ts
  • src/lib/settings.test.ts
  • src/lib/settings.ts
  • src/lib/sidebarFilter.test.ts
  • src/lib/sidebarFilter.ts
  • src/lib/useSidebarLayout.ts
  • Autofix · 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.

… close it on leaving

Review findings on #2073 (merge pass, omo and Codex):

- M1: closing the field the palette opened (Escape in it empty, Close filter)
  unmounted the focused control and left the focus on the body, and the desktop
  Escape went on to the page. It now gives the focus back to what had it when
  the field came, else to the list's first row, as useFocusReturn does, and the
  Escape that closes it stops there.
- M2: only the input's blur closed an empty asked-for field, so Tab through
  Close filter into the list and out kept it, as did a press on something that
  takes no focus. A press outside the sidebar now closes it, as does the
  keyboard's focus leaving the sidebar from the field or any row; a press
  inside keeps it, also when the row it picks moves the focus to its pane.
- L1: the lone Host's New workspace row also shows while its first roster
  loads, as the header's + did.
- L2: turning the setting off while the field holds words keeps it as an
  asked-for field, so its clear no longer takes it from under the focus.
- L3: the browser regression checks Escape with words, the focus after each
  dismissal, that the closing Escape goes no further, and that Tab into the
  list and a row press keep the field while a press outside takes it.

Co-authored-by: sisyphus-dev-ai <[email protected]>
@devswha

devswha commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

Merge-pass review verdicts:

  • cb818dc, omo code reviewer: PASS. Its one MEDIUM: focus was lost when the palette-opened filter was dismissed.
  • cb818dc, Codex Sol: BLOCK on MEDIUMs only. The same focus loss, and an empty field that stayed open when focus left the sidebar. These were non-blocking for an owner PR.
  • Screenshots: the merge pass checked all 7 sheets (1440 px and 390 px, dark and light). PASS.
  • f3b6cf6: both MEDIUMs and the LOWs are fixed by the lane. The omo and Codex re-reviews of just this commit are running, and their verdicts follow here as soon as they land.

@devswha

devswha commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

f3b6cf6, Codex Sol (xhigh): MEDIUM and LOW only, no HIGH. Both are non-blocking for an owner PR after two fix rounds. They go into a follow-up issue at merge.

  • MEDIUM MachineSidebar.tsx:101: focus can still fall to <body>. Type words, open Settings, turn Sidebar filter off, dismiss Settings, then Clear and Close filter. The recorded opener (the Settings switch) is disconnected. The fallback skips the workspace selector (div role="button") and picks its More button, which is display: none on desktop. Fix: choose a visible, enabled, non-inert target, including the workspace selector, and check that focus actually moved.
  • LOW :138: a deferred blur can clear newer words. A queued null-relatedTarget frame closes the field even after words were typed and focus left again, and it stays queued after unmount. Fix: cancel the pending frame, and check emptiness and closability again inside it.
  • Verified: the original M1 and M2 are fixed (six fix-specific probes pass here and fail on cb818dc), and 148 unit tests pass.

The omo re-review of this commit is still running.

@devswha

devswha commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

f3b6cf6, omo code reviewer: PASS (codeQualityStatus WATCH, APPROVE). No CRITICAL or HIGH findings.

  • Both earlier MEDIUMs are fixed. Focus goes back to its opener or the first row, the closing Escape is consumed, and an empty field closes on a press outside or when focus leaves the sidebar. The listeners are removed with closable and on unmount.
  • MEDIUM (non-blocking): a row's menu is drawn outside the sidebar (RowMenu.tsx:191/220), so MachineSidebar.tsx:124-126 and :132-138 treat it as "outside". Opening a row menu from the keyboard closes the empty field and leaves the menu one row out of place. A mouse click on a menu item closes the field before the click lands, so the list moves under the pointer. Fix: count .row-menu and .row-sheet as inside.
  • LOWs: no open-modal check in the focus return, and the fallback can pick a button that cannot take focus. DESIGN.md overstates "while the first roster loads". The comment says "until a key is pressed". There are browser-test gaps.

Both reviewers have approved f3b6cf6 with MEDIUM or lower findings, after two fix rounds. These go into one follow-up issue at merge. #2073 waits on CI and merges last.

@devswha
devswha merged commit 73e497c into main Oct 27, 2026
19 of 21 checks passed
@devswha
devswha deleted the feat/sidebar-declutter branch October 27, 2026 18:17
@devswha

devswha commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

Merged at f3b6cf6 by the merge pass.

CodeRabbit did not review this PR: its review limit was reached.

@coderabbitai coderabbitai Bot mentioned this pull request Oct 27, 2026
devswha added a commit that referenced this pull request Oct 28, 2026
…, and keep it open for the sidebar's own menus (#2141)

Closes #2079 (follow-up to #2073).

## What it fixes for the user

With Settings → Appearance → Sidebar filter off, the command palette's
**Filter workspaces and agents** opens the
filter field for a filter's time. Three edges of that field were still
broken on main:

1. **Closing it could leave the focus on nothing.** When what opened the
field is gone (for example the
Settings switch, after turning the setting off while the field held
words), Close filter / Escape fell back to
the list's first `button`. That skipped the workspace row itself (a
`div[role=button]`) and landed on the row's
⋯, which a desktop does not draw, so the focus stayed on `<body>`. Now
it tries the opener, then each row
control that is drawn, not inert and takes the focus, and checks that
the focus actually landed before stopping.
2. **A row's menu counted as "outside" the sidebar.** The menu is drawn
through a portal, so opening a row's menu
from the keyboard closed the empty field (and the menu was then drawn
one row out of place), and a click on a
menu item closed the field before the click landed. Now the sidebar
counts a menu or sheet as its own when the
menu's button is inside it: `RowMenu` records each open menu's button
(`rowMenuAnchor`). A tab's menu, or any
   other one, still takes the empty field, as before.
3. **A late blur check could clear newer words.** An empty field's blur
to nowhere is decided a frame later. That
frame is now cancelled when the field stops being closable or unmounts,
and it rechecks that the field is still
empty. Also, a press from the field's last close no longer makes its
next blur ignored (`pressedInside` is reset
   when the field opens).

Design: the focus return follows the same pattern as `useFocusTrap`'s
return (lib/useFocusTrap.ts) and the
WAI-ARIA dialog practice, which VS Code's and Zed's quick-pick filters
also follow: focus goes back to the opener,
or to the nearest sensible control, never to the document.

## Tests

`scripts/sidebar-declutter-demo-regression.ts` gets a desktop
`filterEdges` case (a new `flat=1` fixture param
takes the worktrees off the demo's workspaces, so a row's first button
is its undrawn ⋯):
- the opener is gone → Close filter puts the focus on a visible row
(fails on main: focus on `<body>`);
- a row's menu opened from the keyboard keeps the field, sits under its
row, and a click on its item keeps the field
  (fails on main);
- an empty field's blur to nowhere closes it right after the press that
closed it last (fails without the
  `pressedInside` reset);
- a tab's menu takes the empty field (fails if every `.row-menu` counted
as the sidebar);
- words typed after a blur and before its frame survive (fails without
the recheck).

Each case was checked failing with its fix reverted and passing with it.
The full script passes (desktop and
phone, light and dark). `bun run check fast` is green.

## Reviews

- omo-native-code-reviewer: PASS, 4 LOW (one, "any .row-menu counts",
also raised by Codex and fixed here).
- Codex Sol 6.1 Fast xhigh: BLOCK on c5b0e58 (MEDIUM: a tab's menu kept
the field; LOW: the late-blur test
could pass without its fix). Both fixed in fe5a42e; re-review PASS with
no findings.
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