merge: upstream through f4c394323 — Sidebar v2, glass redesign, Auto runtime mode - #45
Conversation
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…gg#3781) Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
…pingdotgg#3795) Co-authored-by: Julius Marminge <julius@mac.lan> Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
…tgg#3823) Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Horus Lugo <horusgoul@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Shivam Sharma <91240327+shivamhwp@users.noreply.github.com> Co-authored-by: Ben Davis <45952064+bmdavis419@users.noreply.github.com> Co-authored-by: Alex <me@pixp.cc> Co-authored-by: codex <codex@users.noreply.github.com> Co-authored-by: Julius Marminge <julius@mac.lan>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…otgg#4414) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…tgg#4413) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: maria <maria@kuuro.net>
…g#4450) Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Theo Browne <me@t3.gg>
…dotgg#4488) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ingdotgg#4555) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…otgg#4556) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…tgg#4397) Co-authored-by: codex <codex@users.noreply.github.com>
PR #42 was squash-merged (8dc98e8 has one parent, committer GitHub <noreply@github.com>), so origin/main carries the merged CONTENT of the 2026-07-23 true merge but not its second parent 6f34ad3. Re-merging the original merge commit d963ff7 leaves the tree byte-identical and moves merge-base(main, upstream/main) from dad0889 (2026-07-07) to 6f34ad3 (2026-07-21), cutting the follow-up merge from 76 conflicted files to 18.
…sign, Auto runtime mode Merges 80 new upstream commits since the 6f34ad3 cut point. 18 files conflicted; full rationale in UPSTREAM_DIVERGENCE.md. Owner decisions applied: - Migrations: this fork keeps id 33 (ProjectionThreadRestartRequest, already recorded in prod's ledger). Upstream's 033_ProjectionThreadsSettled and 034_ProjectionThreadsSnoozed are renumbered to 034/035. Effect's Migrator skips any id <= the recorded max WITHOUT comparing names, so reusing 33 would silently never create the settled columns on the production DB. - Sidebar: no fork sidebar work preserved except the host CPU/memory readout, which moved into the shared sidebar/SidebarChrome.tsx so it now renders in both sidebar v1 and the v2 beta. Dropped: sidebarChatListView (grouped/flat), boxed project cards, the restart-request sidebar pill and its test. The restart-request feature itself (server detection, chat surfacing, migration 033) is untouched. - Color schemes culled to Solarized only; upstream's glass redesign added a token family every scheme must re-declare. Upstream's [data-sidebar-version] block had its ten generic tokens stripped (they are element-scoped and would defeat app theming inside the whole sidebar subtree); only --sidebar-* is kept, and Solarized now declares that family itself. - Sidebar v2 ships default OFF (upstream's own default). Fork PR #44's Claude Opus 5 entry is retired for upstream's 41a430a, which is a strict superset: a 200k/1M contextWindow descriptor and a dedicated 2.1.219 gate. The fork reused Fable 5's 2.1.169 gate and advertised 1M while sending 200k. Removed with it: the claude-opus-5 case in selectedClaudeContextWindow (ClaudeAdapter.ts) which would have silently overridden upstream's descriptor -- that file auto-merged without a conflict. Also retired: connectionStatusHeadline for upstream's connectionStatusTitle. Kept against upstream: showsHorizontalScrollIndicator={false} on MessagesTimeline (guards a left-edge text-selection bug LegendList reintroduces; no test covers it), and the omission of the eager threadModelSelections write at turn start in ProviderCommandReactor -- the fork's deferred model-change recycle compares against that map, so upstream's eager write makes every pending recycle look already applied. Taking upstream there broke 7 deferred-recycle tests. Verified: tsgo --noEmit clean on contracts, client-runtime, server, web, desktop; @t3tools/web build passes; 5724 tests pass. Remaining failures are pre-existing and reproduce on origin/main: 17 desktop suites (Electron binary not installed on this headless host) and server.test.ts "preserves structured workspace rpc failures".
…unit - UPSTREAM_DIVERGENCE.md: dated 2026-07-27 entry covering the ancestry repair, the migration-33 offset and its stock-DB hole, what was retired in favour of upstream, what was deliberately kept, the sidebar cull, the theme cull and the stripped [data-sidebar-version] tokens, and what shipped gated vs must-never-run. - AGENTS.md: sync PRs land as merge commits or ff-push. Never squash, never rebase-merge, never `git revert -m 1`. Includes the measured 4x conflict cost and the repair procedure. - docs/operations/rollback-2026-07-27-sync.md: pre-deploy backup (whole userdata, not just the DB), the import-timer stop, post-deploy ledger assertions, and the Auto-runtime-mode one-way door with its recovery UPDATE. - deploy/t3code.service: reference copy of the production unit, which upstream's new `t3 service install` would otherwise overwrite unannounced. Also gates upstream's "Auto" runtime mode behind a Features per-device toggle (composerAutoRuntimeModeVisible, default off) in both composer pickers. A thread already set to Auto still lists the option so the select cannot render blank.
…ledger Adds 034_035_ForkMigrationOffset.test.ts, which runs migrations to 33 (the production ledger's actual high-water mark), then runs the rest and asserts the tail reads 33/34/35 with the right names and that all six columns exist -- requesting_restart, restart_request_reason, settled_override, settled_at, snoozed_until, snoozed_at. A fresh-database test cannot catch this class of bug: it replays every migration from zero. The regression only appears when the ledger already carries a maximum, because Effect's Migrator run loop is purely ordinal and never compares names. Verified the test has teeth by temporarily renumbering the fork's migration up to 35 and upstream's back to 33/34 -- it fails on that arrangement and passes on this one. Also unblocks the default test-deploy seed: scripts/test-deploy-lib.ts pinned PRUNE_SCHEMA_VERSION at 32 while prod reached 33 on 2026-07-09, so test-seed-refresh has been hard-refusing to rebuild the curated template for 18 days and every test-deploy since silently fell back. Bumped to 35 with its three coupled assertions. Confirmed migrations 33/34/35 are ALTER-only, so the PER_THREAD_TABLES prune list needs no change.
Test deploymentSlot: external 7446 ⇄ loopback 3776. Branch External URL verified reachable (HTTP 200). Pairing links are one-time and expire in ~1h — mint a fresh one with: Migration rehearsal — the point of this deployThe curated seed template was stale (built 2026-07-09, ledger max 32) because Result after boot: All six columns present: This is the exact scenario that would have failed silently had the fork's migration been renumbered upward instead of upstream's. It is also covered permanently by Seed safetyVerified before boot — the template's Note on the deploy script output
What to look at
|
Merges 79 new upstream commits since the
6f34ad3e8cut point. Three commits: an ancestry graft, the resolved merge, and docs.Squash-merging PR #42 is what caused most of the work in this PR. It discards the second parent, so git stopped believing upstream was an ancestor and
merge-basefell back to 2026-07-07. Measured cost: 76 conflicted files / 238 hunks instead of 18 / 40, plus an inflated 208-commit delta when only 79 were new.Commit
7c1b9f62arepairs it by re-merging PR #42's original merge commit (still on GitHub asorigin/t3code/upstream-sidebar-change). Its diff is empty — it only restores provenance. Squashing this PR throws that away again. A rule is now inAGENTS.md.After merging, please verify:
git merge-base origin/main upstream/mainshould printf4c394323, notdad088976.Blocker resolved: migration ledger
Upstream shipped
033_ProjectionThreadsSettled+034_ProjectionThreadsSnoozed. This fork already owns id 33, recorded in production's ledger since 2026-07-09. Effect's Migrator skips any id<=the recorded max with no name comparison, so renumbering ours upward would mean upstream's 33 never runs, the settled columns are never created, and the auto-mergedProjectionThreads.tsqueries fail on every thread read — a full outage that CI and every fresh-DB test-deploy pass green.Resolution: we keep 33; upstream's two are renumbered to 034/035. Zero DB surgery. Every future sync re-applies the offset until the
ensureForkSchemafollow-up lands.Owner decisions applied
Sidebar
Only the host-stats readout survives, and it moved into the shared
sidebar/SidebarChrome.tsx— so it now renders in both v1 and the v2 beta, where it was previously v1-only. Upstream's extraction had no host-stats slot, so taking their side would have silently deleted the mount.Dropped:
sidebarChatListView, boxed project cards, the restart-request sidebar pill. The restart-request feature itself is untouched — only its sidebar affordance is gone. Sidebar v2 ships default OFF.Things git would not have flagged
ClaudeAdapter.tsauto-merged with no conflict, so ourcase "claude-opus-5": return 1_000_000hack survived and would have silently overridden upstream's new 200k/1McontextWindowdescriptor. Deleted explicitly. PR feat(claude): add Claude Opus 5 to built-in models #44 is retired for upstream's41a430a88, which is a strict superset — ours reused Fable 5's 2.1.169 gate instead of Opus 5's 2.1.219, and advertised 1M while sending 200k.index.css: both sides of the one conflict are+1brace depth sharing a}past the marker. Naive union does not build. Second time this trap has appeared.[data-sidebar-version]block hard-codes ten generic color tokens and applies even with the beta off. Element-scoped properties beat:root[data-scheme], so it would have killed Solarized inside the whole sidebar. Stripped to the--sidebar-*family.ProviderCommandReactor: taking upstream's side broke 7 deferred-recycle tests. Upstream added an eagerthreadModelSelectionswrite at turn start; the fork's deferred model-change recycle compares against that map, so the eager write makes every pending recycle look already applied. Upstream'spendingTurnStartflag kept, the write dropped.Merged but gated / must-not-run
t3 service install/uninstallmust never run on the deploy host — it hard-codest3code.serviceand would overwrite the hand-written production unit. A reference copy is now committed atdeploy/t3code.service.t3 serve— verified againstderiveServerPaths/resolveBaseDir. No DB-orphaning risk.Verification
tsgo --noEmitclean: contracts, client-runtime, server, web, desktop@t3tools/webbuild passes (the check that catches the CSS trap)origin/mainand are not from this merge: 17 desktop suites (Electron binary absent on this headless host) andserver.test.ts > preserves structured workspace rpc failures.Follow-ups (not in this PR)
ensureForkSchemaseam — closes the migration-offset hole permanently, including a stock-created DB recording 33 as upstream's migration. Must account fort3-claude-import.timerrunning a second migrating process against the same DB.scripts/test-deploy-lib.tspinsPRUNE_SCHEMA_VERSION = 32while prod is at 33 — the default curated seed has been silently falling back since 2026-07-09.useComposerProjectSkills(upstream now probes skills server-side); giveProjectionThread.requestingRestarta decoding default.Rollback procedure:
docs/operations/rollback-2026-07-27-sync.md. The one-way door is Auto runtime mode — hence the gate.🤖 Generated with Claude Code