Note
🤖 Claude Fable 5.1 on behalf of Oliver
ELI5#
When you scroll back to the bottom of a chat, the composer grows back to full size and the messages above it jump. Now they stay put.
Problem#
The composer rests on timeline scroll and expands again at the end. ChatView measures the composer overlay in layout effects and reserves that height as the timeline's end inset. The prompt's resting clamp classes travel through Tiptap's editorProps, and @tiptap/react forwards option changes to ProseMirror from a passive useEffect, one tick after those measurements. Every rest and expand measurement was therefore off by the prompt's own height change (38px): the reservation grew by 38px on rest and shrank by 38px on expand, which clamped scrollTop and yanked the last rows down.
Measured headless against a long thread: expanded overlay 238px, resting overlay 144px. Reserved inset went 238 → 276 on rest and 276 → 200 → 238 on expand, with scrollTop clamped at that moment. After the fix the inset stays at 238 throughout and scrollTop advances monotonically.
Fix#
ComposerPromptEditorTiptap memoizes the editor attributes and pushes them to the ProseMirror view from a useLayoutEffect, so the clamp classes are in the DOM before the composer measures. Going through view.setProps keeps ProseMirror's own class handling intact, and Tiptap's later passive sync sees identical attributes.
UI Changes#
Before

After

Made with Claude Fable 5.1 in Claude Code via T3 Code.
Summary by CodeRabbit#
- Bug Fixes
- Improved editor initialization and attribute updates for more consistent composer behavior.
- Reduced visual or state inconsistencies when the composer editor loads or updates.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
23491746-530e-4c17-86ca-7727a0c893b4📥 Commits
Reviewing files that changed from the base of the PR and between c14f6015bfe479d313355cb234af1a5c16dbb15f and f53315a14a523e761a12432f48eeec13d5076540.
📒 Files selected for processing (1)
apps/web/src/components/ComposerPromptEditorTiptap.tsxIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
The composer editor now memoizes its DOM attributes, reuses them during initialization, and synchronizes updated attributes with the initialized editor view in a layout effect.
Changes#
Composer editor attribute synchronization
apps/web/src/components/ComposerPromptEditorTiptap.tsxPriority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
juliusmarminge🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands.