You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(sidebar): keep workspace rows visible in Safari - #3218
Change the PCs section's zero flex basis from 0 to 0%. WebKit otherwise caps this section at its minimum height when the agent list is long, leaving room for a PC header but no workspaces.
Keep the existing minimum sizes, content caps, user-selected divider allocation and collapsed sections. No application JavaScript changes.
Extend the existing demo regression for the sidebar divider with 47 agents / two PCs / 12 workspaces and a short two-agent / one-PC / one-workspace scene. Assert actual workspace visibility, section and individual-PC folding, and saved divider allocation in both section orders. After rotation, reopen the drawer and verify that workspace rows are visible and the saved allocation is unchanged.
Evidence
All screenshots use the real App demo with isolated fixture data, not a live session.
At 390 × 844, WebKit's expanded PCs list changes from 44 px with no workspace visible to 188 px with workspace rows visible. Chromium retains its 188 px list.
WebKit before
WebKit after
Chromium control and layout checks
Validation
bun scripts/demo-build.ts <isolated-output> and bun run typecheck: pass.
bun test src/lib/sidebarSplit.test.ts src/conventions.test.ts server/conventions.test.ts src/lib/i18n.test.ts scripts/changelog-fold.test.ts: 65 pass.
bun scripts/sidebar-split-demo-regression.ts: 16 Chromium scenarios pass, including the established touch, drag, keyboard and snap-fold checks.
BROWSER_ENGINE=webkit bun scripts/sidebar-split-demo-regression.ts --only=roster: passes all 8 scenarios at 390 and 1280 px, covering both section orders and roster sizes.
The additional full legacy drag run under WebKit fails its browser-error assertion at 390/dark/pcs-first with a ResizeObserver notification-loop warning. The same case fails on unchanged public main b5d9b065. The error assertion remains enabled.
bun run check fast is non-green at the unit-test stage, with failures not fully paired against the public base. Generated types/themes freshness checks, typecheck and build pass. Workflow syntax is skipped on Mac.
The browser checks ran on an isolated Mac. CI runner image and native Windows checks were not run. Physical iPhone checks were not run. Required GitHub CI is pending.
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
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.
Summary
Summary by CodeRabbit
Bug Fixes
Fixed a Safari sidebar issue where workspace rows could disappear when the PCs list contained many agents. Workspace rows now remain visible in this layout.
The PCs sidebar flex-basis changes to 0%. The regression script adds WebKit support and synthetic roster scenarios. It checks workspace visibility, folding, divider allocation, rotation, and browser errors.
devswha/ovis#2944: Adds the PCs and Agents flex allocation and divider that this change adjusts and tests.
Suggested reviewers:duytbp
Merge Risk: Minimal · previous review c2752
The sidebar sizing change has no established merge-blocking defect. Normal validation and the outstanding CLA requirement still need completion.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly describes the Safari sidebar visibility fix.
Description check
The description explains the change and reports validation results, failures, and skipped checks. It uses “Summary” instead of the template’s “Change” heading.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
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.
Reviewing files that changed from the base of the PR and between b5d9b06 and c275256.
Files selected for processing: 3
changelog.d/mobile-pc-spaces.md
scripts/sidebar-split-demo-regression.ts
src/components/Sidebar.css
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
Thanks for the clear fix and the WebKit evidence, @odfalik! One small thing before this can merge: the CLA check is still pending. Please sign it by replying with the sentence from the CLA bot comment above. We'll keep reviewing in the meantime and push any follow-up fixes to this branch ourselves.
…ape layouts
The visibility check now intersects rows with the .pcs-sidebar section, which clips
the list, and rotation covers a phone-drawer landscape (667x375) as well as the
desktop layout past the breakpoint (844x390). The drawer opens by the current
viewport width, not the scene's starting width.
Thanks again @odfalik. We reviewed this, confirmed the bug, and pushed two commits to your branch (no force push):
287611b9 test(sidebar): the visibility check now also intersects rows with the .pcs-sidebar section, which clips the list (overflow: hidden). Rotation now covers a phone-drawer landscape (667x375) as well as the desktop layout past the breakpoint (844x390), and the drawer opens based on the current viewport width.
fbe4fbb2 merges the latest main.
Reproduction. On a Mac with Playwright WebKit, main's CSS fails the new roster case: webkit/390/pcs/many shows a 44 px PC list and no workspace row. With this PR, all 8 WebKit roster scenarios pass.
Validation
BROWSER_ENGINE=webkit bun scripts/sidebar-split-demo-regression.ts --only=roster on macOS: 8/8 pass on this branch, fails on main's Sidebar.css.
bun scripts/sidebar-split-demo-regression.ts in Chromium: 16/16 pass.
bun run check fast: green (12872 unit tests pass).
In the self-hosted CI runner image: deep-link, hide-pc, install-state, render-crash, sidebar-agent-tree, sidebar-heads, sidebar-machine-layout, sidebar-spacing, sidebar-split-access and sidebar-split regressions all pass. usage-regression fails the same way on unchanged main and is not part of the CI browser lane.
Review notes (not blocking)
MEDIUM: CI still runs this script only in Chromium, so a later change could bring back the Safari collapse without a red check. Running WebKit in CI needs the runner image to install WebKit and its system libraries, which is a separate change.
LOW: At short landscape heights (375-390 px), the split saved in portrait leaves no room for a full workspace row. This happens in Chromium and WebKit alike and also on main, so the test checks rows in portrait only.
The CLA check is still pending. This can merge once you sign it.
…entage
CI runs this script in Chromium, which shows the rows with either basis, so
the roster case now also checks that the default PCs basis computes to 0%.
Reverting to a unitless 0 fails there as well as in WebKit. The header notes
that a full WebKit run still hits the ResizeObserver error main has.
One more commit on your branch: a404c4a7 test(sidebar). CI runs this script in Chromium only, and Chromium shows the rows with either basis, so the roster case now also checks that the default PCs basis computes to 0%. Reverting to a unitless 0 now fails in Chromium as well as WebKit, so the MEDIUM above (CI coverage) is closed without changing the runner image.
Validation at a404c4a7: bun run check fast green; Chromium 16/16 pass; WebKit roster 8/8 pass on macOS; with main's Sidebar.css, both Chromium and WebKit fail the new check.
Remaining review notes are LOW only (left as they are): the agents-first saved split still uses --pcs-flex: 1 1 0, which the WebKit roster "saved" step covers and passes because that rule also drops the content cap; docs/development.md does not yet mention BROWSER_ENGINE=webkit / --only=roster; the roster matrix adds some time to the browser job.
The CLA check is still pending. This can merge once you sign it.
Fixes#3267Fixes#3217
Thanks to @Haeminway1 (#3255) and @odfalik (#3218), who found the same
cause and the same kind of fix; this PR keeps #3255's grid and its
layout assertions, and ships it now because users of Safari hit it on
0.5.0.
## What
In Safari the sidebar's workspace list (the PCs section) stayed one row
tall, with a scrollbar beside it and empty space under it, since the
PCs/Agents resize line (#2944).
The PCs section is a column flexbox with a `0` flex basis and a
`max-content` cap (`Sidebar.css`: `flex: 1000 1 0; max-height:
var(--section-max, max-content)`). WebKit sizes that `max-content` from
the `0` basis, so the cap came out at nothing and the section's minimum
(top padding plus one row) won. Chromium sizes it from the rows.
The section is now a one-row grid (`grid-template-rows: minmax(0, 1fr)`)
holding the scrolling list. Its `max-content` is its rows in both
engines, so the flex sizing, the default split and the resize line work
as before. Chromium draws exactly the same heights as before.
No new controls; no behaviour change outside Safari/WebKit.
## Evidence
Demo app at 1280x844, `.pcs-sidebar` / `.machine-list` / list scroll
height / `.agents-sidebar` in px:
| | short roster | 40 more workspaces | both lists long |
|---|---|---|---|
| WebKit, main | 54 / 46 / 270 / 246 | 54 / 46 / 2110 / 246 | 54 / 46 /
2110 / 683 |
| WebKit, this PR | 278 / 270 / 270 / 246 | 491 / 483 / 2110 / 246 | 338
/ 330 / 2110 / 399 |
| Chromium, main and this PR | 278 / 270 / 270 / 246 | 491 / 483 / 2110
/ 246 | 338 / 330 / 2110 / 399 |
WebKit was Playwright 1.65's WebKit (in
`mcr.microsoft.com/playwright:v1.65.0-noble`), the engine Safari uses;
main's numbers match the reporter's screenshot (one workspace and a
scrollbar). On main, WebKit draws one workspace row and a scrollbar with
empty space under it; with this PR it draws every row, as Chromium does.
## Tests
`scripts/sidebar-split-demo-regression.ts` (checks taken from #3255):
- the PCs section's computed `display` is `grid`: fails on main in
Chromium, which CI runs ("the PCs section stays a grid, or Safari draws
its list one row tall");
- by default, and with Agents folded, the PCs' list is as tall as its
rows or the room it has, and the first row is in view.
Run in WebKit too (a scratch copy pointed at Playwright 1.63's WebKit
server, 1280 light/dark, both orders; not committed, CI has no WebKit):
on main's CSS it fails with "the PCs' list takes its rows' height or the
room it has (46/270px)"; with this PR all four cases pass.
## Validation
In the CI runner image (`herdr-ci-runner:local`) at 68e9c27 (the fix):
`bun run check fast` passed, and `bun run build` plus the sidebar
browser regressions `hide-pc`, `sidebar-agent-tree`,
`sidebar-declutter`, `sidebar-filter`, `sidebar-heads`,
`sidebar-machine-layout`, `sidebar-peek`, `sidebar-spacing`,
`sidebar-split-access` and `sidebar-split` all passed (with
`UI_EVIDENCE_DIR`). At 2f69690 (the test commit): `bun run check fast`,
`sidebar-split` and `sidebar-split-access` passed again.
Not run: the integration suite and full `check` (CSS only).
Thank you @odfalik! Your fix found the cause of Safari's one-row workspace list, and it shipped in #3295, which keeps this approach and credits you there. Closing this one as superseded by #3295.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Change the PCs section's zero flex basis from
0to0%. WebKit otherwise caps this section at its minimum height when the agent list is long, leaving room for a PC header but no workspaces.Keep the existing minimum sizes, content caps, user-selected divider allocation and collapsed sections. No application JavaScript changes.
Extend the existing demo regression for the sidebar divider with 47 agents / two PCs / 12 workspaces and a short two-agent / one-PC / one-workspace scene. Assert actual workspace visibility, section and individual-PC folding, and saved divider allocation in both section orders. After rotation, reopen the drawer and verify that workspace rows are visible and the saved allocation is unchanged.
Evidence
All screenshots use the real App demo with isolated fixture data, not a live session.
At 390 × 844, WebKit's expanded PCs list changes from 44 px with no workspace visible to 188 px with workspace rows visible. Chromium retains its 188 px list.
Chromium control and layout checks
Validation
bun scripts/demo-build.ts <isolated-output>andbun run typecheck: pass.bun test src/lib/sidebarSplit.test.ts src/conventions.test.ts server/conventions.test.ts src/lib/i18n.test.ts scripts/changelog-fold.test.ts: 65 pass.bun scripts/sidebar-split-demo-regression.ts: 16 Chromium scenarios pass, including the established touch, drag, keyboard and snap-fold checks.BROWSER_ENGINE=webkit bun scripts/sidebar-split-demo-regression.ts --only=roster: passes all 8 scenarios at 390 and 1280 px, covering both section orders and roster sizes.sidebar-split-access-demo-regression.ts: 19 checks pass.sidebar-heads-demo-regression.ts: 35 checks pass.sidebar-machine-layout-demo-regression.ts: 16 checks pass.The additional full legacy drag run under WebKit fails its browser-error assertion at
390/dark/pcs-firstwith a ResizeObserver notification-loop warning. The same case fails on unchanged public mainb5d9b065. The error assertion remains enabled.bun run check fastis non-green at the unit-test stage, with failures not fully paired against the public base. Generated types/themes freshness checks, typecheck and build pass. Workflow syntax is skipped on Mac.The browser checks ran on an isolated Mac. CI runner image and native Windows checks were not run. Physical iPhone checks were not run. Required GitHub CI is pending.