fix(collab-web): show document names and avoid early header wrapping - #48
Merged
Merged
Conversation
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.
Review Headers show the Worktree name instead of the selected document, and reserve 260px for the title even when a short filename needs much less space. This can drop actions onto a second row despite enough room for all controls.
Use the selected Unit name and measure the title row's actual minimum width, keeping the icon, badge, sidebar control, and internal gaps intact. Only long filenames may shrink to their CSS minimum. Use the same measured width for geometric centering and the Flexbox basis; the browser still handles all wrapping. Measure an uncompressed row before paint so narrow containers cannot corrupt the result.
Keep lifecycle commands bound to the active Worktree, preserve complete merge-status messages, and update the fixture, regression tests, and bilingual README.
Validation: full
pnpm checkpassed, including 143 collab-web tests; explicit Header test/fixture typecheck passed. 248 browser scenarios cover Chinese/English, short and long names, normal/preview and lifecycle states, sidebar-toggle spacing, dark mode, and exact centering/wrapping boundaries. Checks assert that controls never wrap when their actual minimum widths fit, in addition to bounds, order, and centering checks.git diff --checkpassed.