Skip to content

Waiting on you: list each machine's T3 update that waits on the owner (#808 row 7, part 2) - #1436

Merged
scuttletoby merged 1 commit into
mainfrom
fork/needs-you-server-updates
Dec 2, 2026
Merged

scuttletoby merged 1 commit into
mainfrom
fork/needs-you-server-updates

Conversation

@scuttletoby

Copy link
Copy Markdown
Owner

Part of #808 (row 7, part 2). Left for row 7: pairing prompts, OS-only prompts ("needs you at " with the exact step) read across links, and agent guidance to avoid OS prompts.

What: the "Waiting on you" page (the Issues entry while client.ownerQuestionsPage is on) gains a T3 updates on your machines list. One row per connected machine whose T3 server is behind this app (upstream's version mismatch rule), whose update is running, or whose last update failed while the server is still not on that version. Each row shows the machine, the two versions, upstream's progress or failure line, the step, and upstream's own ServerUpdateAction: Update (or Retry after a failure) when the machine updates itself, the copy-the-command button when it cannot, and upstream's notes for a desktop app that must update itself or a managed policy that denies updates. When only update rows wait, the empty state says "No owner question is waiting" rather than "Nothing is waiting on you".

Why it is not a duplicate of upstream: upstream's composer banner lists the same machines but can be dismissed (per version pair, kept in local storage; a failure per state). After that nothing in the app shows that a machine is behind. These rows stay until the versions match.

How: reads what the app already holds (environment.serverConfig and environmentUpdateStatesAtom). No server change, no new setting, no seam: every code file is fork-owned under apps/web/src/components/fork/ownerQuestions. The rule is pure logic in serverUpdates.logic.ts; NeedsYouServerUpdates.tsx draws it.

State question:

  • Stale state: a machine not connected now lists nothing (its last config may be stale). A machine whose config or update state has not arrived lists nothing.
  • Stale prompt: the row goes when the server reports this app's version (an update from here, from another client, or by hand on the machine). A failed update whose target the server has since reached lists nothing, so an old failure does not linger.
  • Answered twice: pressing Update uses upstream's own path, which already refuses a second update while one runs (pendingUpdateEnvironmentIds); a running update shows its progress and no button.
  • Restart: nothing is stored; after a reconnect the rows follow the current configs.

Overlap with #1434 (open, row 7 part 1): both add a section before the page body and change the empty-state title to the same text, so whichever merges second takes a small text merge in WaitingOnYouPage.tsx, docs/fork/README.md and docs/fork/about.md (combine the two conditions). #1434 already names machines that are not connected; this list adds no line of its own for them.

Tests: serverUpdates.logic.test.ts (new, 8 tests), red on main because the module is missing. It covers a server behind / equal / ahead, the three routes (here, manual, desktop app; a desktop-managed server whose app takes the update counts as here), a failed update kept until the server reaches it, a running update, and machines not connected or not read yet. vp run check:changed passes (format, lint, knip, typecheck, tests, react compiler). The fork-changes-list test and the schema, upstream-files and seam checks pass locally. No browser test was run here (local sockets are blocked on this machine); CI runs the web suites.

Docs: a new change file docs/fork/changes/app/808-waiting-on-you-lists-server-updates.md, a paragraph under client.ownerQuestionsPage in docs/fork/README.md, and a line in docs/fork/about.md.

🤖 Generated with Claude Code

@scuttletoby

Copy link
Copy Markdown
Owner Author

lens: code · reviewer: Claude Opus 5.5 (code lens r1) · read at: 7770ac7

blocker: none
major: none
minor: the row's step line can contradict upstream's action. stepOf says "Update it from here; restarts its server on ." for every self-updating route, but ServerUpdateAction replaces the button with the managed-policy denial (managedUpdatesDenial) or the cross-track note ("Switch tracks in About → Update track", refusedCrossing). The row then says "update from here" next to a note that says you can't. Suggest: leave out the step for route here, since the action already says it, or word it neutrally. No test covers a denied or cross-track machine.
minor: a running update hides itself while the machine restarts. During the restart the connection is reconnecting, not connected, so the row goes away and comes back. Harmless, because state lives in client-runtime and the row returns on reconnect. But the "running" test only covers a connected machine, and the docs don't say that "updating" can vanish for a moment.
minor: the PR body and the change file say that after the banner is dismissed "nothing shows it". Upstream's sidebar update pill (updateEverythingRun) still offers updates that are available. The banner comment at useSystemComposerBanners.tsx (~line 241) says so. The real gap is narrower: the pill isn't a lasting per-machine list with the failure reason. Wording only.

Checked and fine:

  • Rows only for connected machines. A missing config or update state lists nothing. environmentIdsKey keeps the input order, so states[index] lines up with environments.
  • Version compare reuses upstream's resolveVersionMismatch. Equal or newer versions list nothing. An unknown or unparseable version (normalizes to null) lists nothing. A nightly is compared with a nightly in full, and otherwise only the version cores are compared.
  • The row clears when the versions match. The behind rows are recomputed from the live config. A failed state is already set back to idle by upstream's serverUpdateStateForServerVersion once the server version moves off fromVersion, so the PR's extra targetVersion === serverVersion check is redundant but harmless.
  • Not affected by the dismissed banner: the page reads no dismiss storage.
  • Retry and Update go through upstream's ServerUpdateAction, which keeps its own pendingUpdateEnvironmentIds guard. A running row shows no button.
  • The section renders in every body branch, including the empty state and the "issues not supported" state. The empty title switches correctly.
  • Overlap with Waiting on you: list each machine's signed-out provider (#808 row 7, part 1) #1434 (still open) is a text-only merge in WaitingOnYouPage.tsx, README and about. The two sections are independent.

State question:

  • Runs again: the rows are a pure function of live atoms, so re-rendering is idempotent.
  • Stops half-way: an update that is cut off stays in client-runtime's running or failed state. The row shows it, with Retry, and clears once the server reports the new version.
  • Old state: a disconnected machine's cached config is ignored. A failed state from an older fromVersion is reset by upstream.
  • Empty state: no environments gives the key "", then [], then no rows and no section.
  • Nothing is stored, so a restart starts clean.

Tests: the 8 logic tests cover behind, equal and ahead versions, the three routes, failed, running, not connected and not read. They are red on main (the module is missing). No new test was needed to prove a finding: all findings are minor.

🤖 Generated with Claude Code

@scuttletoby

Copy link
Copy Markdown
Owner Author

Merge conveyor: head 7770ac7ca944 does not merge cleanly on main 9983982c4c2e (conflicts in apps/web/src/components/fork/ownerQuestions/WaitingOnYouPage.tsx, docs/fork/about.md): fork:merge-ready swapped for fork:merge-blocked. Merge main into the branch (a writer may already be queued for it), then add fork:merge-ready again.

@scuttletoby scuttletoby added fork:merge-blocked Merge conveyor: did not merge, needs a look (PRs) and removed fork:merge-ready Merge conveyor: lenses done, merge when green (PRs) labels Nov 30, 2026
@scuttletoby

Copy link
Copy Markdown
Owner Author

Rebase

Merged origin/main (9983982, the new upstream catch-up) into this branch as merge commit 198759f. It's a plain fast-forward push, with no force and no rebase. The diff against main now holds only this PR's 7 files.

What conflicted and how it was resolved. On main, the signed-out providers list (Needs you on a machine, NeedsYouOnMachines) landed in the same places this PR adds the server updates list:

  • apps/web/src/components/fork/ownerQuestions/WaitingOnYouPage.tsx
    • Imports: kept main's needsYou / NeedsYouOnMachines imports and this PR's NeedsYouServerUpdates import.
    • Empty state: the title says "No owner question is waiting" when either list has rows (onMachines.signedOut.length > 0 || serverUpdates.rows.length > 0). Otherwise it says "Nothing is waiting on you".
    • Body: <NeedsYouOnMachines> comes first, then <NeedsYouServerUpdates>, then the questions.
    • The count line is unchanged from main (questions plus sign-ins).
  • docs/fork/about.md: kept both sentences. The page lists signed-out providers, and it also lists machines whose T3 server is behind or whose update failed.

Checks run. All pass:

  • fork-checks: the script tests (201 pass), the schema check, the upstream-files check and the seam check, run against origin/main.
  • vp test run src/components/fork/ownerQuestions/: 5 files, 54 tests pass.
  • vp run typecheck in apps/web.
  • vp run check:changed: format, lint, knip, typecheck, test and react compiler.

@scuttletoby scuttletoby added fork:merge-ready Merge conveyor: lenses done, merge when green (PRs) and removed fork:merge-blocked Merge conveyor: did not merge, needs a look (PRs) labels Nov 30, 2026
@scuttletoby

Copy link
Copy Markdown
Owner Author

Merge conveyor: head a436cd84c42f does not merge cleanly on main f9fddd1ea450 (conflicts in docs/fork/about.md): fork:merge-ready swapped for fork:merge-blocked. Merge main into the branch (a writer may already be queued for it), then add fork:merge-ready again.

@scuttletoby scuttletoby added fork:merge-blocked Merge conveyor: did not merge, needs a look (PRs) and removed fork:merge-ready Merge conveyor: lenses done, merge when green (PRs) labels Nov 30, 2026
…#808 row 7, part 2)

A connected machine whose server is behind this app, whose update is
running, or whose last update failed while the server is still not on
that version gets a row with the step and upstream's own Update (Retry,
or copy-the-command) button. The rows stay until the versions match,
also after upstream's composer banner was dismissed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@scuttletoby
scuttletoby force-pushed the fork/needs-you-server-updates branch from a436cd8 to cc052de Compare December 2, 2026 02:30
@scuttletoby scuttletoby added fork:merge-ready Merge conveyor: lenses done, merge when green (PRs) and removed fork:merge-blocked Merge conveyor: did not merge, needs a look (PRs) labels Dec 2, 2026
@scuttletoby
scuttletoby merged commit fbcbaad into main Dec 2, 2026
28 checks passed
@scuttletoby
scuttletoby deleted the fork/needs-you-server-updates branch December 2, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork:merge-ready Merge conveyor: lenses done, merge when green (PRs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant