Repository navigation
Conversation
The page title was a single-line <input>, so a long title ran off the right edge instead of wrapping. It is a wrapping, auto-growing textarea now: Enter leaves the field and Shift+Enter still starts a new line, so a title stays a single paragraph. Regression tests cover the element and its key handling.
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.
Fixes #68
Problem
The page title field is a single-line
<input>(aria-label="Page title"), so a long title is clipped at the right edge instead of wrapping. For example "AI Coworkers: OpenAI Dots vs Meta Muse vs OpenDots" shows as "AI Coworkers: OpenAI Dots vs Meta Mus" in a ~1300 px window.Fix
Render the title as a wrapping, auto-growing
<textarea>instead of a single-line<input>:white-space: pre-wrap; overflow-wrap: break-word) and grows to fit every line, so no title is clipped horizontally.rows={1}plus a content-height effect (andfield-sizing: contentwhere supported) keep it exactly one line tall until the text actually wraps.Enterleaves the field;Shift+Enterstill inserts a line break for the rare case a break is wanted.The existing
aria-label, placeholder,maxLengthand the autosave path (controller.edit({ title })) are unchanged.Verification
tests/page-document-title.test.tsxcover the element type/props and the Enter vs Shift+Enter handling.vitest: my two new tests pass. The 7 pre-existing failures in the suite are unrelated — they come fromnode:sqliterequiring Node >=22 while this environment runs Node 20, and they fail identically on the unmodified tree.tsc --noEmit,eslintandprettier --checkare clean on the changed files.