Skip to content

feat(web): notify when an upstream release is ready to merge - #4

Merged
wianvdm merged 1 commit into
mainfrom
t3/upstream-release-notification
Oct 23, 2026
Merged

wianvdm merged 1 commit into
mainfrom
t3/upstream-release-notification

Conversation

@wianvdm

@wianvdm wianvdm commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Problem

The fork has no signal when pingdotgg/t3code ships a release it has not merged. Staying current depends on remembering to check, and the desktop updater only follows the fork's own releases.

Change

  • Add a deterministic check, fork builds only and no model calls: the latest stable upstream release is compared with fork main through the GitHub compare API.
  • Show the result in a sidebar pill ("Upstream vX ready to merge") and a Settings > About row. The pill opens a draft thread in a new worktree on main with a merge prompt prefilled. Project and model stay editable in the composer and nothing is sent until the user presses Send.
  • Run the check on startup, every 6 hours and on refocus. Results cache for 1 hour and failures for 5 minutes. The existing "Check for Updates" actions (Settings button, sidebar update pill) force a refresh and toast the outcome.
  • Pick the project by git remote identity, falling back to name or path. The identity resolver prefers upstream over origin, so a fork checkout reports the fork under origin.
  • Gate everything on a build-time T3CODE_DESKTOP_VARIANT define in apps/web/vite.config.ts, so official builds do none of it.

Surfaces: web only (desktop wraps it). The check runs in the client against the public GitHub API, so local, relay and tunnel connections behave the same. Server, contracts, mobile and providers are untouched. The native "Check for Updates..." menu item runs in the Electron main process and still checks only the fork feed.

Scope and approval

Fork PR into WianVDM/t3code main requested by the fork owner. This change is not proposed to pingdotgg/t3code, so the upstream prior-approval rule does not apply.

Verification

Automated:

  • vp test run apps/web/src/components/upstreamRelease.logic.test.ts: 25 passed.
  • Targeted vp lint and vp fmt --check on the 10 changed files and tsc-rs --noEmit for apps/web: clean.
  • A throwaway integration test (not committed) ran the real module against the live GitHub API: unmerged for v0.1.2 in 2 requests, a cache hit with 0 requests, and a failed fetch retried after 5 minutes and not before.

Manual, in a real client (dev server from the worktree with T3CODE_DESKTOP_VARIANT=fork, state seeded from a read-only snapshot, driven through the in-app preview browser):

  • The pill appears on startup without a refocus.
  • Clicking it opens a draft in a new worktree based on main, in the WianVDM/t3code project, with the merge prompt prefilled and nothing sent.
  • The manual-check path (called directly, because the Settings button needs Electron) toasts "Upstream v0.1.2 is ready to merge", and its "Start merge" action opens the same draft.
  • With GitHub unreachable, a manual check shows one error toast and the pill hides. The next successful check restores it.
  • Verification found and fixed a bug: project matching never ranked the fork checkout first, because the resolver reports it under origin.

Before and after, same instance and data, 1280px wide. Before is the same build with the check result set to merged, which hides the pill and matches what main renders.

Sidebar footer:

Before After
Sidebar footer before Sidebar footer after

Draft opened by the pill, with the merge prompt prefilled:

Draft thread with the prefilled merge prompt

Not checked:

  • The Settings > About row and the Settings "Check for Updates" button exist only in the Electron app (a browser renders a plain version row). The next fork desktop build is their first real run.
  • Non-fork gating was checked by reading the code, not by a second run.
  • Mobile and the native Electron menu were not exercised.
  • The fork's ci.yml targets Blacksmith runners that this fork does not have, so no CI result applies to this PR.

Models and harness: Claude Sonnet 5.5 (orchestration and review) and Gemini 3.8 Flash (implementation, review and verification subagents) in T3 Code.

Generated with Claude Code

- Compare upstream's latest stable release with fork `main` over the GitHub API, fork builds only, no model calls.
- Add a sidebar pill and a Settings > About row; the pill opens a draft worktree thread with the merge prompt prefilled.
- Check on startup, every 6 hours and on refocus; results cache for 1 hour, failures for 5 minutes. Manual update checks force a refresh.
- Match the project by git remote identity, falling back to name or path: the resolver prefers `upstream`, so a fork reports itself as `origin`.
- Gate on a build-time `T3CODE_DESKTOP_VARIANT` define in `apps/web/vite.config.ts`.
@wianvdm
wianvdm merged commit e036c52 into main Oct 23, 2026
@wianvdm
wianvdm deleted the t3/upstream-release-notification branch November 14, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant