Skip to content

fix(web): closing settings preserves thread navigation history - #23228

Draft
juliusmarminge wants to merge 6 commits into
mainfrom
fix/issue-16542
Draft

juliusmarminge wants to merge 6 commits into
mainfrom
fix/issue-16542

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Problem

Open thread A, then B, open and close Settings, then use navigation Back. Back returned to Settings instead of A because closing Settings pushed a duplicate B history entry. Reproduced in the real Linux web app on a12d6ed942, using Ctrl+[ as the reported macOS Cmd+[ equivalent.

Change

Remember the last main-app history position and traverse to that existing entry when leaving a utility page. When traversal could have overwritten the remembered entry, keep the existing href fallback. The shared hook covers Settings Back/Escape and sidebar Back on Usage, Pull Requests, and project settings. Browser history is not globally filtered.

Include deterministic stopped-thread fixtures and capture helpers as required by the triage evidence workflow; no provider turns are started.

Scope and approval

Fixes #16542
GitCafe: https://git.cafe/pingdotgg/t3code/issues/16542
Triaged bug via the automated issue flow: #16542. No merge authorization; dispatcher/Julius owns landing. Native macOS/Electron needs verification.

Verification

  • Regression failed on base: expected A after closing Settings then Back, got Settings. A second red regression covered an overwritten remembered history entry (expected A, got Usage).
  • cd apps/web && vp test run --project browser src/components/sidebar/mainAppLocation.browser.test.tsx: 2/2 pass, 15.62 seconds.
  • Changed-file lint and formatting: pass, including fixture scripts. vp run --filter @t3tools/web typecheck: pass with existing Effect suggestions.
  • Primary integrated real-app check on 5f983b4e2c: A(1) → B(2) → Settings(3) → Back B(2) → Ctrl+[ A(1) → Ctrl+] B(2). Runtime transcript.
  • Fresh isolated GPT-6.1-Sol and Claude Opus 5.5 reviewers: both MERGE, no confirmed production regressions.

Evidence — partial, strict capture contract incomplete. Index and all recordings, fixture matrix, authoritative manifest, all visible differences.

Script: A → B → Settings → sidebar Back → history Back → Forward → further Forward. Per-action timestamps and narrated checkpoints are in each recording's JSON in the index. Before is a12d6ed942; inherited after runtime is 915e03dc90, with identical navigation code at 5f983b4e2c. The new revalidation recording and primary transcript use merged head. Inherited artifacts do not prove an exact final-head rebuild.

Desktop light, history Back checkpoint Before After Diff0 (8×) DiffT (>16/255)
Chromium/Linux, DPR 2; video 2880×1800, still 1280×800 Before: Back stops on Settings After: Back reaches thread A Zero-threshold amplified difference Threshold 16 difference
Runtime SHA a12d6ed942 915e03dc90 same pair same pair
Recording Before After

What else changed: history Back now shows thread A and its sidebar selection/composer instead of Settings. Inherited same-route pairs also contain clock/layout drift; 64 same-href checkpoints have nonzero pixel deltas. No claim of pixel-identical rendering is made. 204 paired checkpoints include zero and threshold differences; 84 are zero-identical. Videos were decoded at first/middle/last frames; MP4 extensions correct the inherited filenames.

Unverified: strict 1440/390 × light/dark × DPR1 geometry and frozen-clock gates; cross-utility chains; complete project-alias coverage; real-app truncation/equality/conservative invalidation and cold/reload lifecycle; baseline/other-profile revalidation pairs; exact final-head paired rebuild. The regression tests cover truncation logic. Usage captures show empty limits, PR captures an unavailable-tool state. Native macOS Cmd+[ / Cmd+], Electron/hash history, and remote/relay/tunnel remain unverified. React Native mobile is unaffected. An initial hash-pairing attempt produced invalid history indices and failed the flow; it is excluded from pass claims, while a fresh tab paired through the form passed with finite indices. Proof audit pass 2: INSUFFICIENT A1–A8. The auditor independently rebuilt the core head flow successfully and confirmed the served hook matches head; all 204 pixel counts recompute. Required variants/pairings, strict geometry/DPR/clock, and the exact-head paired rebuild remain incomplete. The capture report’s “opaque sources” claim is incorrect: 102 paired source references include alpha below 255. Keep this PR draft for dispatcher/Julius; it is not merge-ready.

Models: Claude Opus 5.5 and GPT-6.1-Sol through T3 Code (Claude Agent and Codex harnesses).

juliusmarminge and others added 6 commits October 21, 2026 23:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closing Settings, Usage, or Pull Requests pushed a fresh copy of the last
main app entry, so Back from it landed on the utility page again. Step
back through history to the entry the page was opened from instead, and
fall back to pushing it when there is no earlier entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry may be gone

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 5f983b4.

This comment will update automatically after the next completed run.

@juliusmarminge juliusmarminge added bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed and removed pr:gate-failed A land gate failed labels Oct 22, 2026
@juliusmarminge juliusmarminge added the pr:needs-julius Needs Julius: route gate, unverifiable surface, or blocked label Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix PR opened by an issue lead; enters the PR loop pr:needs-julius Needs Julius: route gate, unverifiable surface, or blocked size:L 100-499 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.

[Bug]: Cmd+[ / Cmd+] back/forward stops on the Settings page instead of skipping to threads

1 participant