Skip to content

fix(web): clean up composer resize animation - #6209

Merged
juliusmarminge merged 4 commits into
pingdotgg:mainfrom
extoci:fix/composer-tools-sidebar-animation
Aug 11, 2026
Merged

fix(web): clean up composer resize animation#6209
juliusmarminge merged 4 commits into
pingdotgg:mainfrom
extoci:fix/composer-tools-sidebar-animation

Conversation

@extoci

@extoci extoci commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • Move composer context controls together when the right sidebar changes the available width.
  • Use an interruptible 180 ms FLIP animation for fast open and close reversals.
  • Keep horizontal paint inside the toolbar while preserving vertical overflow.
  • Truncate long labels before they reach the chevrons.
  • Use opacity only when reduced motion is enabled.

Why

The old animation changed label width over 300 ms while the surrounding controls moved at a different speed. This made the toolbar feel disconnected.

Controls could also paint outside the composer during the transition. In narrow layouts, long labels could overlap their chevrons.

The new animation moves the controls and labels together. It stays inside the toolbar and handles quick direction changes without removing the animation.

UI Changes

  • Before video:
before.mov
  • After video:
after.mov

Verification

  • vp test run apps/web/src/components/BranchToolbar.logic.test.ts apps/web/src/components/composerFooterLayout.test.ts
  • vp run --filter @t3tools/web typecheck
  • Targeted lint and formatting for the four changed components
  • Manual open, close, and rapid-reversal checks in the web client

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before and after videos for the animation change

Note

Low Risk
UI-only animation and layout tweaks in the composer toolbar; no auth, data, or API changes.

Overview
Replaces the composer context strip’s 300ms label width fade with a coordinated compact/expand transition so environment, workspace, and branch controls move together when width changes (e.g. sidebar resize).

useLabelsOverflow now snapshots [data-composer-context-control] rects before toggling compact state and runs a 180ms FLIP translate3d animation in useLayoutEffect, with prior animations cancelled for quick reversals and no motion when prefers-reduced-motion. Labels use an outer data-composer-label shell (max-width collapse) plus an inner data-composer-label-motion span for opacity/transform; reduced motion keeps opacity-only transitions.

The context strip gains overflow-x-clip to contain horizontal paint during transitions. Child selectors mark controls with data-composer-context-control (including the vertical separator between environment and git controls).

Reviewed by Cursor Bugbot for commit 7755d24. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add FLIP-style reposition animation to composer toolbar compact/expand transitions

  • Adds animation to the composer-context controls in BranchToolbar when the toolbar switches between compact and expanded states, using a FLIP approach (record pre-change rects, apply translate3d from old to new positions).
  • Updates BranchToolbarBranchSelector, BranchToolbarEnvModeSelector, and BranchToolbarEnvironmentSelector to opt into the animation via data-composer-context-control and to wrap label content in data-composer-label-motion spans for smoother label collapse.
  • Animation is skipped when prefers-reduced-motion is set.

Macroscope summarized 7755d24.

@coderabbitai

coderabbitai Bot commented Aug 11, 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 Plus

Run ID: c06a1798-4e73-4ff2-8665-c1099a6202a6

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

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 size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Aug 11, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit aa54a6a. Configure here.

Comment thread apps/web/src/components/BranchToolbarEnvModeSelector.tsx
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 11, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 7755d24

Pure UI animation polish for the composer toolbar's compact/expand transition. Adds smooth FLIP animations for control repositioning, respects prefers-reduced-motion, and makes no changes to business logic or data handling.

You can customize Macroscope's approvability policy. Learn more.

Mark the locked workspace span as a composer context control so FLIP measurements include it when nearby labels collapse.
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 11, 2026 19:10

Dismissing prior approval to re-evaluate 7755d24

@juliusmarminge
juliusmarminge merged commit c196f42 into pingdotgg:main Aug 11, 2026
18 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 12, 2026
## What's Changed
* fix(web): clean up composer resize animation by @extoci in pingdotgg/t3code#6209
* feat(web): compact sidebar footer actions by @maria-rcks in pingdotgg/t3code#6210
* fix(web): keep sidebar wordmark visible at minimum width by @extoci in pingdotgg/t3code#6246


**Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260811.1071...v0.0.34-nightly.20260812.1072

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260812.1072
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants