Skip to content

fix(web): restore sidebar access in zoomed empty state#2841

Closed
Pearcekieser wants to merge 1 commit into
pingdotgg:mainfrom
pearce-codes:fix/sidebar-empty-state-zoom-deadlock
Closed

fix(web): restore sidebar access in zoomed empty state#2841
Pearcekieser wants to merge 1 commit into
pingdotgg:mainfrom
pearce-codes:fix/sidebar-empty-state-zoom-deadlock

Conversation

@Pearcekieser

@Pearcekieser Pearcekieser commented May 28, 2026

Copy link
Copy Markdown

Summary

  • Allow the thread sidebar resize guard to accept shrinking even when the stored sidebar width is wider than the viewport/main content area.
  • Show the no-active-thread sidebar trigger whenever the sidebar is currently hidden, including Electron/mobile-sheet mode after zooming in.
  • Add focused tests for the sidebar width predicate and no-active-thread trigger visibility predicate.

Why

When the app is zoomed in enough to enter the mobile sidebar layout and no thread is selected, the sidebar becomes a closed sheet. The Electron no-active-thread header did not render SidebarTrigger, leaving only "Pick a thread to continue" with no visible way to reopen the sidebar and select a thread.

The existing width guard also rejected every drag when the sidebar width exceeded the wrapper width, so users could not shrink back out of a bad persisted/resized sidebar state.

Checks

  • bun fmt
  • bun lint (passes with existing warnings)
  • bun typecheck
  • bun run test -- src/components/AppSidebarLayout.test.ts src/components/NoActiveThreadState.test.ts

Test Notes

  • bun run test currently fails outside this change in scripts/mock-update-server.test.ts with a timeout in serves files from the configured root.
  • bun run test --filter=@t3tools/web currently fails outside this change in src/environments/runtime/service.addSavedEnvironment.test.ts with a timeout in rolls back persisted metadata when bearer token persistence fails.

Note

Restore sidebar access in the 'No active thread' empty state when sidebar is collapsed

  • The NoActiveThreadState component now conditionally renders SidebarTrigger only when needed: on desktop when the sidebar is collapsed, and on mobile when the sheet is closed. Previously the trigger was always shown on non-Electron and never shown on Electron.
  • A shouldShowNoActiveThreadSidebarTrigger helper encapsulates this visibility logic, with tests added in NoActiveThreadState.test.ts.
  • shouldAcceptThreadSidebarWidth in AppSidebarLayout.tsx is updated to allow all shrink operations unconditionally, while still enforcing the minimum main content width on expansion.

Macroscope summarized caf8c4f.

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto 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.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f0e6f0e9-5c7b-4c83-ad3c-c70e11aa97ab

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels May 28, 2026
@Pearcekieser

Copy link
Copy Markdown
Author

Superseded by #2884, which uses the date-prefixed worktree/branch requested for this fix.

@Pearcekieser Pearcekieser deleted the fix/sidebar-empty-state-zoom-deadlock branch May 31, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant