Skip to content

Respect closed default panels#32

Merged
samuelstroschein merged 1 commit into
mainfrom
codex/respect-closed-default-panels
Jul 14, 2026
Merged

Respect closed default panels#32
samuelstroschein merged 1 commit into
mainfrom
codex/respect-closed-default-panels

Conversation

@samuelstroschein

@samuelstroschein samuelstroschein commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

  • keep sidebar panels collapsed when a host passes an empty defaultOpenPanels list
  • preserve the existing minimum-width recovery only when the left panel should open by default
  • add regression coverage for opening a document with both panels collapsed

Why

The layout size recovery expanded a zero-width left panel even when the host explicitly configured the panel to start closed. This made host-level document modes unable to present a focused, panel-free initial view.

Impact

Hosts can now reliably use defaultOpenPanels: []; users can still reopen either panel with the existing controls.

Validation

  • pnpm exec vitest run src/create-atelier.test.tsx — 5 passed
  • pnpm run typecheck
  • pnpm exec oxfmt --check src/create-atelier.test.tsx src/shell/layout-shell.tsx
  • focused oxlint on both changed files

Note

Low Risk
Small conditional change in layout sizing plus test coverage; no auth, data, or API surface changes.

Overview
Hosts can use defaultOpenPanels: [] with filesViewMode: "sidebar" and get a document-focused layout without side panels opening on their own.

layout-shell.tsx only applies the sidebar minimum-width recovery (bumping a near-zero left size back to the default left width) when the left panel is meant to open by default (defaultLeftPanelOpen). Previously that recovery ran whenever stored left width was collapsed, which overrode an explicit “start closed” host config.

A regression test in create-atelier.test.tsx opens a file with both panels collapsed and asserts the left/right toggle buttons stay aria-pressed="false" after the document loads.

Reviewed by Cursor Bugbot for commit 0635f04. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor

cursor Bot commented Jul 14, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_c3142b96-4b3a-4342-ae99-79c455a87ed5)

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
atelier-preview 0635f04 Commit Preview URL

Branch Preview URL
Jul 14 2026, 05:27 PM

@samuelstroschein
samuelstroschein merged commit fdd588b into main Jul 14, 2026
2 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