Conversation
…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.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
#123that 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.#123.gh/glabreturned 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.GET /api/ref?url=on the plan, annotate and review servers of both runtimes. The fetch, cache and route handler are shared inpackages/shared/ref-cards.ts(vendored to Pi). The Bun runner is inpackages/server/ref-cards.ts, the Node runner inpackages/shared/ref-cards-node.ts.404 ref_cards_disabled) in remote mode, because it runs the user's own gh / glab credentials. Under--tailscaleonly 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 gets404 ref_cards_disabled. Another site's read gets403 cross_origin.RefHoverCards/useRefHoverCards(…, { onlyWithData })andrefCardRouteTransport(route), additive. The Inbox's card does not change.Tests
packages/server/ref-card-route.scenarios.ts, run bypackages/server/ref-card-route.test.tsandapps/pi-extension/server/ref-card-route.test.ts.apps/pi-extension/server/ref-cards-node.test.ts.packages/editor/App.refCards.test.tsx.tests/e2e/ref-cards-review.spec.ts, covering plan review, annotate and code review in light and dark.inbox-ref-cards.spec.tsstill passes.Docs: "Hover cards for #refs" in
docs/agent-guides/guides-and-shared-ui.md, the/api/refrows inserver-and-storage.md, andpackages/ui/HANDOFF.md.