Skip to content

fix(web): chat content keeps pace with sidebar resizing - #17383

Merged
maria-rcks merged 1 commit into
pingdotgg:mainfrom
flamboh:t3/sidebar-resize-transition
Oct 9, 2026
Merged

maria-rcks merged 1 commit into
pingdotgg:mainfrom
flamboh:t3/sidebar-resize-transition

Conversation

@flamboh

@flamboh flamboh commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Note

🤖 Opus 5.5 on behalf of Oliver

Problem

While you drag the left sidebar, the thread details card and the chat lane trail it by a frame and jitter side to side. ChatCanvas measures its width in a ResizeObserver and stores it in React state. React commits updates scheduled from an observer callback after the browser paints, so the card's left and the lane insets always land one frame late.

Fix

Wrap the observer callback in flushSync, so the layout update commits before paint. This runs the same render that already happened each frame, one frame earlier. #14094 applies the same fix to the preview panel's width hooks.

The sidebar's own width transition stays. It drives the collapse/expand animation and is already turned off during drag.

Validation

https://gh-file-drop-api-prod-galwoqjslzlnws6s.oliver-boorstein.workers.dev/f/4cea546b2729b14f/sidebar-resize-before-after.mp4

A per-frame sampler recorded the geometry of every element in the main area during a scripted drag. Before the fix, the details card was out of place at 22–29 of 31 widths. After it, no element was out of place. Ran targeted lint, format, and the apps/web typecheck.

Opus 5.5 via Claude Code in T3 Code

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 9, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 4b31c32

Macroscope's review found this PR approvable — This is a localized one-file fix that synchronizes existing resize measurements before paint, eliminating a visible frame of lag without adding capabilities, changing defaults, or altering broader application behavior.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 414a5352-fc03-4c1f-876e-3f13d7126986
📥 Commits

Reviewing files that changed from the base of the PR and between b707eeb and 4b31c32.

📒 Files selected for processing (1)
  • apps/web/src/components/chat/ChatCanvas.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

ChatCanvas now runs the existing measurement update synchronously for each ResizeObserver callback.

Changes

Canvas measurement

Layer / File(s) Summary
Synchronous resize measurement
apps/web/src/components/chat/ChatCanvas.tsx
ChatCanvas imports flushSync and uses it to run the measurement update in ResizeObserver callbacks.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: yash-singh1

Merge Risk: ⚪ Minimal · up to 4b31c

Canvas measurements now apply synchronously during resizing to address layout lag. No concrete regression is established, so no material merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: keeping chat content synchronized during sidebar resizing.
Description check Passed The description covers the problem, fix, validation results, UI recording, targeted checks, and agent disclosure. It does not use the exact Change and Verification headings and does not include a sepa…
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@maria-rcks
maria-rcks merged commit a669827 into pingdotgg:main Oct 9, 2026
30 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Oct 9, 2026
## What's Changed
* fix(web): Local environment switch stays reachable after turning it off by @ScottN-PV in pingdotgg/t3code#17359
* fix(web): keep chat banners inside the lane beside the docked details card by @macodev00 in pingdotgg/t3code#17094
* fix(web): settled and snoozed lines line up with the messages above them by @RakshithBhat03 in pingdotgg/t3code#17191
* fix(web): distinguish project filter from new project by @voltcrash in pingdotgg/t3code#12113
* feat(web): assign a thread details panel shortcut by @maria-rcks in pingdotgg/t3code#16694
* fix(web): chat content keeps pace with sidebar resizing by @flamboh in pingdotgg/t3code#17383
* refactor(provider-core): expose model metadata through a ModelCatalog port by @juliusmarminge in pingdotgg/t3code#17417
* refactor(provider-core): follow the Effect service conventions throughout by @juliusmarminge in pingdotgg/t3code#17427
* refactor(provider-core): latest-version lookups go through a ProviderLatestVersions service by @juliusmarminge in pingdotgg/t3code#17434
* refactor(provider-core): MCP provider sessions live in a McpProviderSessions service by @juliusmarminge in pingdotgg/t3code#17446
* refactor(provider): bring opencode, muse, pi, core and testing in line with Effect conventions by @juliusmarminge in pingdotgg/t3code#17542
* refactor(provider-acp): ACP, ACP Registry and Grok follow the Effect service conventions by @juliusmarminge in pingdotgg/t3code#17544
* refactor(provider-cursor): follow the Effect service conventions by @juliusmarminge in pingdotgg/t3code#17545
* fix(marketing): use app wordmark in header by @voltcrash in pingdotgg/t3code#13240
* fix(web): pr merge actions stay visible while the stack refreshes by @maria-rcks in pingdotgg/t3code#17559

## New Contributors
* @voltcrash made their first contribution in pingdotgg/t3code#12113

**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261009.2873...v0.0.46-nightly.20261009.2886

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261009.2886
github-actions Bot added a commit to davidvanderklay/t3code-flake that referenced this pull request Oct 9, 2026
## What's Changed
* fix(web): Local environment switch stays reachable after turning it off by @ScottN-PV in pingdotgg/t3code#17359
* fix(web): keep chat banners inside the lane beside the docked details card by @macodev00 in pingdotgg/t3code#17094
* fix(web): settled and snoozed lines line up with the messages above them by @RakshithBhat03 in pingdotgg/t3code#17191
* fix(web): distinguish project filter from new project by @voltcrash in pingdotgg/t3code#12113
* feat(web): assign a thread details panel shortcut by @maria-rcks in pingdotgg/t3code#16694
* fix(web): chat content keeps pace with sidebar resizing by @flamboh in pingdotgg/t3code#17383
* refactor(provider-core): expose model metadata through a ModelCatalog port by @juliusmarminge in pingdotgg/t3code#17417
* refactor(provider-core): follow the Effect service conventions throughout by @juliusmarminge in pingdotgg/t3code#17427
* refactor(provider-core): latest-version lookups go through a ProviderLatestVersions service by @juliusmarminge in pingdotgg/t3code#17434
* refactor(provider-core): MCP provider sessions live in a McpProviderSessions service by @juliusmarminge in pingdotgg/t3code#17446
* refactor(provider): bring opencode, muse, pi, core and testing in line with Effect conventions by @juliusmarminge in pingdotgg/t3code#17542
* refactor(provider-acp): ACP, ACP Registry and Grok follow the Effect service conventions by @juliusmarminge in pingdotgg/t3code#17544
* refactor(provider-cursor): follow the Effect service conventions by @juliusmarminge in pingdotgg/t3code#17545
* fix(marketing): use app wordmark in header by @voltcrash in pingdotgg/t3code#13240
* fix(web): pr merge actions stay visible while the stack refreshes by @maria-rcks in pingdotgg/t3code#17559

## New Contributors
* @voltcrash made their first contribution in pingdotgg/t3code#12113

**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261009.2873...v0.0.46-nightly.20261009.2886

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

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants