Skip to content

feat(web): add thread width control for orchestrator V2 - #15109

Closed
rohan-patnaik wants to merge 5 commits into
pingdotgg:mainfrom
rohan-patnaik:feat/thread-width-v2
Closed

rohan-patnaik wants to merge 5 commits into
pingdotgg:mainfrom
rohan-patnaik:feat/thread-width-v2

Conversation

@rohan-patnaik

Copy link
Copy Markdown

Problem

The existing Appearance → Chat width presets control the conversation and composer, but changing width requires leaving the thread and offers only three choices. Wide-screen conversations need finer adjustment while keeping the current Appearance choice as the default.

Change

Adds a header Width control with 0–100% expansion in 5% steps. 0% inherits Appearance; intermediate values expand from that preset; 100% fills the available pane. The device-local preference persists across threads and reloads.

Rebuilt on orchestrator V2 main fed41fa88, including #2829. The control feeds V2’s existing --chat-content-max-width contract so the timeline, composer and ChatCanvas width probe use the same setting. Nested composer surfaces fill the outer lane. Minimap measurements observe the mounted column, reacquire virtualized replacements, and refresh when width changes.

Scope and approval

Replaces #12785, following the maintainer’s request for a fresh implementation and verification on V2. Refs #12784 for its width request; its separate Fit tables request remains outside this PR.

This follows the focused configuration route: #11594 established configurable conversation width. This control adjusts that same sizing capability, preserves the default Appearance behavior, and leaves Markdown/table behavior intact. The minimap observation and shared width contract are needed to keep the existing layout and pointer targets correct while adjusting width.

Verification

  • vp test run apps/web/src/hooks/useThreadWidth.test.tsx apps/web/src/components/chat/{observeTimelineColumn,MessagesTimeline.logic,chatCanvasLayout,timelineMinimapItems}.test.ts: 172 tests pass. Covers preference sharing/persistence/normalization, mounted-column replacement and cleanup, timeline/minimap logic and V2 canvas geometry.
  • Ten changed files pass vp fmt --check. Scoped vp lint reports zero errors; all 104 component warnings match unchanged main after line-number normalization.
  • Web typecheck was run against this branch and unchanged fed41fa88: both report the same 140 diagnostics in unrelated tests, principally @effect/vitest exports. No additional diagnostics from this change; the full web typecheck is not green.
  • Real Chromium verification against the isolated V2 dev app: slider/button 5% steps, navigation and reload persistence, all three Appearance presets, 0/25/50/75/100% expansion, and 720/1280/1920px viewports. All 45 sizing combinations stay within the pane. At 1920px, Comfortable gives matching conversation/composer widths of 736px, 1180px and 1624px at 0%, 50% and 100%; opening the right panel reduces both to 1084px. At full width the minimap hit strip ends at the message lane’s left edge, so it does not cover message content. No page runtime errors.
Before: unchanged V2 main, Comfortable After: 100% width on V2
Original V2 conversation width Expanded V2 conversation and composer

Width control at 100% · With a side panel open · 12-second interaction recording

All evidence uses synthetic content at 1920×1080 in an isolated dev environment. No provider prompts were sent. Applies to the web UI and the desktop UI that embeds it; the native desktop shell and React Native client were not separately exercised. The preference stays local to the device/browser origin and introduces no provider or wire-contract changes.

Rebuilt and verified with GPT-6.1-Sol (high), Codex harness in T3 Code, adapting the width-only implementation from #12785.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Oct 3, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces a persisted thread-width capability with new controls, cross-component layout changes, and production minimap measurement logic. The default remains unchanged, but the scope and runtime interaction across the conversation UI are substantial enough to warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 3, 2026 — with ChatGPT Codex Connector
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →Review in Change Stack →

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 20c18daa-8ff6-44c2-89bf-7ecaa19d76f3

📥 Commits

Reviewing files that changed from the base of the PR and between aa4ea2c and 14d4bfa.


📒 Files selected for processing (6)
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/chat/ChatHeader.tsx
  • apps/web/src/components/chat/MessagesTimeline.tsx
  • apps/web/src/components/chat/observeTimelineColumn.test.ts
  • apps/web/src/components/chat/observeTimelineColumn.ts
  • apps/web/src/index.css

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.



📝 Walkthrough

Walkthrough

The chat header now includes controls for adjusting thread width. The selected width is normalized and stored on the device. It affects chat sizing and triggers timeline measurement updates.

Changes

Thread Width Control

Layer / File(s) Summary
Thread-width preference and sizing
apps/web/src/hooks/useThreadWidth.ts, apps/web/src/hooks/useThreadWidth.test.tsx, apps/web/src/index.css
Adds a device-local width preference, five-percent normalization, and styles based on the configured chat width. Tests cover sizing, persistence, storage events, and bounds.
Width control and chat integration
apps/web/src/components/chat/ThreadWidthControl.tsx, apps/web/src/components/chat/ChatHeader.tsx, apps/web/src/components/ChatView.tsx, docs/user/composer.md
Adds range and step-button controls to the chat header. ChatView applies the selected width to the chat column and sets the composer content width. Documentation describes the control and its persistence.
Timeline measurement and gutter updates
apps/web/src/components/chat/observeTimelineColumn.ts, apps/web/src/components/chat/MessagesTimeline.tsx, apps/web/src/components/chat/observeTimelineColumn.test.ts
Adds an observer for timeline-column changes and uses its measurements in the existing minimap and overflow calculations. Tests cover replacement, resizing, removal, and observer cleanup.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant ThreadWidthControl
  participant useThreadWidth
  participant LocalStorage
  participant ChatView
  participant MessagesTimeline
  participant observeTimelineColumn
  User->>ThreadWidthControl: Selects a thread width
  ThreadWidthControl->>useThreadWidth: Sets the width
  useThreadWidth->>LocalStorage: Stores normalized preference
  ChatView->>useThreadWidth: Reads thread-width preference
  ChatView->>ChatView: Applies thread-width style
  MessagesTimeline->>useThreadWidth: Reads thread-width preference
  MessagesTimeline->>observeTimelineColumn: Starts timeline measurement
Loading

Suggested reviewers: stienswout


Merge Risk | ⚪ Minimal · up to 14d4b

Merge Risk: ⚪ Minimal · up to 14d4b

No confirmed thread-width defect remains. Maintainer approval and workflow authorization are still needed before merge.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 14d4b

The new setting controls presentation only. Its values are bounded, and the reviewed changes do not expand access to thread data, credentials, or privileged actions.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The effective scope of the new preference is chat presentation across threads and same-origin windows using the same browser storage. The inspected changed consumers route it into width styles and minimap geometry, not into service requests or privileged operations.

Trust Boundaries and Controls

  • observed — Local-storage contents are treated as unknown input. Only finite numbers survive normalization, and values are rounded to five-percent steps and clamped between zero and 100. The style helper normalizes again before constructing fixed CSS expressions, preventing stored strings or objects from becoming arbitrary style text through this path.

Resilience and Maintainability Implications

  • observed — The existing persistence hook falls back to the initial value on read or decode failure, catches update failures, and removes notification listeners on unsubscribe. Writes precede same-window notification. These are local preference operations without a multi-service commit or authority transition; failed persistence can leave the previous setting in place.

Pre-merge checks | Passed 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the main change: a web thread-width control for orchestrator V2. It is concise and uses the repository's conventional commit format.
Description check Passed The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the behavior, approval basis, focused tests, manual UI checks, screenshots, recording, kno…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Rohan Patnaik <rohan-patnaik@users.noreply.github.com>
@rohan-patnaik

Copy link
Copy Markdown
Author

Merged current V2 main into ecaa692, preserving the new upstream 17.5rem details panel width and the thread-width contract. The four currently available width/observer/timeline/minimap suites pass all 156 tests; scoped formatting and lint pass (existing component warnings remain). GitHub confirms the exact head is mergeable. Macroscope’s eligibility decision still needs maintainer review; this merge does not claim approval.

Signed-off-by: Rohan Patnaik <rohan-patnaik@users.noreply.github.com>
@rohan-patnaik

Copy link
Copy Markdown
Author

Merged current main (0f4f02abb) into the existing branch as 12e3d94cf. The import conflict retains both the width control and upstream permission-gated header behavior. All 156 focused width/measurement/timeline tests, web typechecking and scoped formatting pass; scoped lint has no errors and two existing upstream warnings.

@rohan-patnaik

Copy link
Copy Markdown
Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-merge checks failed. Please resolve the failing checks before merging.

@rohan-patnaik

Copy link
Copy Markdown
Author

@coderabbitai Could you enumerate every failed pre-merge check on current head 12e3d94cf740c3be2a87cbd522d46c3ff937580c, with the reason and required action for each? Your summary lists Approvability while reporting no actionable code findings. Please confirm whether any author-side code, test, or PR-description changes are required, or whether the remaining blocker is solely maintainer approval of the thread-width workflow. If there are code defects, please cite the relevant paths and expected behavior.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -u
repo=pingdotgg/t3code
sha=12e3d94cf740c3be2a87cbd522d46c3ff937580c
echo '=== PR state ==='
gh pr view 15109 --repo "$repo" --json url,headRefOid,baseRefOid,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup,body
echo '=== Exact commit check runs ==='
gh api --paginate "repos/$repo/commits/$sha/check-runs?per_page=100" --jq '.check_runs[] | {id,name,status,conclusion,head_sha,details_url,output}'
echo '=== Exact commit statuses ==='
gh api --paginate "repos/$repo/commits/$sha/statuses?per_page=100" --jq '.[] | {context,state,description,target_url,created_at}'
echo '=== PR reviews ==='
gh api --paginate "repos/$repo/pulls/15109/reviews?per_page=100" --jq '.[] | {user:.user.login,state,commit_id,submitted_at,html_url,body}'
echo '=== PR comments ==='
gh api --paginate "repos/$repo/issues/15109/comments?per_page=100" --jq '.[] | {user:.user.login,created_at,html_url,body}'
echo '=== Inline review comments ==='
gh api --paginate "repos/$repo/pulls/15109/comments?per_page=100" --jq '.[] | {user:.user.login,path,line,commit_id,html_url,body}'

Length of output: 31126


@rohan-patnaik I checked the GitHub records for current head 12e3d94cf740c3be2a87cbd522d46c3ff937580c.

There is one failed CodeRabbit pre-merge check: Approvability. It is an approval-policy requirement, not a code defect. The review requires no author-side code, test, or PR-description changes.

Failed pre-merge checks

Check Reason Required action
Approvability The change matches the rule “Adds a subsystem or user workflow.” The header control, persistent preference, and layout integration constitute a new thread-width workflow. A maintainer must review the workflow and approve the PR before merge.

The paths in that explanation identify the feature scope:

  • apps/web/src/components/chat/ThreadWidthControl.tsx
  • apps/web/src/hooks/useThreadWidth.ts
  • apps/web/src/components/ChatView.tsx

Those paths are not defect findings. The review identifies no incorrect behavior or required implementation change. See the full pre-merge explanation.

The other four CodeRabbit pre-merge entries passed: Title, Description, Linked Issues, and Out of Scope Changes. The last two passed through skips because no linked issues were found.

GitHub checks on this exact head

No published GitHub check run has a failure conclusion. The latest CodeRabbit commit status is success (“Review completed”). Five check runs are skipped:

Skipped check Recorded reason Required action
Macroscope — Approvability Check “No code changes (prior analysis still applies).” Its retained verdict is Not approved, based on eligibility alone. Maintainer review of eligibility and feature scope. The verdict does not identify a code fix.
Macroscope — Correctness Check “Diff unchanged since last completed correctness review.” No author-side action specified.
Macroscope — Effect Service Conventions Prerequisite check named Check did not appear within one minute. If this check must run, a maintainer must investigate the missing prerequisite or check configuration.
Macroscope — UI Consistency Same missing Check prerequisite. Same conditional maintainer action.
Sync PR size label definitions No reason supplied in the check output. No author-side action specified.

The remaining four check runs succeeded.

What blocks merge

GitHub reports MERGEABLE, but also BLOCKED and CHANGES_REQUESTED. The only submitted review is CodeRabbit’s changes-requested review, which cites the pre-merge check failure.

Maintainer approval is the sole failed requirement identified by CodeRabbit’s review. Macroscope also retains an eligibility rejection. The skipped prerequisite-dependent checks mean I cannot certify that maintainer approval alone will satisfy every repository merge rule.

My generic “Please resolve the failing checks” wording was too broad. It did not mean that you must change code, add tests, or rewrite the PR description. No code defect is recorded in the current review.

You are interacting with an AI system.

@rohan-patnaik

Copy link
Copy Markdown
Author

Thanks for clarifying. For 12e3d94cf, CodeRabbit requests no author-side code, test or description changes. Approvability and Macroscope’s retained eligibility verdict require maintainer review of the thread-width workflow.

Separately, CI, Web Preview, Mobile Fingerprint Check and Mobile EAS Preview all report action_required with zero jobs. Scope approval and workflow execution authorization remain outstanding. If the skipped Macroscope checks are required, their missing Check prerequisite also needs maintainer investigation. The PR remains blocked pending those upstream decisions.

@rohan-patnaik

Copy link
Copy Markdown
Author

Merged current main (43f8a8de) in aa4ea2cc. The import conflict keeps the width control alongside upstream in-thread search. All 99 focused width, measurement, timeline and search tests pass, as do web typechecking and scoped formatting. Lint has no errors and existing warnings. An independent review also passed all 99 tests.

These checks reused existing dependencies; I have not run a fresh install or a new UI/mobile pass. Scope approval and workflow authorization still need maintainer action.

@rohan-patnaik

Copy link
Copy Markdown
Author

Merged current main in 14d4bfa6. The timeline still follows mounted column replacements and now uses the shared resize observer. All 255 focused width/timeline tests, web typecheck and scoped formatting pass; lint has no errors and existing component warnings. Hosted checks and feature approval still need maintainers.

Maintenance by GPT-6.1-Sol via Codex.

@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Thanks for revisiting thread width on V2. This adds a persistent header slider and finer width choices to the existing Appearance presets. The guide permits focused configuration, and your description cites a maintainer request, so this closure reflects our narrower current review capacity under Read this first. Right now we are only taking focused bug fixes from outside contributors. Please return to the linked discussion for an explicit maintainer decision to take this enhancement before requesting reconsideration.

@maria-rcks maria-rcks closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants