feat: open PR links in panels, drop files on sidebar threads, and measure turn tokens - #458
Merged
Conversation
Adapters now attach normalized main-agent token usage to terminal turn events, and ProviderService records one provider.turn.completed analytics event per provider instance, thread, and turn. AnalyticsService stays inert unless a Pylon PostHog key is configured. Pylon adaptations: - Codex splices usage tracking into the incarnation stamping and pending admission correlation mapper. - OpenCode uses the finished upstream design from #10116 (unresolvedStepsByMessageId) because Pylon already retains only text parts. - ProviderService observes analytics after the runtime generation and session incarnation fences, flushes held completions on start, stop, session exit, and shutdown. - Prime, Cursor, Grok, and Antigravity report usage as unavailable. - Upstream tests adapted to Pylon session fencing and its rejection of model selections for another provider instance. - Documented in new docs/internals/product-analytics.md and docs/user/telemetry.md in Pylon voice. Adopted from 1587f248dd81ed45e214d476451ebf16dbfadb1a (#9132)
…ut of credits" When Codex stops a turn on a usage limit, the failed turn and its runtime error now name the exhausted window, its reset, and the next step, composed from the session's merged rate-limit snapshot. Pylon adaptations: - The composed runtime.error carries the session incarnation like every other event the adapter emits. - Pylon keeps relaying every account/rateLimits/updated notification for its pushed usage windows; the snapshot merge is side state only. The earlier snapshot test counts the sparse update Pylon relays. (cherry picked from commit d64335bb5913c21869633a4236d9409911e3da52) Adopted from d64335bb5913c21869633a4236d9409911e3da52 (#10473)
The copy-reference shortcut and command palette action now copy the pull request open on the pull requests page, including a provider URL carried by the surface. Pylon adaptation: the command palette keeps Pylon's detected branch pull request fallback for thread references, and the panel URL hook keeps Pylon's environment-scoped cached detail lookup. (cherry picked from commit ea2983afbbcd5ad6ee2e7db80c2a9270ff4964a9) Adopted from ea2983afbbcd5ad6ee2e7db80c2a9270ff4964a9 (#10615)
Pull request links in PR descriptions, comments, and previews now open in the panel that shows them, including the standalone pull requests page, instead of leaving it. (cherry picked from commit d081ab7abc16a21570d3d96948acb6c1f8d847a4) Adopted from d081ab7abc16a21570d3d96948acb6c1f8d847a4 (#10623)
Opening an image from chat or pull request markdown now lets arrow buttons move through every image in that message or PR section, wrapping at either end, with larger overlay navigation buttons. Pylon adaptation: Pylon's preview caption has no snapshot contents control, so only the caption color change applies. (cherry picked from commit 6df0add6e65b7c0040b5774635f794e4ff802ddd) Adopted from 6df0add6e65b7c0040b5774635f794e4ff802ddd (#10625)
The text generation model is now a shared server setting: choosing it in General writes the model and its options to every connected environment whose matching provider instance is enabled, and "Apply to all" reconciles drift. Claude text generation runs in non-interactive dontAsk mode so titles work on servers running as root. Pylon adaptation: splice the source settings and target settings arguments into Pylon's provider-instance-aware settings writer. Mobile's thread settings writer never sends the text generation model, so it keeps its existing call. (cherry picked from commit bc4b00666272188027d086361fa5ae01cda53bd2) Adopted from bc4b00666272188027d086361fa5ae01cda53bd2 (#10526)
Pooled limit rows now keep each account in one column across windows, ordered by the session reset (or the first available window), with a gap where an account does not report a window. Each row's reset list stays chronological. Web, desktop, and mobile share the order. Pylon adaptations: ordering reads the same normalized window names the pools use, because older servers omit window ids and kinds; a focused test covers that. The Pylon hub account keys and the condensed usage guide are kept, with the column order described. (cherry picked from commit 1f14d6d10afbcc99ec255b23544ee25c08dea321) Adopted from 1f14d6d10afbcc99ec255b23544ee25c08dea321 (#10690)
Dropping files from the computer onto a sidebar thread row or search result opens that thread and attaches the files in its composer through the same path as a workspace drop. Nothing is sent. The flat and project sidebars both accept drops. Pylon adaptation: splice the row prop and handler beside Pylon's change request snapshot props, and describe the drop in Pylon's sidebar guide. b5d89038ae72142038dfa8cf69d49b7a607fe98e is an empty duplicate of this source and changes nothing. (cherry picked from commit bde39d4d7977ce85d6ea396a983d6b6a25bf7e07) Adopted from bde39d4d7977ce85d6ea396a983d6b6a25bf7e07 (#7892) Already covered: b5d89038ae72142038dfa8cf69d49b7a607fe98e (#7892, empty duplicate)
Terminal links now open with a primary click, dragging from a link starts a text selection, and Cmd/Ctrl-click sends the link to the system browser regardless of the Open links in setting. Pylon adaptation: Pylon's terminal link helper keeps falling back to the system browser when a settings read or in-app open fails, so upstream's reject-on-settings-failure test and the drawer's error toast are not ported. The link guide now describes the plain click and the override. (cherry picked from commit 772ea1473a4a8f8fb0e0a5c9ba6d7a2ef14eac6e) Adopted from 772ea1473a4a8f8fb0e0a5c9ba6d7a2ef14eac6e (#10060)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
…ions Pylon's finalizer runs runShutdown, which reaches runStopAll only when no adapter owns shutdown, so held turn completions were never recorded when the Prime daemon adapter was registered. Flush them at the start of runShutdown as well. When a thread starts on another provider instance, or a fenced adapter is rebuilt, Pylon drops the old session's later turn events before analytics sees them. Clear that instance's analytics for the thread in both paths so its held completions are recorded instead of lingering until reuse. Focused tests cover the adapter-owned shutdown path, an instance switch, and a fenced adapter rebuild.
This was referenced Sep 11, 2026
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.
Ten upstream T3 Code sources in the
web-panelslane (frozen head6c583620ff7ad3235b135af7107c0543467eecfa, tracking #414) were missing from Pylon: PR links and markdown images in the panels, a text generation model that only saved to one connection, usage columns that moved between limit rows, no file drops on sidebar rows, terminal links that needed a modifier to open, Codex usage-limit stops relayed as "out of credits", and no normalized per-turn token telemetry.How it was ported
Each source was cherry-picked in upstream order with
-x. Conflicts were resolved by splicing only that source's hunks into Pylon's files; no file was taken from upstream wholesale.ProviderService.tswas rebuilt from Pylon's version with the telemetry hunks applied one by one. Each commit names its source.Sources
1587f248dd81ed45e214d476451ebf16dbfadb1ad64335bb5913c21869633a4236d9409911e3da52ea2983afbbcd5ad6ee2e7db80c2a9270ff4964a9d081ab7abc16a21570d3d96948acb6c1f8d847a46df0add6e65b7c0040b5774635f794e4ff802dddbc4b00666272188027d086361fa5ae01cda53bd21f14d6d10afbcc99ec255b23544ee25c08dea321bde39d4d7977ce85d6ea396a983d6b6a25bf7e07b5d89038ae72142038dfa8cf69d49b7a607fe98e772ea1473a4a8f8fb0e0a5c9ba6d7a2ef14eac6ePylon adaptations
AnalyticsServicestill sends nothing unless a PylonT3CODE_POSTHOG_KEYis set.ProviderServicewatches turn analytics only after an event passes the runtime generation and session incarnation checks. It flushes held completions on session start, stop,session.exited, a thread moving to another instance, a fenced adapter rebuild, and shutdown. Shutdown flushes at the start ofrunShutdown, because Pylon's finalizer skipsrunStopAllwhen an adapter owns shutdown (the Prime daemon adapter does). The pending admission, rollback and compaction paths are untouched.unresolvedStepsByMessageId). perf(server): reduce OpenCode streaming memory #307 had dropped the token-usage check from that test, and it is back.unavailable, like Cursor, Grok and Antigravity. Prime does send raw per-messageusage, but its input/cache meaning and child-agent scope are not verified.NodeServices, and it now runs twice: once as upstream wrote it, once with an adapter that owns shutdown. Two more tests cover the Pylon paths that fence out a session: switching the thread to another instance, and rebuilding a fenced adapter.docs/internals/product-analytics.md(maintainer-facing, trimmed like upstream's final version) anddocs/user/telemetry.mdin Pylon voice: off by default, key-gated, and how to opt out.runtime.errorcarries the session incarnation. Pylon keeps relaying everyaccount/rateLimits/updatednotification for its pushed usage windows, and the snapshot merge is extra state on the side. One upstream test now counts the sparse update Pylon relays.columnsuses Pylon'sNamedUsageWindow. Pylon's hub account keys stay, and the shorter usage guide now describes the column order.Sidebar.tsxedits match upstream line for line. The guide text is placed in Pylon's sidebar doc.forceBrowserhunks were spliced in. Pylon's helper still falls back to the system browser when an in-app open fails. Upstream's reject-on-settings-failure test and the drawer's error toast predate #10060 and were never in Pylon; this is an existing Pylon difference, not something cut from this source.docs/user/opening-links.mdnow describes the plain click and the Cmd/Ctrl override.Exclusions and deferrals
Nothing deferred and nothing cut from these sources. Two pre-existing differences stay: the terminal link settings-failure behavior (see above) and the snapshot-contents caption UI Pylon does not have. OpenCode
turn.startedno longer sends a variant-derivedeffort; nothing in Pylon read it. Upstream'sSidebar.tsxalso importsisSameSidebarThreadRefwithout using it; I kept that line as is.Verification
@t3tools/web,t3,@t3tools/shared,@t3tools/client-runtime,@t3tools/contractsand@t3tools/mobile.vp lintandvp fmt --checkon all 55 changed files: no errors. The only warnings are an unuseduseNavigatethat is already inSettingsPanels.tsxonpylon, and upstream's unused sidebar import.git grep PRIME_AGENT_DRIVER_KINDusages are unchanged fromorigin/pylon.UI evidence: no local client pass was run; the orchestrator runs one integrated pass later. Upstream evidence: #10615 screenshot, #10625 gallery screenshots, #10690 before/after, #7892 video, #10060 video, #10473 before/after.
Ported by Claude Opus 5 in Claude Code.