Skip to content

[fork] Tim Smart integrations - #1

Draft
patroza wants to merge 17 commits into
fork/basefrom
fork/tim
Draft

[fork] Tim Smart integrations#1
patroza wants to merge 17 commits into
fork/basefrom
fork/tim

Conversation

@patroza

@patroza patroza commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Managed fork provenance layer

Role Value
Base main — exact pingdotgg/t3code:main mirror
Head fork/tim
Source Selected changes from tim-smart/t3code
Deployment Never directly; only through fork/integration

Every selected source PR is represented by exactly one provenance commit. Each commit records the source URL, current source head, complete source commit list, and imported scope.

Source PR Integrated feature
tim-smart/t3code#4 Custom desktop Open With applications
#5 Direnv provider-session environments
#6 Unsigned retry for commit-signing failures
#7 Contextual /new command
#8 Session dashboard board
#9 Provider-turn restart recovery
#10 Bounded thread subscription retries
#11 Compact-composer image upload
#12 Truncated mobile branch controls
#13 Archived-worktree cleanup
#14 Hosted app channel/static-site support
#15 Reuse selected worktree branches
#16 Optional worktree-removal confirmation
#17 Stop retrying unavailable thread subscriptions

Repository policy and product adaptations do not belong in this layer; they live in fork/changes. Two explicitly labeled tim-compat commits follow the source imports to keep the selected stack green on the fork CI matrix: Darwin-only macOS bundle fixtures and portable custom Open With handling.

This PR intentionally remains open and draft. Do not merge it. The fork stack workflow rebases the layer when upstream or the selected Tim set changes.

@github-actions github-actions Bot added size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 24, 2026
@patroza
patroza force-pushed the fork/tim branch 2 times, most recently from c6b394a to 83d75d0 Compare July 25, 2026 05:23
@patroza patroza changed the title feat: integrate Tim Smart feature set [fork] integrate Tim Smart feature set Jul 25, 2026
@patroza patroza changed the title [fork] integrate Tim Smart feature set [fork-1] integrate Tim Smart feature set Jul 25, 2026
@patroza patroza changed the title [fork-1] integrate Tim Smart feature set [fork-2] integrate Tim Smart feature set Jul 25, 2026
@patroza patroza added FORK Long-lived protected fork provenance or private layer; do not merge directly. and removed vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Jul 25, 2026
@patroza patroza changed the title [fork-2] integrate Tim Smart feature set [fork] Tim Smart integrations Jul 26, 2026
@patroza
patroza force-pushed the fork/tim branch 12 times, most recently from a4f9a37 to 20615f8 Compare July 28, 2026 13:43
@patroza
patroza force-pushed the fork/tim branch 4 times, most recently from 9cf3d96 to 903ebb6 Compare July 29, 2026 10:07
tim-smart and others added 17 commits August 6, 2026 05:30
Add custom "Open with" applications

Source: tim-smart#4
Source head: 8c4bdfb
Source commits: 08e1a4f,cd43a401c6c148f1fe26cff72104ac527ea189f3,a8370e7502c552ebb064436e42e1c00f86f0946b,8c4bdfbc5b57f6b600233244d330f9efa41dc498
Imported: complete product delta from the source PR.

(cherry picked from commit 9fae005)
Load direnv environments for provider sessions

Source: tim-smart#5
Source head: 8f5fc87
Source commits: e4f0701,0d1463af61e0bd174f698b2519ebf3b207a2eaca,a66e4160d5f4b79140ec8fbcbc6aa66af750a991,8f5fc87c13f4628c179cda44d4f32f7fe4d316b2
Imported: complete product delta from the source PR.

(cherry picked from commit 0da8bfe)
Add unsigned retry for commit signing failures

Source: tim-smart#6
Source head: 7d65c5a
Source commits: 18ee567,72a6fae23c86708080c4fed346d5bf0f136f0221,6614b28239ed2330a8f601357a413f2d50da195a,ec169369daa554541511aa28f551b36f3dd26485,7d65c5a224e97a6b811b0a84892f1fda065c5963
Imported: complete product delta from the source PR.

(cherry picked from commit 03671a2)
Add /new command for contextual threads

Source: tim-smart#7
Source head: 2051a80
Source commits: 2051a80
Imported: complete product delta from the source PR.

(cherry picked from commit 4d94f31)
Add session dashboard board

Source: tim-smart#8
Source head: d9f8e4d
Source commits: 268fb8d,dde20f271f674da22dd8f3a08201c2acf5e58ee5,df4a145e7b2cd2dc17a7a595267d2d8eb0a2a3f0,ce5723ddb0bf630a18d4cb8227b5344d12626e72,ad8c1a6af41161e1fc38a52f681b306517c7b918,6281887e6125317da0c7b4252d59bfd41c9bf35e,550db6316c634febdbe1cb27334d1347c23c7b2a,d9f8e4d0a8dc22231ca315f3c595c3597f3b13e5
Imported: complete product delta from the source PR.

(cherry picked from commit cd0e281)
Recover interrupted provider turns after server restarts

Source: tim-smart#9
Source head: b181832
Source commits: 7f69028,1d52bce1376766d804ef884d7d50b8b6d1b48cf7,b181832560177250b90bbfe07b0882c9e5b93493
Imported: complete product delta from the source PR.

(cherry picked from commit 83de8f5)
Avoid repeated thread snapshot loads during subscription retries

Source: tim-smart#10
Source head: c8c9ead
Source commits: c8c9ead
Imported: complete product delta from the source PR.

(cherry picked from commit 9e400c3)
Add image upload button to compact chat composer

Source: tim-smart#11
Source head: 1ff63f9
Source commits: 1ff63f9
Imported: complete product delta from the source PR.

(cherry picked from commit 720ec65)
Truncate mobile branch toolbar controls

Source: tim-smart#12
Source head: 1b7d444
Source commits: 1b7d444
Imported: complete product delta from the source PR.

(cherry picked from commit dc2bbb4)
Clean up worktrees when archiving threads

Source: tim-smart#13
Source head: a23f42d
Source commits: 4a19470,1b6688aa5b641010cb2e9dad23d36d87257403ad,9ed32aa3923fb674380564b1ffcb3268290069b9,a23f42d6ac671ea36b8db5d03934c089a31be448
Imported: complete product delta from the source PR.

(cherry picked from commit 7e02dc9)
Pass hosted app channel into Vercel web builds

Source: tim-smart#14
Source head: de6966a
Source commits: de6966a
Imported: complete product delta from the source PR.

(cherry picked from commit 6333d8d)
Allow worktrees to reuse the selected branch

Source: tim-smart#15
Source head: 2d3900b
Source commits: cd60531,2d3900ba36c9397dc4fbe879c613a809f6b45384
Imported: complete product delta from the source PR.

(cherry picked from commit 5e7dff2)
Add optional worktree removal confirmation

Source: tim-smart#16
Source head: c3f509f
Source commits: 76f063e,c3f509fe8f690b704bb34692d9c132c0644db777
Imported: complete product delta from the source PR.

(cherry picked from commit 9886109)
Stop retrying unavailable thread subscriptions

Source: tim-smart#17
Source head: 1359af8
Source commits: 1359af8
Imported: complete product delta from the source PR.

(cherry picked from commit 7b37a7a)
…nd; green tip

Bring Tim layer tip to typecheck green by joining main ref-refresh VCS client
state with fork failureKind/worktree-cleanup contracts, restoring
filterBrowseEntries/reuse-base-branch surfaces Tim dropped, and fixing
ChatView/Board call-site type errors left by incomplete Tim joins.

(cherry picked from commit 0e24917)
Bring fork/tim typecheck/test green after main pingdotgg#2679 + Tim client-runtime
rewrite: rejoin EnvironmentSubscriptionRpcTag/localApi/ws scopes, wire
BackgroundPolicy/ResourceTelemetry layers, force openpgp for signing tests
on hosts with gpg.format=ssh, and treat TRACE2 child_exit without
child_class as hook finish (git 2.55+).
"work" is no longer an empty full-catalog query once Worktree remove
confirmation is searchable. Keep the word-wrap false-positive check and
assert the worktree setting is the sole full-catalog hit.
patroza added a commit that referenced this pull request Aug 6, 2026
…364)

Nothing drives this machinery any more. Overlays were drained and
deregistered, `fork/changes` and
`fork/integration` are frozen, and upstream is now merged **straight
into `fork/dev`** — a plain
`git merge`, because upstream is append-only and the previous sync
recorded its ancestry.

## Removed

| | |
| --- | --- |
| Scripts | `fork-stack.ts`, `rebase-pr-stack.ts`,
`compose-integration-overlays.ts`, `rebase-integration-overlays.ts`,
`client-overlay-owner.ts` + all 5 test files |
| Workflows | `compose-integration.yml`, `rebase-pr-stack.yml`,
`force-update-overlay-tip.yml` |
| Config | `.github/client-overlay-ownership.json` |
| `package.json` | `fork:stack`, `fork:stack:sync`,
`fork:overlay-owner`, `fork:rebase-overlays` |
| Docs | `stack-ship-path.md`, `client-overlays.md` |

## Kept, deliberately

**`classify-deployment-diff.sh` is not stack tooling.** It is the shared
definition of what a diff
means, run by *both* `fork-release` and the smart-host poller so the two
cannot disagree about what
ships. Its tests still pass.

**`managed-pr-draft-lock.yml` still guards #255, #1 and #27**, which
remain open drafts. Merging #255
would push fork CI plumbing into the upstream mirror — that lock matters
*more* now that nothing else
watches those branches. `pr-stack.json` survives purely as its
allowlist, trimmed to those three PRs
and annotated to say so.

## A latent bug found on the way

The draft lock read its allowlist from `?ref=fork/changes` — a **frozen
branch**. Any edit to the
manifest could never have taken effect, including the overlay
deregistration in #348. It now reads
`fork/dev`.

## Guidance rewritten, not just deleted

`AGENTS.md` referenced removed commands in a dozen places (`pnpm
fork:stack update --push`,
`node scripts/rebase-pr-stack.ts sync --push`, …). Deleting the scripts
without this would have sent
an agent to a script that no longer exists. `fork-stack.md`,
`stack-history-rewrite.md` and
`fork-base.md` are bannered or corrected rather than deleted — the
branches they describe still
exist even though the workflow around them does not.

## Draft lock: no longer runs on unrelated PRs

It triggered on **every** pull request, started a run, looked itself up
in an allowlist, exited, and
left a `Keep managed PR draft` check on PRs it had nothing to do with.

Now filtered to the bases the managed PRs actually target — `main`,
`fork/base`, `fork/tim`. Ordinary
work targets `fork/dev`, so it does not run there at all.

**Not folded into Fork CI**, which was the other option. Fork CI
deliberately does not watch `main`,
and **#255 targets `main`** — merging that pushes fork CI plumbing into
the upstream mirror, the
single worst outcome this guard prevents. Folding it in would have
quietly dropped the guard on the
one PR that most needs it.

## Docs aligned to what is actually running

- The handover doc's synchronization section described rebuilding the
provenance stack and importing
a `C1..C2` tree delta. Rewritten around the direct merge, keeping a
short *what this replaced* note
  and why that was never necessary for upstream in the first place.
- Core invariants and operational rules no longer instruct importing a
tree delta or recording
  ancestry with `merge -s ours`.
- **`fork-stack.md`**: 714 lines describing the removed workflow → a
short topology doc. What each
branch is, that the provenance branches are no longer rebuilt, that
their PRs stay draft.
- **`stack-history-rewrite.md`**: deleted with its inbound links. It
documents rewriting stack
  history, which no longer happens.

`docs/` is now `fork-base.md`, `fork-stack.md`, `README.md`,
`sidebar-v2.md`,
`stable-dev-release-branch-handover.md`.

Verified: no reference anywhere to removed tooling or deleted docs, and
no broken internal links in
the handover doc.

## Validation


- Full recursive typecheck clean across 17 packages.
- **2248 tests pass.** The one failure (`CodexTextGeneration` structured
output) reproduces on
  `fork/dev` unmerged and predates this change.
- `classify-deployment-diff.test.sh` passes.
- The draft lock's exact `jq` query verified against the trimmed
manifest: matches #27, rejects an
  unmanaged number.

## Not done

`docs/fork-stack.md` is kept (bannered). It has ~10 inbound links from
`AGENTS.md` and documents the
provenance branches, which still exist. Removing it is a further docs
pass, not part of deleting the
tooling.

Co-authored by [@patroza](https://github.com/patroza)

opened by [Patrick Roza](https://discord.com/users/95218063095377920) in
chat thread **Discord** ·
[Discord](https://discord.com/channels/1083767712431480922/1534783738322485399/1534783738322485399)
· [T3](https://t3vm/?thread=584a9ad3-243e-4308-8a13-49acdd758b17)

---------

Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FORK Long-lived protected fork provenance or private layer; do not merge directly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants