feat(web): add chat width setting for wide screens - #11594
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds a persisted, user-facing chat layout feature that changes production rendering across the timeline and composer, with multiple opt-in width modes. The existing default is preserved, but the distributed implementation has no accompanying tests for the new behavior. You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (11)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change adds a ChangesChat width setting
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant ClientSettings
participant ContrastAppearanceSync
participant DocumentRoot
participant ChatLayout
ClientSettings->>ContrastAppearanceSync: provide chatWidth
ContrastAppearanceSync->>DocumentRoot: set data-chat-width
DocumentRoot->>ChatLayout: expose --chat-max-width
Merge Risk: ⚪ Minimal · up to The chat-width setting and minimap adjustments appear ready for normal checks before merge. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new preference is limited to three layout choices and does not appear to change access to messages or privileged operations. Compatibility with older clients and some downstream coverage remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 11 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
4f0ecd5 to
c031c02
Compare
|
This would fix a real pain for me too — on a wide monitor the thread/composer sits at 768px and uses less than half the available width, with no setting to change it. Wide tables/code output constantly need horizontal scroll despite all the whitespace. Love the Comfortable / Wide / Full approach with Comfortable staying default. That matches the existing readable / wide / expanded pattern already used for workspace pages, just extended to chat where it's actually needed. |
|
Supporting the need — on a 3440px-wide monitor the fixed 48rem column leaves most of the pane empty and wide output still scrolls sideways. Comfortable / Wide / Full with Comfortable as the default looks like the right shape, and as a client setting it also covers desktop and remote connections. One gap in the diff: |
|
@otavio I opened otavio#1 against
I measured it in a real dev build. At Full width, the 40px strip used to overlap the column by 26px, so clicks on the text's left edge landed on the strip. It now shrinks to 14px with no overlap. Comfortable and Wide are unchanged. Focused tests and web typecheck pass. Details are in the linked PR. Made with Claude Opus 5.5 in Claude Code, running inside T3 Code. |
nixpkgs still ships 0.0.40, and I want the context window indicator moved out of legacy settings (pingdotgg/t3code#12095) and the chat width setting (pingdotgg/t3code#11594) before they are merged. Both are rebased onto v0.0.43-preview.20260925.2240 and carried as patches. The preview centralised the chat column on --chat-content-max-width, so the chat width setting now overrides that variable rather than introducing its own. The release moved to Electron 44, and its web build fetches SPDX license texts at build time, so the overlay seeds that cache from a pinned license-list-data checkout to keep the sandboxed build offline.
Adds a persisted chatWidth client setting with comfortable (default), wide, and full, so existing users keep the current layout.
The timeline and composer containers read --chat-max-width instead of a fixed max-w-3xl. The root sets data-chat-width from the client setting and CSS maps it to 48rem, 72rem, or 100%.
Settings → Appearance gets a Chat width selector with a reset action. It is searchable and included in Restore defaults.
The minimap gutter and hover-strip helpers assumed the chat column is capped at 768px. With the Wide or Full chat width, the real gutter is narrower or gone, so the 40px hover strip sat on top of the message text and swallowed its pointer events. Measure the rendered column instead and re-measure when the Chat width setting changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ters The previous and next turn buttons hang above and below the minimap strip and stayed clickable regardless of the strip's width cap. With Full chat width and overlay scrollbars they covered the first few pixels of message text. Make them inert to the pointer unless the gutter can hold them; keyboard focus still reaches them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
89f7d18 to
c1f0f25
Compare
Merges origin/main (a21b42c) into t3code/codex-turn-mapping so V2 carries main's fixes. A merge rather than a rebase keeps the 715 V2 commits and the stacked PRs on this branch intact. Conflict resolutions that change V2 code: - server.ts: keep V2's layer graph; add main's ReplayMarkers layer next to the other background layers. - serverRuntimeStartup.ts: keep V2's imports plus main's flushCompileCache. - bin.ts: keep V2's thin entry (the command list lives in binCli.ts). - ProjectionSnapshotQuery (V1): drop the second shell-snapshot decode (pingdotgg#13693); do not add listThreadsWithPullRequests (V2's PR sync does not read the V1 table it queries). - PullRequestSyncReactor, ThreadPullRequestService: keep V2's versions. - CursorDriver / cursorUsageLimits: keep V2's SDK-based driver and pass main's cursorKeychainUsageEnabled opt-in through to usage limits. Main's lowercase cursorCredentialStore.ts collides by case with V2's CursorCredentialStore.ts, so it becomes cursorKeychainToken.ts. - Chat width (pingdotgg#11594): keep V2's chat-content-lane markup; main's settings row sits next to V2's composer-context row. - pingdotgg#13590 env-mode label: V2's thread details panel now passes envMode through to BranchToolbar like the composer strip does. - Sidebar provider stack badge uses main's text-5xs token instead of V2's one-off 7px class (same size). - Deleted-in-V2 V1 files that main modified stay deleted. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…V2's chat lane Main's chat width setting sets --chat-max-width, which main's timeline and composer read. V2 sizes the same surfaces (chat-content-lane, the composer, and ChatCanvas's width probe that drives the preview layout) with --chat-content-max-width, so after the merge the setting was saved but changed nothing. Wide and Full now override V2's token; Comfortable keeps V2's default (46rem, close to main's 48rem). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The chat timeline and composer are capped at 48rem, so on a large monitor most of the window stays empty and wide content such as markdown tables has to scroll sideways.
This adds a Chat width setting under Settings → Appearance with three options: Comfortable (the current 48rem, still the default), Wide (72rem), and Full. It is a client setting, like diff colors. The root sets
data-chat-widthon<html>, CSS maps it to--chat-max-width, and the six chat containers that usedmax-w-3xlnow usemax-w-(--chat-max-width). The setting has a reset button, appears in settings search, and is included in "Restore defaults".Desktop picks this up through the web app. Mobile has no fixed-width chat column, so nothing changes there.
The commits are split for review: the contracts setting and its test, the layout change, then the settings control.
Screenshots use a seeded test thread.
Wide:
Setting:
Made with Claude Opus 5 in Claude Code, running inside T3 Code.
Summary by CodeRabbit