📝 Walkthrough
Walkthrough
The chat composer now supports a desktop resting state for existing threads. Timeline scrolling collapses the composer, while editing, focus, and control interaction expand it. Compact controls can render in the branch toolbar, with updated selection tracking, event handling, sizing, tests, and documentation.
Changes
Chat composer resting flow
| Layer / File(s) | Summary |
|---|---|
Resting layout and control contracts apps/web/src/components/composerFooterLayout.ts, apps/web/src/components/chat/ComposerControl.tsx, apps/web/src/components/chat/composerEventScope.ts | Adds resting-layout predicates, transition checks, compact control sizes, separators, and composer event-scope helpers. |
Compact control consumers apps/web/src/components/chat/CompactComposerControlsMenu.tsx, apps/web/src/components/chat/ProviderModelPicker.tsx, apps/web/src/components/chat/TraitsPicker.tsx, apps/web/src/components/chat/composerProviderState.tsx | Threads compact sizing and trigger styling through provider, traits, and overflow controls. |
Editor selection and scroll gestures apps/web/src/components/ComposerPromptEditor.tsx, apps/web/src/components/composerSelection.ts, apps/web/src/components/chat/composerScrollGesture.ts | Tracks visible selection changes and provides threshold-based scroll gesture state for composer collapse. |
Composer resting runtime apps/web/src/components/chat/ChatComposer.tsx, apps/web/src/components/chat/*test.ts | Adds animated resting transitions, desktop scroll collapse, focus and pointer handling, compact footer rendering, portaled controls, and supporting tests. |
Toolbar integration and documentation apps/web/src/components/BranchToolbar*.tsx, apps/web/src/components/ChatView.tsx, docs/user/composer.md | Registers the resting-controls host, connects the timeline node, adjusts toolbar sizing, and documents resting behavior. |
Estimated code review effort: 4 (Complex) | ~60 minutes
Merge Risk: 🔵 Low · up to 4c9d5
The PR introduces a compact resting state for existing-thread desktop composers, but the documentation currently describes resting behavior as possible while attachments remain present. This could mislead users about the composer layout; the change is otherwise mergeable with explicit follow-up to correct the documentation and tighten the test helper.
Sequence Diagram(s)
| 1 | sequenceDiagram |
| 2 | participant ChatView |
| 3 | participant BranchToolbar |
| 4 | participant ChatComposer |
| 5 | participant Timeline |
| 6 | participant ComposerPromptEditor |
| 7 | participant ControlsHost |
| 8 | ChatView->>BranchToolbar: register resting controls host |
| 9 | ChatView->>ChatComposer: provide timeline scrollable node |
| 10 | Timeline->>ChatComposer: report wheel input |
| 11 | ChatComposer->>ChatComposer: collapse after eligible gesture threshold |
| 12 | ChatComposer->>ControlsHost: portal compact controls |
| 13 | ComposerPromptEditor->>ChatComposer: report edit or visible selection |
| 14 | ChatComposer->>ChatComposer: expand composer |
Suggested reviewers: juliusmarminge, t3dotgg
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 22 files. (1 skipped: … | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| 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. |
| Title check | ✅ Passed | The title clearly summarizes the primary change: collapsing the composer into a resting state on the web. |
| Description check | ✅ Passed | The description includes the required What Changed, Why, UI Changes, and Checklist sections. It provides detailed behavior, rationale, before-and-after screenshots, an interaction video, and completed… |
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 22 files. (1 skipped: 1 unsupported.)
Full details: Description check
Explanation
The description includes the required What Changed, Why, UI Changes, and Checklist sections. It provides detailed behavior, rationale, before-and-after screenshots, an interaction video, and completed checklist items.
- Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Comment @coderabbitai help to get the list of available commands.