Skip to content

Animate project name completion in new threads#4214

Open
colonelpanic8 wants to merge 1 commit into
pingdotgg:mainfrom
colonelpanic8:t3code/incremental-project-completion
Open

Animate project name completion in new threads#4214
colonelpanic8 wants to merge 1 commit into
pingdotgg:mainfrom
colonelpanic8:t3code/incremental-project-completion

Conversation

@colonelpanic8

@colonelpanic8 colonelpanic8 commented Jul 20, 2026

Copy link
Copy Markdown

What changed

  • incrementally reveal the newly selected project name in the new-thread hero
  • preserve the shared prefix between project names and reserve the final label width to avoid layout shift
  • skip the animation for users who prefer reduced motion
  • cover shared-prefix and Unicode behavior with focused tests

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 check
  • vp run typecheck

Note

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 useIncrementalProjectTitle hook drives a character-by-character reveal (24ms steps) from a shared prefix between the old and new names. prefers-reduced-motion skips the animation and shows the full title immediately. The menu trigger uses an invisible full-title layer plus a visible animated layer in an inline-grid so 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

  • Adds a useIncrementalProjectTitle hook in DraftHeroHeadline.tsx that progressively reveals the project title from the shared prefix when the active project changes.
  • Uses a fixed-interval timer to append one Unicode code point at a time; skips animation when prefers-reduced-motion is set.
  • Renders two stacked layers in the MenuTrigger: an invisible full-title layer for stable layout sizing and a visible animated layer.
  • New incrementalTextCompletion.ts utilities handle Unicode-aware code point splitting and shared prefix detection, covered by unit tests.

Macroscope summarized 7c86b32.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 355081cd-d755-4f5f-9e35-2eec10b8d035

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jul 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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.

1 participant