Fix live sidebar resize limits and defer Alchemy runtime context - #4655
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 Plus 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)
Comment |
ApprovabilityVerdict: Approved Straightforward bug fix using standard React patterns to make sidebar width constraints respond to window resizes. Self-contained UI change with no security or schema implications. You can customize Macroscope's approvability policy. Learn more. |
## What's Changed * feat(web): prompt stash — cmd+S saves the composer to a per-provider queue by @t3dotgg in pingdotgg/t3code#4453 * [codex] Upgrade Effect and Alchemy betas by @juliusmarminge in pingdotgg/t3code#4643 * feat: allow new thread creation through project breadcrumbs by @0x4bs3nt in pingdotgg/t3code#4638 * fix(web): scope PR state to the thread branch by @juliusmarminge in pingdotgg/t3code#4460 * Drop redundant Relay user indexes by @juliusmarminge in pingdotgg/t3code#4648 * feat(connect): release the Cloudflare tunnel when the environment shuts down by @juliusmarminge in pingdotgg/t3code#4531 * Fix Relay Worker RuntimeContext wiring by @juliusmarminge in pingdotgg/t3code#4653 * Fix live sidebar resize limits and defer Alchemy runtime context by @juliusmarminge in pingdotgg/t3code#4655 **Full Changelog**: pingdotgg/t3code@v0.0.29-nightly.20260727.919...v0.0.29-nightly.20260727.921 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.29-nightly.20260727.921
Summary
Testing
Note
Low Risk
Small UI/layout change in sidebar sizing with no auth, data, or API impact.
Overview
Thread sidebar resize limits now follow live window width instead of a one-time
window.innerWidthread on render.AppSidebarLayoutsubscribes to viewport width viauseSyncExternalStoreand aresizelistener, then passes that value intoresolveThreadSidebarMaximumWidthfor the sidebarresizable.maxWidth. That fixes cases where the max clamp stayed stale after resize—or when a drag ended clamped without changing width, so no re-render refreshed the old snapshot.Reviewed by Cursor Bugbot for commit efe6301. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix live sidebar resize limits by subscribing to viewport width changes in
AppSidebarLayoutPreviously,
sidebarMaximumWidthwas computed once at mount usingwindow.innerWidth, so resizing the browser window had no effect. This replaces the one-time read withuseSyncExternalStore, subscribing towindowresize events sosidebarMaximumWidthstays current as the viewport changes.Macroscope summarized efe6301.