feat(web): add thread width and fit tables controls - #12785
rohan-patnaik wants to merge 3 commits into
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces persistent thread-width and table-fitting controls that affect the header, message layout, composer, and Markdown table rendering across the web client. Fit tables is enabled by default, changing existing table behavior for users without a saved preference, so the scope and default change merit human review. You can add or adjust custom eligibility rules. Learn more. |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 (4)
🚧 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 chat header now exposes persisted thread-width and Fit tables controls. Width state updates the chat content and composer through a CSS variable. Markdown tables use fit-mode sizing and wrapping when enabled. ChangesThread width and table fitting
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant User
participant ThreadWidthControl
participant useThreadWidth
participant ChatView
participant MarkdownTable
User->>ThreadWidthControl: adjust width or Fit tables
ThreadWidthControl->>useThreadWidth: persist preference
ChatView->>useThreadWidth: read thread width
ChatView->>ChatView: apply content width
MarkdownTable->>useThreadWidth: read Fit tables
MarkdownTable->>MarkdownTable: apply table sizing and toggle behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 61.54% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 9 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Addressed the default-behavior concern in 2d83bec: Fit tables is now opt-in, with existing saved choices preserved. Added regression coverage and docs for the new helpers; 65 focused tests, web typecheck, and scoped lint pass. Width and Fit tables remain together. The blanket docstring-coverage warning is advisory; I kept comments focused on the new behavior rather than documenting unrelated existing components. |
|
Supporting the need, and a Width control in the thread header is a nicer home for this than a settings row — 5% steps plus Fit tables is more useful than three presets. Same gap as #11594: |
Messages and the composer stay capped at 48rem on wide screens, while long table cells can require horizontal scrolling. This adds a theme-aware Width popover in the thread header: 0–100% in 5% steps, with a persistent Fit tables toggle alongside it.
0% preserves the original width; 100% uses the available chat pane. Nested composer surfaces inherit the outer width without applying the expansion again. Fit tables is opt-in (off by default), wraps cells when enabled, and retains a readable minimum per column with horizontal overflow for larger tables. Turning it off restores the existing table expansion state.
Closes #12784.
Related: Discussion #10925, #11594. This proposes a header control with finer adjustment and table fitting as an alternative to Comfortable/Wide/Full in Settings.
Control, intermediate width, and right-panel screenshots
Validation: 65 focused width/preference and Markdown tests passed; web typecheck passed; scoped lint completed with existing warnings. Cua Driver verified every 5% increment, the midpoint, reload persistence for both preferences, restoration of collapsed table state after toggling Fit tables, and reflow with the right panel open. Screenshots use synthetic content in an isolated dev app.
Applies to web and the shared desktop UI. Preferences are device/browser-local, including remote connections; no provider or wire-contract changes. Native mobile is unchanged. Desktop shell and native mobile were not separately exercised.
Implemented with GPT-6 Astra (medium), Codex harness in T3 Code.
Summary by CodeRabbit
New Features
Documentation