Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped, well-tested web bug fix that prevents stale or incomplete shell snapshots from redirecting valid thread links. Existing redirect behavior remains intact after the shell becomes live, with no schema, infrastructure, security, billing, or static-analysis changes. You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThread route readiness now uses snapshot status to determine bootstrap completion. Available server-thread details and local drafts can render as ready while the shell snapshot is cached or synchronizing. ChangesThread route readiness
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to Missing-thread redirects now wait for initial shell catch-up, reducing redirects caused by stale cached snapshots. No material merge risk introduced by this change remains. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change preserves environment-specific thread identity and avoids redirects based on stale data. No authorization bypass was established, but cached deleted-thread behavior and file cleanup during failed synchronization remain partly unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Dismissing prior approval to re-evaluate 38d9384
Opening a link to a thread created since the client's last visit redirected to an unrelated thread: the route treated any shell snapshot, including the stale cache, as authoritative and reported the thread missing. Routes now decide a thread is missing only once the environment shell is live. While it is cached or synchronizing, the link stays put, and thread detail or a local draft that has already loaded is shown. A sync error leaves the shell non-live, so it no longer redirects either. Fixes pingdotgg#14689 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
38d9384 to
4ed3c22
Compare
Dismissing prior approval to re-evaluate 4ed3c22
|
Review requested
Logged so this PR shows when a maintainer was asked to review it. |
Problem
Opening a link to a thread created since the web client's last visit (from another device, the CLI, or an agent) lands on an unrelated New thread. It stays there even after the thread appears in the sidebar. The route treated any shell snapshot as authoritative, including the cache saved from the last visit, so the thread read as missing and the route replaced the URL with
/(#14689). Desktop uses the same route.Change
ThreadRouteViewnow decides a thread is missing only once the environment shell's status islive, instead of as soon as any snapshot exists.resolveThreadRouteRenderStatereportsreadywhen thread detail or a local draft has already loaded, before it checks whether the shell is live. So:cachedorsynchronizing, the link stays on/<environmentId>/<threadId>. Already-loaded content is shown; otherwise the existing loading state remains.deletedleaves the route through the existing redirect.The shell synchronization in
packages/client-runtimeis unchanged. Mobile already waits for hydration and isn't affected.Scope and approval
Fixes #14689, the triaged bug, labelled
bugandvia-triage. The maintainer triage set the intended behavior this follows. It replaces #10604, which addressed the same web behavior but was closed for missing verification; GitHub didn't allow reopening it. This version is narrower: it drops #10604's change to legacy shell resubscription, which this fix doesn't need.Behavior left as it is on
main: a missing link in an environment with no threads still doesn't redirect once the shell is live, and a local draft still takes precedence over a confirmed deletion.Verification
Focused tests:
apps/webvp test run src/threadRoutes.test.ts, 16 passed. The new cases:Targeted lint, format, and the
@t3tools/webtypecheck passed.Reproduction (the #14689 scenario), run the same way on
mainb33eda1and on this branch:thread.create).Environment: headless Chromium 153 (chromium-headless-shell), 1280×800, macOS arm64, Node 24.12.0. An isolated local server ran with synthetic data, started from source with
node apps/server/src/bin.ts --mode web; this change doesn't touch server code. A small local proxy served each web build and passed traffic through unchanged; its only intervention was closing the sockets for step 5. T3's Browser panel was unavailable here ("No preview automation host is available"), so the capture was scripted. Recordings are real time, with no cuts or speed changes; GIFs are sampled at 10 fps. The "Codex update available" toast comes from the test server probing a local Codex CLI. The reconnect banner shows the test server's environment name.Before (
mainb33eda1): the link to Created elsewhere (main) is replaced by workspace / New thread by 3.1 s. It stays there after the shell is live and after reconnecting, while the target sits at the top of the sidebar.MP4 · Screenshot once the shell is live
Enlarged header once the shell is live (cropped from that screenshot):
After (this branch): the link to Created elsewhere (fix) shows that thread by 3.1 s, keeps it once the shell is live (selected in the sidebar), and keeps it through the socket drop and reconnect.
MP4 · Screenshot once the shell is live · Screenshot while reconnecting · Capture receipt
Enlarged header once the shell is live (cropped from that screenshot):
Not checked: the desktop app (it uses the same route), sync-error and deleted-thread paths in a real client (covered by the focused tests only), and relay/tunnel connections.
Original fix (#10604): GPT-5.6 Sol and GPT-6 Astra in the Codex harness. This narrowed fix, tests and evidence: Claude Opus 5.5 in Claude Code via T3 Code; browser capture driven by GPT-6 Astra; independent review by GPT-6.1 Sol (Codex harness via T3 Code).
🤖 Generated with Claude Code