Animate project name completion in new threads#4214
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved This PR adds a self-contained UI animation for project name display in new threads. The changes are pure frontend polish with unit tests included, respect accessibility preferences, and have no backend or data implications. You can customize Macroscope's approvability policy. Learn more. |
What changed
Why
Selecting a different project in the new-thread experience replaced the project label in a single frame. Incremental completion makes the context change easier to follow while keeping the surrounding headline and composer stable.
Validation
vp test(web unit suite: 161 files, 1,376 tests)vp checkvp run typecheckNote
Low Risk
Presentation-only UI in the new-thread headline; no auth, data, or API changes.
Overview
The new-thread hero incrementally reveals the selected project name when you switch projects, instead of swapping the label in one frame.
A new
useIncrementalProjectTitlehook drives a character-by-character reveal (24ms steps) from a shared prefix between the old and new names.prefers-reduced-motionskips the animation and shows the full title immediately. The menu trigger uses an invisible full-title layer plus a visible animated layer in aninline-gridso the headline width stays fixed while the text animates.Shared-prefix and Unicode splitting logic lives in
incrementalTextCompletion.ts, with focused unit tests.Reviewed by Cursor Bugbot for commit 7c86b32. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Animate project name completion character-by-character in new thread hero headline
useIncrementalProjectTitlehook inDraftHeroHeadline.tsxthat progressively reveals the project title from the shared prefix when the active project changes.prefers-reduced-motionis set.MenuTrigger: an invisible full-title layer for stable layout sizing and a visible animated layer.incrementalTextCompletion.tsutilities handle Unicode-aware code point splitting and shared prefix detection, covered by unit tests.Macroscope summarized 7c86b32.