Skip to content

Waiting on you: list each machine's signed-out provider (#808 row 7, part 1) - #1434

Merged
scuttletoby merged 1 commit into
mainfrom
fork/needs-you-signed-out
Nov 30, 2026
Merged

scuttletoby merged 1 commit into
mainfrom
fork/needs-you-signed-out

Conversation

@scuttletoby

Copy link
Copy Markdown
Owner

Part of #808 (row 7, part 1).

What: the "Waiting on you" page (the Issues entry while client.ownerQuestionsPage is on) gains a Needs you on a machine list. Each row is an enabled, installed provider that a connected machine reports as signed out. It shows the machine, the provider, the step to sign in (from its provider settings, or with its CLI then a refresh) with the machine's own message, and a Provider settings button that opens /settings/providers for that machine and instance. The page's first line counts the sign-ins too. When sign-ins wait, the empty state says "No owner question is waiting" rather than "Nothing is waiting on you".

How: it reads the provider statuses the app already holds for every machine (useEnvironmentProviders). There is no server change, no new setting and no seam: every file is fork-owned, under components/fork/ownerQuestions. The rule is pure logic in needsYou.logic.ts.

State question:

  • Stale state: a machine that is not connected now is named as "not read", and none of its last statuses is listed, because they may be stale.
  • Stale prompt: a sign-in done anywhere (on that machine, or from another client) clears the row on the next provider status push. Nothing is stored, so after a restart or reconnect the page simply shows the current statuses. There is nothing to answer twice.
  • Not yet reported: a connected machine whose statuses have not arrived lists nothing.

Left for row 7: T3's own update and pairing prompts, OS-only prompts ("needs you at " with the exact step) read across links, and agent guidance to avoid OS prompts. Upstream already offers provider CLI updates across machines (ProviderUpdatesAction), so a later part only needs to cover what that misses.

Tests: needsYou.logic.test.ts (new, 7 tests). It is red on main because the module is missing. It covers which providers count as signed out, machine and provider order, the step text, a disconnected machine, statuses that have not arrived, and the count line. 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 too. Docs: a new change file, plus docs/fork/README.md and docs/fork/about.md.

🤖 Generated with Claude Code

The "Waiting on you" page gains a "Needs you on a machine" list: each
enabled, installed provider that a connected machine reports as signed
out, with the step to sign in and a button to that machine's provider
settings. It reads the provider statuses the app already holds (no
server change); a machine not connected now is named as not read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@scuttletoby

Copy link
Copy Markdown
Owner Author

lens: code · reviewer: Claude Opus 5.5 · read at: ebadd23

blocker: none
major: none
minor: a machine the owner turned off (catalog entry not enabled, phase "available") or an unsupported one is still in useEnvironments(), so it is named forever in "Not connected now, so their sign-ins were not read: …", even when nothing else waits. Filter the machines to enabled, supported entries (like upstream's enabledEnvironmentIds) before calling needsYou, and add a test.
minor: on reconnect the phase turns "connected" before the new provider snapshot lands; configValueAtom still holds the last cached providers, so a provider signed in while the machine was away can show as signed out for a moment, until the first push. Short and self-clearing; worth one line in the PR's state notes, no code change needed.
minor: when issues are unsupported the first line still reads "0 open owner questions across your projects, and N sign-ins…" beside "Issues unavailable". Harmless; consider dropping the question half when !issuesSupported.

Checked and fine:

  • Stale statuses: needsYou skips every provider of a machine whose phase is not "connected" (test covers it); a connected machine with no snapshot lists nothing.
  • Excluded: enabled, status !== "disabled", installed and auth.status === "unauthenticated" ("unknown" while probing is left out, right).
  • Empty state and count line: title switches only in the read-in-full empty branch; singular/plural and the "and N sign-ins" join are tested.
  • "Provider settings": navigate({ to: "/settings/providers", search: { environmentId, instanceId } }) is the same shape upstream's own callers use, and the route's validateSearch reads both keys.
  • Text: English only under the same no-untranslated-copy disable the page already carries (fork page, no fork keys in upstream catalogs), so consistent with the rest of the page.
  • Row keys (environment + instance) are unique; sort is deterministic.

State question: runs again - nothing is stored, every render derives the rows from the live atoms, so a re-render or page reopen shows current state. Stops half-way - no writes, nothing to resume. Old/empty state - a disconnected machine lists none of its cached statuses; a connected machine with no snapshot lists nothing; an empty machine list renders nothing (component returns null). Page open while a machine connects/disconnects or a provider signs in: rows appear/disappear on the next atom update (only gap: the brief reconnect window in minor 2).

Tests: not re-run (CI ran them); no finding needed a repro beyond reading, as none is blocker/major.

🤖 Generated with Claude Code

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