Repository navigation
feat(web): drop the legacy sidebar mode, matching upstream - #671
Conversation
2a0e9c5 to
8d9d70b
Compare
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Upstream's Labs cleanup (https://redirect.github.com/pingdotgg/t3code/pull/33131) removed the legacySidebarEnabled setting. LastCode still carried the legacy sidebar and its Legacy settings section, whose mount the carry replay dropped, so knip failed lastcode/main on the unused LegacyFeaturesSection export. Remove the legacy mode instead of re-mounting it. The sidebar resolves to LastCode or the v2 sidebar. With LastCode on, the tree button and sidebar.mode.toggle still hide it for the session; with LastCode off they turn it on, since it is the only other sidebar. A saved legacy opt-in is ignored when settings decode, so those users land on the v2 sidebar. The LastCode sidebar's scale, grouping and compact-status settings keep their legacy-prefixed names. Carry-Group: legacy-sidebar Carry-Upstream: https://redirect.github.com/pingdotgg/t3code/pull/33131 (521ac7c) Carry-Observation: Aligns with the upstream Labs cleanup, which removed legacySidebarEnabled; LastCode keeps only its own sidebar alongside upstream's v2 sidebar. Co-Authored-By: Claude <[email protected]>
The legacy sidebar mode is gone, so nothing renders LegacySidebar.tsx and the "Sidebar (legacy)" settings search entry points at a removed switch. Carry-Group: incubator Carry-Upstream: https://redirect.github.com/pingdotgg/t3code/pull/33131 (521ac7c) Carry-Observation: Incubator contributions edit LegacySidebar.tsx and add the legacy-sidebar search entry after the Legacy Sidebar group replays, so removing them must replay with Incubator; the mode removal itself is in Legacy Sidebar. Co-Authored-By: Claude <[email protected]>
8d9d70b to
e653a33
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Every server start ran a full storage cleanup sweep immediately: worktree removal plus dependency and generated-build cleanup and the saved-workspace passes. That competes with launch-time Git work, and each relaunch restarts the full sweep from scratch. In one incident, three relaunches in about a minute each started a fresh full sweep alongside the launch Git burst. Traces also couldn't say which caller or Git command a `runGitCommand` span came from. ## Fix - **No sweep at launch.** The first automatic sweep runs one interval (1 hour) after start, then hourly as before. Settings changes, thread deletions and provider-session stops still request sweeps immediately, and manual cleanup is unchanged. The delay is a `FirstAutomaticSweepDelay` reference. The test fixture sets it to zero so the existing sweep tests keep starting on activation. - **Git spans name their work.** `runGitCommand` spans record `git.operation` (the caller's operation name) and `git.subcommand`. Full arguments are never recorded, nor is anything not shaped like a subcommand, because they can carry remote URLs or `-c` / `--config-env` values. ## Decisions - A deleted worktree that cleanup kept before a restart now waits for the first hourly sweep. The list of such worktrees lives in memory, and rebuilding it immediately would need a launch-time sweep, which this change removes on purpose. - The bulk of a sweep's cost, repeated walks of `node_modules` and worktrees for open-file evidence, is out of scope here and handled in a separate PR. ## Proof - `storageCleanup.test.ts`, "automatically removes an eligible archived thread checkout an hour after launch": with the production default it checks that at 59 minutes there is no report, no worktree inventory and the worktree is still present, and at 60 minutes it expects the removal. It fails with the delay removed or with the default set to zero, and passes with the change. - `storageCleanup.test.ts` and `GitVcsDriverCore.test.ts` pass (596 tests). `GeneratedDependencies.test.ts` passes (162 tests); its worker-burst cases now start the first sweep on activation, because they test bursts during that sweep. - `vp run check:changed origin/lastcode/main` passes (format, lint, typecheck, changed tests). Knip's exports pass failed on the earlier base because of `LegacyFeaturesSection`; #671 removed it, and this PR is rebased onto that. Local review: 2 rounds with gpt-6.1-terra (xhigh), approved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) (Claude Opus 5.5 in T3 Code) Carry-Source-Ref: refs/lastcode/carry-sources/pr-672/771ebe31c367d62a62d6acf333ed24f742432640 Carry-Source-Base: 3861197 Carry-Source-Head: 771ebe3
Storage cleanup's consumer proof re-walked the same trees within one process inventory. On a 356-worktree sweep, `WorktreeConsumers.processPathsUseRoot` dominated the time. When a captured file can't be resolved by name, which is normal for deleted-but-open files, each query does a full no-follow `lstat` walk of its target. `GeneratedDependencies.removeBatch` asked the same fresh inventory about `<worktree>/node_modules` and then about the whole worktree, walking both. The final guards then repeated this for each fresh capture. Each query also ran `realpath` on every inventory path, about 11.8k paths of which only about 4k were unique. Changes: - **One walk answers nested roots.** Walk evidence now records where each matched object or socket was found. In the same `TargetObservation` (keyed by inventory), a query for a root nested in an already-walked root is answered from that walk. The nested subtree's directory tokens and the root's canonical path are revalidated first. The answer matches a fresh walk: a successful ancestor walk visited every object a nested walk would, on the same device and within the same limits. If no ancestor walk is usable, the root is walked as before. - **One observation per fresh capture.** Dependency and build removal proofs create one observation for each fresh capture and query the worktree before its nested root. Every final proof still captures a fresh inventory and never uses the sweep's observation. Each dependency removal now walks each root at most once per capture, down from up to 7 walks per candidate to 4. - **`realpath` deduped within each query.** Results are not reused across queries: an existing test requires a path that becomes unresolvable later to fall back to identity proof. - Dependency use is still recorded when the broader worktree proof fails. Proof: new tests count walks per capture in `WorktreeConsumers`, `GeneratedDependencies` and `GeneratedBuilds`. They fail on `lastcode/main` and pass here. The usage-recording test failed before its fix. Focused suites pass (389 tests); `check:changed` passes apart from the base-branch `LegacyFeaturesSection` knip failure being fixed in #671; local Quick CI passed. Follow-up: F1. Deduping `realpath` within one query can, in a sub-second race, skip re-resolving a duplicate name that changed between its entries. The reviewer rated it a nit, and I declined it. Local review: 2 rounds with gpt-6.1-terra (xhigh), approved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Carry-Source-Ref: refs/lastcode/carry-sources/pr-673/e86a0b598fcf702b579927f74ee95b3c2bbc5116 Carry-Source-Base: dcf3275 Carry-Source-Head: e86a0b5
## Problem The carry-set ELI5 still described the August proposal, not the carry replay that has been the production path since 2026-09-05. The glossary and nightly workflow kept rollout-era lines: carry tooling "does not yet replace the nightly replay", files shared by several groups go to Incubator, a post-publication carry check that in fact runs only after historical-mode publications, and retirement criteria for historical replay. Refs #720. ## Change - **ELI5** (`doc/design/2026-08-29__downstream-carry-set-eli5.html`): rewritten to describe carry replay as built. Each commit names its group with a `Carry-Group` trailer. A publication folds the PR squashes merged since the last one into six group commits on the old nightly, then replays only those six onto the new nightly with `rerere` off. It also covers the deferred-promotion exception to the tree check, conflict recovery, historical rollback, and what changed from the proposal. - **Glossary**: describes the current carry set; the group order now includes Build & CI; a fix that edits lines a later group changed must move to that group; carry replay has no path ownership; the ELI5 link no longer says "proposal". - **Nightly workflow**: the shadow check runs only after historical-mode publications; historical replay is an explicit rollback, not a pending retirement; `--reconstruct` only reproduces the bootstrap generation; the dashboard's replayed-commit count is normally 6. ## Scope Documentation only, no behaviour change. Tracks #720 without closing it. The smoke gate description in the nightly workflow is left to another PR. ## Verification - Checked each claim against `scripts/lastcode-carry-*.ts`, `scripts/lastcode-checkpoint.ts`, `scripts/lastcode-merge.ts`, the manifest and published tags. This covered contribution counts (2,256 in total, 1,015 in Incubator, 122 of 252 Upstream bugfixes without `Carry-Upstream`), `Fork-Commits-Rebased: 6` on every carry checkpoint tag, the first carry tag at 2026-09-05 18:23 PT, checkpoint 4449 folding #671–#688, checkpoint 3717's cross-base compile, and the trailers on #708 and #671. - Corrected three errors in the rewrite before review: PR #708's groups, a claim that Incubator work can be retagged out, and the "carry patch" wording. - `check:changed`: typecheck (41 packages) and the context-budget test pass, and formatting passes after `vp fmt`. The HTML tags are balanced. - Quick CI deferred to GitHub because local capacity was busy, so there is no local receipt. Local review: 3 rounds with GPT-6.1 Terra (xhigh) and Claude Opus 5.5 (xhigh), approved. Final-round nits were fixed afterwards. Written with Claude Opus 5.5 in the Claude Code harness. Reviewed with GPT-6.1 Terra in Codex and Claude Opus 5.5. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Carry-Source-Ref: refs/lastcode/carry-sources/pr-725/a1e38bf562fb6faa8738a13d219d20f9925c657b Carry-Source-Base: 99486a3 Carry-Source-Head: a1e38bf
Upstream's Labs cleanup (https://redirect.github.com/pingdotgg/t3code/pull/33131, 521ac7c) removed the
legacySidebarEnabledsetting. LastCode still carried the legacy sidebar, and the carry replay dropped the mount of its Legacy settings section, so knip failedlastcode/mainCI on the unusedLegacyFeaturesSectionexport. The owner decided LastCode drops the legacy mode too: the LastCode sidebar is the one we iterate on.This removes the legacy sidebar mode only. The LastCode sidebar and the rest of the
legacy-sidebarcarry group stay.Changes
LegacySidebar.tsx, its slot inAppSidebarLayout,LegacyFeaturesSectionand its settings search entry.legacySidebarEnabledfrom the client settings schema and patch, as upstream did.useBoringSidebarEnabled, which nothing called, andtoggleUpstreamSidebargo with it.resolveSidebarModereturnslastcodeorinbox(the v2 sidebar).thread-sidebar.md,keybindings.md).Decisions
settings.test.ts). Those users land on the v2 sidebar, which works, and the tree button reaches LastCode in one click. I did not add a migration straight to LastCode, matching upstream's plain removal.sidebar.mode.togglewith LastCode on: unchanged. They hide or show LastCode for the session without writing settings.sidebar.mode.togglewith LastCode off: they turn the LastCode sidebar setting on, because it is the only other sidebar left. Turning the setting off in Settings → LastCode → Appearance returns to v2. The button always says "LastCode sidebar".legacySidebarScale,legacySidebarThreadGroupingStyleandcompactLegacySidebarStatusesbelong to the LastCode sidebar, so they keep their names. Renaming them would need a persisted-settings migration.Carry-Group: legacy-sidebar. DeletingLegacySidebar.tsxand the "Sidebar (legacy)" search entry is a separateincubatorcommit, because Incubator contributions edit that file and add that entry after the Legacy Sidebar group replays. A single commit conflicted in CI's same-base carry compilation.Proof
lastcode/mainCI fails knip at 138c010. Herevp run check:changed origin/lastcode/mainpasses format, lint, both knip passes, typecheck (36 packages), tests (234) and React compiler.sidebarMode,useSettings,chatRouteCommands, contractssettings, desktopLastCodeSettingsImportandDesktopClientSettings(172).scripts/lastcode-carry-ci.tsvalidates the carry assignments and same-base compiled tree locally for e653a33.Local review: 1 round with gpt-6.1-terra (xhigh), approved.
Follow-ups from review (nits, not fixed here): two rapid toggle presses while an earlier settings write is still queued can both opt in instead of the second hiding LastCode;
shouldChooseNewThreadProjectis used only by its test (already true onlastcode/main).Opus 5.5 in Claude Code via T3 Code.
🤖 Generated with Claude Code