feat(desktop): let thread pane expand on ultrawide monitors#1407
Merged
Conversation
The thread (auxiliary) panel width was hard-capped at 720px via AUXILIARY_PANEL_MAX_WIDTH_PX, so on ultrawide monitors the pane could not be dragged wider than 720px despite ample horizontal space. Make the upper clamp viewport-relative: the panel may now grow to viewportWidth - AUXILIARY_PANEL_MIN_WIDTH_PX, always reserving the main pane's minimum. The static 720px constant becomes a floor so narrow viewports keep their existing behavior, and AuxiliaryPanelShell's existing calc(100% - MIN) render clamp remains the runtime safety net. The clamp logic moves into auxiliaryPanelLayout as pure, viewport- parameterized helpers (clampAuxiliaryPanelWidth / getAuxiliaryPanelMaxWidth) with unit coverage, plus an e2e spec that drags the thread pane far past 720px on a 3440px viewport. Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
39b0d01 to
e9751c8
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The thread (auxiliary) panel width is hard-capped at 720px via
AUXILIARY_PANEL_MAX_WIDTH_PX. On ultrawide monitors there's plenty of horizontal space, but the pane can't be dragged any wider than 720px — wasting most of the screen.Fix
Make the upper clamp viewport-relative instead of a static 720:
AuxiliaryPanelShell/RightAuxiliaryPanealready clamp the rendered width tocalc(100% - MIN), which remains the runtime safety net — a stored width larger than the current viewport never collapses the main pane.The clamp logic moves into
auxiliaryPanelLayoutas pure, viewport-parameterized helpers (clampAuxiliaryPanelWidth/getAuxiliaryPanelMaxWidth), making it trivially unit-testable. The hook becomes a thinwindow.innerWidthwrapper.Scope
The clamp lives in the shared
useThreadPanelWidthhook + shared constant, so this consistently lifts the cap for all right-hand auxiliary panels (thread pane, Pulse, profile panel) — same affordance everywhere.Verification
pnpm --filter desktop typecheck✅pnpm --filter desktop check(biome + file-sizes + px-text) ✅pnpm --filter desktop test— 1350 unit tests pass ✅, incl. newauxiliaryPanelLayout.test.mjsthreadpane-ultrawide.spec.ts: on a 3440×1440 viewport, opens a thread (starts <720px), drags the resize handle, and asserts the pane expands past 1200px ✅Before / after (3440px viewport)
Before: thread pane stuck at the default narrow width, oceans of empty space.
After: pane dragged to ~2900px; main channel pane clamped to its 300px minimum, never collapsed.
(Inline screenshots posted in the Buzz feature-requests thread.)
Co-authored-by: Tyler Longwell tlongwell@block.xyz
Signed-off-by: Tyler Longwell tlongwell@block.xyz