Skip to content

feat(shell): allow sidebar collapse on all pages - #845

Open
kazemek21 wants to merge 5 commits into
block:mainfrom
kazemek21:kylez_NEXUS-3232_collapsible-shell-sidebar
Open

kazemek21 wants to merge 5 commits into
block:mainfrom
kazemek21:kylez_NEXUS-3232_collapsible-shell-sidebar

Conversation

@kazemek21

@kazemek21 kazemek21 commented Oct 10, 2026 •

Copy link
Copy Markdown

TL;DR

Primary plugin pages can now hide and restore the shell sidebar. Plugin pages that provide their own navigation can reclaim the left rail.

Why

The shell currently enables collapse only on Channels, Me, and Settings. Other primary pages cannot hide the shell navigation.

What

  • Enable the existing sidebar toggle for any selected primary page.
  • Use generic "Hide sidebar" and "Show sidebar" labels when Channel and Me labels do not apply.

How

AppShell checks whether the selected page key matches a primary registration. The existing open state, narrow drawer, and accessibility handling remain in place.

Risk

This changes shell sidebar eligibility and its label only. It does not add a page navigation API.

Browser coverage

  • Added: tests/browser/navigation.spec.mjs "a collapsible sidebar yields to narrow drawer styles during resize" (Chromium and WebKit). It needs a real browser because it asserts the computed cascade between the desktop collapsible-sidebar rule and the narrow-drawer media query, which jsdom does not compute.
  • Updated: the Settings toggle case in sidenav-polish.spec.mjs now expects the generic "Show sidebar" label, and the shared settleShellToggle helper accepts the generic and Me labels. No browser cases were removed, so no replacement coverage is needed.
  • Fail-then-pass: at 3b1ad30, with this PR's 3-line narrow-drawer rule in globals.css removed, the new case fails in WebKit at navigation.spec.mjs:26 (display expected none, received grid). With the rule restored, it passes in both engines. Chromium passes either way.
  • Unit coverage: AppShell.test.tsx covers a primary plugin page hiding and showing the sidebar, a non-primary plugin page staying non-collapsible, and built-in controls before page contributions load.

Test plan

Human test pending. At a desktop width, open a primary plugin page and click "Hide sidebar"; the shell navigation should disappear, its controls should leave keyboard and accessibility navigation, and the left rail should be available to the page. Click "Show sidebar"; the shell navigation should return. At a narrow width, verify the existing "Show navigation" and "Hide navigation" drawer still opens and closes.

Related work

This change complements the page-owned sidebar contribution in #844.

— Posted by Codex (gpt-6-luna) and Claude Code (claude-opus-5-5) on behalf of kylez

@kazemek21
kazemek21 force-pushed the kylez_NEXUS-3232_collapsible-shell-sidebar branch from 1196855 to 0888133 Compare October 10, 2026 10:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T01:20:43.026579Z 3b1ad30 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08881334d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/app/shell/AppShell.tsx
Comment thread src/app/shell/AppShell.tsx
@kazemek21
kazemek21 force-pushed the kylez_NEXUS-3232_collapsible-shell-sidebar branch from 0888133 to b0eea52 Compare October 10, 2026 10:54

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking defects found in this change. Reviewed head 50ac4bb3174564d2737d1eb9493beb2b83b39c47 against base 82d165d5b6fd7dc1f3e9784675d27c04aacdbeae, independently of #844. This is a comment review, not an approval.

  • Behavior: the change reuses the shell’s existing disclosure and state owners, matches the complete contribution key, and retains built-in controls during startup. Four targeted Chromium/WebKit cases against the compiled app passed: a primary plugin page reclaimed exactly 260px, preserved its draft and mounted sidebar, excluded hidden controls from keyboard/role navigation, and retained drawer/Escape/destination-focus behavior. Coverage included both themes, 100%/200% text, 650/651px resizing, a 390px drawer, reduced motion, and visits between primary pages. Production sources were unchanged during these probes.
  • CI caveat: all 9,199 Vitest tests and all 12 browser journey shards passed, but JavaScript (1/2) failed on an unhandled Sonner timer (window is not defined), attributed to WorkflowsPage.test.tsx. That test mounts WorkflowCommunity directly, not AppShell; its code and the toast dependency are unchanged here. This is outside this diff’s execution path, but required CI remains red and needs separate resolution/disposition.
  • Remaining acceptance: the PR’s human test is still pending. These browser probes do not certify native webview, VoiceOver, or physical-touch behavior. No additional code changes requested by this review.

Carl, an automated reviewer, commenting via Wes’s GitHub account.

kazemek21 and others added 3 commits October 10, 2026 16:54
Co-authored-by: Codex (gpt-6-luna) <noreply@openai.com>
Signed-off-by: Kyle Zemek <kylez@squareup.com>
Co-authored-by: Codex (gpt-6-luna) <noreply@openai.com>
Signed-off-by: Kyle Zemek <kylez@squareup.com>
Co-authored-by: Codex (gpt-6-luna) <noreply@openai.com>
Signed-off-by: Kyle Zemek <kylez@squareup.com>
@kazemek21
kazemek21 force-pushed the kylez_NEXUS-3232_collapsible-shell-sidebar branch from 50ac4bb to 2b6eabf Compare October 11, 2026 00:11
kazemek21 and others added 2 commits October 10, 2026 17:27
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kyle Zemek <kylez@squareup.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kyle Zemek <kylez@squareup.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b1ad3077f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/browser/navigation.spec.mjs
@kazemek21
kazemek21 marked this pull request as ready for review October 11, 2026 01:16
@kazemek21
kazemek21 requested a review from a team as a code owner October 11, 2026 01:16
@kazemek21

Copy link
Copy Markdown
Author

Status since the approval at 50ac4bb:

  • Rebased onto current main, which includes the Sonner timer fix (fix(toast): cancel exit-removal timers on unmount #843) behind the earlier JavaScript (1/2) failure. The PR diff is unchanged apart from a two-line docs/shell-design.md wording fix: "Non-primary desktop destinations retain the visible sidebar."
  • Added two empty, signed-off commits to retrigger CI after me-workspace.spec.mjs:110 failed intermittently in WebKit. The same case fails on unrelated branches and passes on main. Required CI is now green at 3b1ad30.
  • The PR description now records the added browser journey and its fail-then-pass evidence.

The human test from the contribution checklist is still pending, so buzz-review-completed has not been added.

— Posted by Claude Code (claude-opus-5-5) on behalf of kylez

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.

2 participants