Registry Mirror
Skip to content

Conversation

@backnotprop

@backnotprop backnotprop commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Issue, PR and MR hover cards (the Inbox's, #2187) now show in plan review, annotate and code review, on both runtimes (Bun and Pi).

What changes

  • Plan review and annotate: a bare #123 that the document links into its repo, and any pasted GitHub or GitLab issue / PR / MR link, shows its card once the pointer rests on it.
  • Code review: the same for pasted links (PR description and comments, a Markdown file's Read and Changes views, the guide overview). Code review does not link a bare #123.
  • A card opens only after gh / glab returned data. There is no loading skeleton and no failure card, so a person without gh / glab, or offline, or on an older server, sees no change.
  • New route GET /api/ref?url= on the plan, annotate and review servers of both runtimes. The fetch, cache and route handler are shared in packages/shared/ref-cards.ts (vendored to Pi). The Bun runner is in packages/server/ref-cards.ts, the Node runner in packages/shared/ref-cards-node.ts.
  • The route is off (404 ref_cards_disabled) in remote mode, because it runs the user's own gh / glab credentials. Under --tailscale only this machine and the tailnet owner on the served name and port get cards (the same gate as Ask this session); every other tailnet device gets 404 ref_cards_disabled. Another site's read gets 403 cross_origin.
  • ui: RefHoverCards / useRefHoverCards(…, { onlyWithData }) and refCardRouteTransport(route), additive. The Inbox's card does not change.

Tests

  • Route scenarios shared by Bun and Pi: packages/server/ref-card-route.scenarios.ts, run by packages/server/ref-card-route.test.ts and apps/pi-extension/server/ref-card-route.test.ts.
  • Node runner: apps/pi-extension/server/ref-cards-node.test.ts.
  • DOM: packages/editor/App.refCards.test.tsx.
  • e2e on the compiled binary with the fake forge (no real gh / glab): tests/e2e/ref-cards-review.spec.ts, covering plan review, annotate and code review in light and dark. inbox-ref-cards.spec.ts still passes.

Docs: "Hover cards for #refs" in docs/agent-guides/guides-and-shared-ui.md, the /api/ref rows in server-and-storage.md, and packages/ui/HANDOFF.md.

…ew-surfaces

# Conflicts:
#	apps/pi-extension/vendor.sh
#	packages/ui/HANDOFF.md
#	tests/e2e/playwright.config.ts
…lscale

Review and annotate decided the /api/ref route once per session and turned
it off for every request under --tailscale, so not even a tab on this
machine got a card. The route now decides per request with the gate Ask
this session uses (refCardsTailnetAllowed: sessionTailnetAskAllowed): a
local tab and the owner's tab through serve on the served name get cards,
any other tailnet device gets 404 ref_cards_disabled and runs nothing.
Remote mode stays off. Scenarios cover local, owner, other logins, a wrong
served port, a tagged device, funnel, and no owner on record.
createRefCards kept every ref, retry hold and repo account (a token) for
the life of the process, and the Inbox is long-lived. Now: at most 500 refs
and 200 repo accounts, least recently used dropped first; answers past the
stale window, failures past the failure window and finished holds and
rate-limit pauses are dropped at the next fetch (each is the same as no
entry, so no answer changes); avatars are capped at 500 and 8 MB of data
URIs; at most 500 lookups wait for a CLI (above a Board request's 200
links), and one more answers unavailable at once without being cached.
The route's refusal message and docs now describe the per-request tailnet
rule.
@backnotprop
backnotprop merged commit 960ae3b into main Oct 28, 2026
30 checks passed
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