Skip to content

feat(desktop): polish sidebar resizing - #7794

Closed
klopez4212 wants to merge 1 commit into
mainfrom
kennylopez-sidebar-polish
Closed

klopez4212 wants to merge 1 commit into
mainfrom
kennylopez-sidebar-polish

Conversation

@klopez4212

@klopez4212 klopez4212 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make the channel sidebar smoothly resizable with persistent width, a delayed affordance, and double-click reset
  • align sidebar and chat scrollbar styling, keep the resize cursor stable, and prevent selection during drag
  • avoid unresolved custom-emoji flashes and remove redundant channel-name tooltips

Related issue

None found.

Testing

  • focused sidebar Playwright coverage
  • pre-push desktop checks and 6,508 desktop tests
  • just ci: all non-ACP lanes passed; three load-sensitive ACP timer tests failed under suite contention and passed individually
  • verified in the Builderlab staging app with the requested production profile

Screenshots

Resting gutter:

Sidebar resting

Hover affordance:

Sidebar resize affordance

Signed-off-by: kenny lopez <klopez4212@gmail.com>
@klopez4212
klopez4212 requested a review from a team as a code owner September 22, 2026 09:48
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 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-09-22T09:53:26.520672Z 17f7830 PR opened
ℹ️ 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.

@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 77729abfb692b25a0f4ec4a69add86af2e32c0dd...17f78307bbed928dd5358f6d07e4a981e74624f5.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 17f78307bbed928dd5358f6d07e4a981e74624f5 to authorize a new review.
Any previous review applies only to its recorded range.

klopez4212 added a commit that referenced this pull request Sep 22, 2026
@klopez4212

Copy link
Copy Markdown
Contributor Author

🤖 ## Screenshots

Resting

The resize gutter stays visually hidden at rest.

01-sidebar-resting

Hover

Hovering anywhere in the gutter reveals the centered resize affordance.

02-sidebar-resize-affordance

@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: 17f78307bb

ℹ️ 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 on lines +493 to +497
onDoubleClick={(event) => {
onDoubleClick?.(event);
if (event.defaultPrevented) return;
setSidebarWidth(SIDEBAR_WIDTH_DEFAULT);
performSidebarDefaultHaptic();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make the reset action keyboard-reachable

For keyboard-only users, the new reset action is unreachable because it is implemented only in onDoubleClick, while the rail remains outside the tab order with tabIndex={-1} and there is no keyboard handler or alternate reset control. The added ARIA description therefore advertises an action that assistive-technology users cannot invoke; expose a focusable keyboard path and cover it alongside the pointer test.

AGENTS.md reference: AGENTS.md:L232-L239

Useful? React with 👍 / 👎.

@jedwards27 jedwards27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:bot: Jude’s code review agent — REQUEST CHANGES

Reviewed: 77729abfb692b25a0f4ec4a69add86af2e32c0dd..17f78307bbed928dd5358f6d07e4a981e74624f5 (exact head 17f78307bbed928dd5358f6d07e4a981e74624f5)
Risk: medium — persistent, shared desktop layout and pointer lifecycle changes with app-wide cursor/selection effects.

Blocking findings

  1. [P2] The new reset action is pointer-only. desktop/src/shared/ui/sidebar.tsx:486-498 keeps the resize control out of the tab order (tabIndex={-1}) and implements reset only in onDoubleClick, despite advertising “Drag to resize. Double-click to reset.” A keyboard or switch-control user cannot focus the control or restore a persisted non-default width. This conflicts with the repository’s input-modality and interactive-semantics rules (AGENTS.md:222-239). Make the control keyboard-operable with truthful adjustable semantics (current/min/max; arrow adjustment and Home/reset, or at minimum an operable focusable reset path), then add a regression test proving keyboard focus, resize/reset, and persisted width.

  2. [P2] Interrupted drag can strand global cursor and selection state. Drag start mutates document.documentElement.style.cursor, document.body.style.userSelect, and provider isResizing (desktop/src/shared/ui/sidebar.tsx:519-533), which activates the app-wide html[data-sidebar-resizing] * rule (desktop/src/shared/styles/globals/theme.css:144-148). Cleanup only runs from pointer up/cancel (sidebar.tsx:464-480,499-502,566-569); there is no lost-capture or unmount cleanup. AppSidebar can unmount while its provider remains mounted when AppShell swaps to Settings (desktop/src/app/AppShell.tsx:825-831), leaving selection disabled and col-resize forced across the app. Centralize idempotent cleanup independent of a React event; invoke it for pointer up/cancel, lost pointer capture, and teardown (plus blur/visibility if that is the intended native recovery contract). Add a causal regression that begins dragging, forces capture loss/unmount, and verifies capture plus all global/provider state are restored.

  3. [P1 gate] The PR’s scrollbar change breaks the required smoke suite on all retries. Exact-head job Desktop Smoke E2E (1) fails both Buzz light and dark palette tests: buzz-theme-screenshots.spec.ts:213 still requires the sidebar thumb to equal searchSurface, while scrollbars.css:5-26 now renders hsl(var(--foreground) / 0.2) (rgba(36,41,46,.2) light / rgba(225,228,232,.2) dark). Resolve the intended theme contract and update implementation/tests together; the required exact-head gate must pass.

Author action: resolve all three findings and provide a new head with focused keyboard and interrupted-drag lifecycle regressions; reconcile the scrollbar palette contract so required smoke CI passes.

Verification owner: author for code/tests and PR-caused smoke failure; reviewer for exact-head re-review and focused/full-package gates; reviewer/tooling for native WKWebView/Windows visual, zoom, and screen-reader follow-up.

Validation

  • Confirmed live PR author klopez4212, authenticated reviewer jedwards27, base/head above, and clean local tree.
  • PASS: git diff --check 77729abf..17f78307.
  • PASS at matching clean HEAD: pinned-Hermit install; Desktop typecheck; 6,508 frontend tests; pnpm build:e2e.
  • PASS at matching clean HEAD: focused integration Playwright — sidebar tooltip removal, non-toggle click, drag/persistence/snap/double-click reset, and delayed affordance (4/4). An independent full sidebar.spec.ts run passed 23/23.
  • pnpm check completed with pre-existing warnings outside this six-file diff; no changed-file lint finding.
  • CI: macOS/Windows builds and relay-backed integration passed; exact-head smoke shard 1 failed as described; Desktop Core and smoke shard 4 were still running at final review.

Manual/native evidence: supplied resting/hover screenshots show the hidden gutter and centered hover handle. No exact-head native drag interruption, keyboard/AX, zoom matrix, or cross-platform scrollbar journey was independently recorded.

Residual risk: custom-status shortcodes are now hidden while the shared query is pending and fall back after resolution, but this diff adds no delayed-query runtime regression. Native scrollbar appearance and app-level blur/capture-loss behavior remain to be exercised after the code defects are fixed.

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

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

Changes requested

P2: Make the new sidebar reset action keyboard-operable

desktop/src/shared/ui/sidebar.tsx:489–498 advertises reset but implements it only in onDoubleClick, while retaining tabIndex={-1}. The complete rail has no keyboard reset handler, and its production caller renders <SidebarRail /> without an alternative handler (AppSidebar.tsx:959). The provider’s existing shortcut only toggles visibility, not width.

Impact / source-derived reproduction: start with a non-default persisted sidebar width, then use only Tab/Enter/Space. The rail is skipped in tab order, and keyboard activation does not dispatch dblclick, so the newly introduced reset action cannot restore the default width without a pointer. An ARIA description does not provide the missing interaction. This conflicts with the repository’s WCAG 2.1 AA and first-class input-modality contracts.

Smallest fix: provide a focusable keyboard-operable reset action, either on the rail or as an alternate control, using the existing width setter. Cover keyboard activation and persistence of the default width. The added Playwright case currently exercises only pointer dblclick (sidebar.spec.ts:695–703). This independently confirms the existing unresolved Codex finding; it is one issue, not an additional duplicate defect.

Review scope: exact head 17f78307bbed928dd5358f6d07e4a981e74624f5 against exact base 77729abfb692b25a0f4ec4a69add86af2e32c0dd. Source-only review on the pinned Blox host, covering all six changed files and their relevant producers/consumers. No checkout, builds, tests, or PR-code execution. Existing CI was sampled once; Desktop Core and smoke shards were still running at that snapshot, so this is not a claim of green CI or runtime validation.

@klopez4212

Copy link
Copy Markdown
Contributor Author

🤖 Closing this because the work belongs in the current Buzz app repository. Replacement: block/buzz-app#123

@klopez4212 klopez4212 closed this Sep 22, 2026
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.

3 participants