app: board density default follows live window width#33
Merged
Conversation
The table-vs-cards default sampled window.innerWidth once in a useState initializer, but the Tauri window opens at its configured 1200px and is maximized after mount — so wide screens were locked to cards for the whole session and the D1 triage table never appeared by default. The width default is now a live media query at the 1400px breakpoint; an explicit toggle is persisted and always wins.
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.
What
Follow-up to #31 from live testing: the D1 triage table never appeared by default on wide screens.
loadDensity()sampledwindow.innerWidthonce at mount, but the Tauri window opens at its configured 1200×800 (< the 1400px breakpoint) and gets maximized after React mounts — so the session was locked to the cards grid.Now the width-driven default is a live media query (
min-width: 1400px): maximize the window and the table appears; an explicit density toggle is persisted and always wins (stored preference is width-free, so it can't be poisoned by mount-time size either).Verified
tscclean ·vitest385 (+1: stored-preference parsing) ·vite buildok. Existing pure density tests unchanged.🤖 Generated with Claude Code