Skip to content

Fix live sidebar resize limits and defer Alchemy runtime context - #4655

Merged
juliusmarminge merged 1 commit into
mainfrom
t3code/fix-sidebar-resize-limit
Jul 27, 2026
Merged

Fix live sidebar resize limits and defer Alchemy runtime context#4655
juliusmarminge merged 1 commit into
mainfrom
t3code/fix-sidebar-resize-limit

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Track viewport width changes so sidebar resize limits update live.
  • Resolve Alchemy runtime context through Effect layers when Cloudflare bindings are used.
  • Simplify worker layer wiring and remove obsolete runtime-context construction tests.

Testing

  • Not run.

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.innerWidth read on render.

AppSidebarLayout subscribes to viewport width via useSyncExternalStore and a resize listener, then passes that value into resolveThreadSidebarMaximumWidth for the sidebar resizable.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 AppSidebarLayout

Previously, sidebarMaximumWidth was computed once at mount using window.innerWidth, so resizing the browser window had no effect. This replaces the one-time read with useSyncExternalStore, subscribing to window resize events so sidebarMaximumWidth stays current as the viewport changes.

Macroscope summarized efe6301.

@coderabbitai

coderabbitai Bot commented Jul 27, 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: c511a49e-b00b-43ea-997f-cf73d37503ad

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
  • Commit unit tests in branch t3code/fix-sidebar-resize-limit

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jul 27, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Approvability

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

@juliusmarminge
juliusmarminge merged commit da11342 into main Jul 27, 2026
16 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/fix-sidebar-resize-limit branch July 27, 2026 16:07
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Jul 27, 2026
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 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.

1 participant