Repository navigation
[backport cloud/1.55] agent telemetry + paywall attribution cluster (#18664, #18665, #18401, #18413, #18390, #18974) - #19803
Conversation
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Implements the unblocked PM-1476 in-panel action telemetry across cloud and desktop sinks, with committed-action boundaries and exact-once guards. - **H3 shipped**: adds `method: menu | drag_drop` to attachment telemetry; rejected, duplicate, failed, and cancelled asset drops do not emit. - **H6 shipped**: adds `turn_id` to message feedback. - **H7 shipped**: emits stop telemetry only after cancellation succeeds, preserving button/escape and elapsed time across pre-ack and WebSocket/HTTP races. The session owns the acknowledgement boundary: a pre-ack stop is one consumed-once value that survives a panel remount. - **H8 shipped**: emits canonical workflow binding transitions with thread, previous workflow, and active-tab/selector/minted/restored source. Reporting state lives in `useAgentSession` beside the binding it describes; the panel component holds no parallel binding state. - **H9 shipped**: emits approval shown once per ask ID despite rerenders; dedupe/timing state is scoped to its conversation (cleared on reset and thread switch, kept across a remount of the same thread). - **H10 shipped**: emits approval resolution after a successful answer or workflow navigation, with time to decide. - **H11 shipped**: emits run-mode changes after the preference save succeeds. - **H12 shipped**: carries first-open/new-chat source to durable thread acknowledgement and emits history selection after hydration. Deleting the open chat attributes the next durable thread as `history_delete` — a new enum value, flagged for product sign-off on PM-1476. - **H13 deferred**: stable locale-independent suggestion IDs are not specified; question posted on PM-1476. - **H14 deferred**: the control-ID enum and ambiguous surface split are not specified; question posted on PM-1476. - **Dependencies**: none. Uses the desktop `HostTelemetrySink` pattern from FE#18376 and does not overlap paywall, run-attribution, or activation-funnel events. - Successful commit boundaries for stop, approval, mode save, navigation, drop attachment, and history hydration. - Exact-once behavior for nested handlers, Vue rerenders, pre-ack stops, duplicate drops, and completion-before-cancel-response ordering. - H8 source classification and previous-workflow attribution, now emitted from the session that owns the binding. At `16c44bd66c`: - `pnpm vitest run src/workbench/extensions/agent src/platform/telemetry`: 174 files passed, 2783 tests passed, 17 expected failures. - `pnpm lint`: passed with 199 pre-existing warnings and 0 errors. - `pnpm typecheck`: passed for all workspaces. - Commit hooks (formatting, focused lint, app typecheck) and pre-push knip passed. Linear: [PM-1476](https://linear.app/comfyorg/issue/PM-1476/h-in-panel-action-instrumentation-h3-h6h14) --------- (cherry picked from commit fd49e1f)
Records whether the agent panel was open when a run was submitted, on both run-attribution events the frontend emits — `app:run_button_click` and `execution_start`. This is **D1** of the PM-1465 Comfy Agent V1 telemetry program. Linear: [PM-1471](https://linear.app/comfyorg/issue/PM-1471/d-run-attribution-panel-open-flag-on-run-events-d1) **This is the first of two stacked PRs.** [PM-1472](https://linear.app/comfyorg/issue/PM-1472/d-run-attribution-workflow-origin-tracking-d2-d3-d4) branches on top of this one and adds `agent_thread_id` to the same two payload sites, so this should land first. PM-1472 also has a cloud PR, since the backend emits its own `execution_start` (see below). - **What**: `agent_panel_open: boolean` added to `RunButtonProperties` and populated in `getRunButtonTelemetryProperties()`; added to the `execution_start` payload in `PostHogTelemetryProvider`; forwarded by `GtmTelemetryProvider.trackRunButton`. New `getAgentPanelOpen()` util in `platform/telemetry/utils/`. - **Breaking**: none — additive property on two existing events. **Two corrections to the ticket's premises, both worth a look:** 1. **`execution_start` has two independent producers, not one.** The ticket and its grooming comment treat it as a single frontend event; the sibling investigation on PM-1472 concluded the opposite, that it is backend-only. Both are half right. The frontend emits it from `PostHogTelemetryProvider.trackWorkflowExecution()` tagged `event_source: 'web-sdk'`, and cloud Go emits it independently from `common/analytics/execution_events.go` (no `event_source` at all). This PR covers the frontend producer. 2. **The panel state is read from `localStorage`, not from the store — because the store is unreachable from here.** PM-1471's validation comment proposed importing `useAgentPanelStore` directly into `useRunButtonTelemetry.ts` and `PostHogTelemetryProvider.ts` "without any new plumbing or circular dependencies". That is not possible: the enforced layer architecture (`import-x/no-restricted-paths`) forbids `platform/` from importing `workbench/`, and `PostHogTelemetryProvider` lives in `platform/`. `getAgentPanelOpen()` therefore reads the key the store persists `isOpen` to, which is exactly the trade-off `getActionbarDockState()` already makes in the same directory (`Comfy.MenuPosition.Docked` is likewise hardcoded away from its `useLocalStorage` writers). A test in `agentPanelStore.test.ts` pins the pairing from the writer's side, where `workbench/` → `platform/` is an allowed import, so renaming the key cannot silently pin the flag to `false`. **One deliberate semantic choice:** the flag reports `isOpen` (the user's stored preference), not `isVisible` (which also folds in the feature gate and consent). The ticket names `isOpen`, and `isVisible` would make the flag incomparable across users whose gate state differs. A user who has the panel open but is gated off reports `true`. **Not shipped — the backend half of D1, which needs a decision:** cloud's `execution_start` is built from the `Job` row (`executionevents/emitter.go`), which carries no client UI state, and `/api/prompt` has no field that could carry it. Putting `agent_panel_open` on the backend event would require inventing a client→server transport for a UI flag, so it is raised as a question on the ticket instead of guessed at. The frontend event covers browser runs; the gap is API/MCP-dispatched runs, which have no panel at all. `pnpm test:unit` over the full telemetry and agent trees — **163 files, 2441 passed** (8 pre-existing expected-fails). `pnpm typecheck` clean, `pnpm lint` 0 errors. New tests: `getAgentPanelOpen.test.ts` (closed / open / unset / storage-throws) plus the key-drift guard in `agentPanelStore.test.ts`, and `agent_panel_open` assertions through the run-button composable and the PostHog/GTM/Mixpanel/Host providers. `agent_panel_open` was read twice: once in `trackRunButton` at click time, once again in `trackWorkflowExecution`. A user who closed the panel between submitting the run and execution starting reported `true` on `app:run_button_click` and `false` on `execution_start` **for the same run**, splitting a pair funnel analysis joins. The captured value is now stashed beside `lastTriggerSource` and reused, with `getAgentPanelOpen()` kept as the fallback for a run the button did not start. Test covers the split and asserts the carry-over is consumed rather than sticky. Total now 2442 passing. CodeRabbit's **End-To-End Regression Coverage For Fixes** check flags the `fix:` subject in `abc6202de6` with no `browser_tests/` change. Taking the second resolution it offers, concretely: 1. **Nothing on `main` was ever broken.** Both commits are within this unmerged PR — the property is introduced in `26bed1ec9e` and its click↔start consistency corrected in `abc6202de6`. Relative to `main` this PR is a single additive change; the `fix:` subject describes an intra-PR correction, so there is no shipped regression for an e2e test to pin. 2. **The repo's e2e layer deliberately discards telemetry.** `browser_tests/fixtures/agentPanelFixture.ts:95` routes `**://t.comfy.org/**` to a stub so CI never emits under the fabricated token, and no browser test anywhere asserts a captured payload. A regression test here would mean inverting that fixture to intercept and assert PostHog bodies — new test infrastructure against the established convention, for one boolean. 3. **The behaviour is fully observable at unit level, and is tested there.** The entire surface is which key/value pairs reach `posthog.capture`. `PostHogTelemetryProvider.test.ts` drives the exact sequence — `trackRunButton({ agent_panel_open: true })`, panel state flipped to `false`, `trackWorkflowExecution()` — and asserts `execution_start` still reports `true`, then that a following unattributed `execution_start` reads `false`. A browser adds no signal a stubbed provider call does not already give. 4. **The one genuinely browser-dependent link is covered.** `getAgentPanelOpen()` reads the key `useAgentPanelStore` persists to rather than the store itself (the layer architecture forbids `platform/` → `workbench/`). `agentPanelStore.test.ts` exercises the real store against real storage and asserts the util observes `open()` / `close()`, so a key rename cannot silently pin the flag to `false`.
…bution (PM-1472) (#18413) ## Summary **This PR no longer adds `agent_thread_id`. That approach was dropped; see below.** What remains are two fixes to the run-attribution telemetry that #18401 (PM-1471) landed, both raised in review here. Linear: [PM-1472](https://linear.app/comfyorg/issue/PM-1472/d-run-attribution-workflow-origin-tracking-d2-d3-d4) ## Why client-side thread attribution was dropped The original change resolved a run's agent conversation from `agent_threads.workflow_id` — active tab → bound cloud workflow id → earliest thread on that workflow. The paired cloud PR (`Comfy-Org/cloud#10205`, merged as [`7be842c`](Comfy-Org/cloud@7be842c)) deliberately rejects that exact signal. From `services/inference/server/services/executionevents/attribution.go`: > It deliberately does not read `agent_threads.workflow_id`. That column is the conversation's *current canvas pointer* — `switch_tab` moves it without editing anything — so it both loses a thread that authored a workflow and then moved on, and hands credit to an unrelated thread that merely focused the workflow. So the frontend was deriving authorship from the one column the server-side implementation rules out, for precisely the two failure modes named there. The earliest-`createdAt` tie-break did not mitigate this — it made it worse, because an older *bystander* thread that merely switched to the workflow outranks the thread that actually authored it. The frontend has no local equivalent of cloud's `agent_tool_calls` audit trail, and the tab-binding store is another current-pointer rather than an authorship record, so there is no correct client-side substitute available today. Rather than ship a field that contradicts the server's own attribution, click-level thread attribution is dropped for now. `execution_start` still carries the durable, server-derived thread id from cloud#10205; what is lost is the ability to join `app:run_button_click` to a conversation, which needs either a read-only authorship signal exposed to the client or a downstream click→execution join. Written up on the ticket. Thanks to @DrJKL — this came out of [his review](#18413 (review)), which caught the contradiction against the merged cloud implementation. ## What this PR now contains - **`agent_panel_open` is read fresh at `execution_start` instead of being carried from the click.** The carry-over was justified by a user closing the panel mid-submit, but that window does not exist: `trackRunButton` and `trackWorkflowExecution` are synchronous neighbours at both call sites. What the stash *did* do was survive clicks that never execute — `SubscribeToRun`'s CTA queues nothing, and `useCoreCommands` returns early on a blocked subscription, an empty selection, or a failed path resolution — leaving a stale boolean to attach itself to the next unrelated `execution_start`. - **`getAgentPanelOpen`'s docstring now states what the value actually is.** It is the last *flushed* preference, not the state at submit time (`useLocalStorage` writes on a watcher flush). It also now records two limitations a reader needs: a user whose agent flag was turned off still reports `true`, because `suppressRestoredOpen()` only runs for callers requiring `agentPanelStore.enabled`; and the key is origin-wide, so a run submitted from a second window reports the first window's state. **Breaking:** none on the wire. `RunButtonProperties.agent_panel_open` is unchanged; only how `execution_start` obtains it changes. No internal type gains a required field in this revision. ## Review findings Addressed here: the stale provider carry-over (P1), and the docstring accuracy (P3). Dropped along with the feature — these were defects in code this revision no longer contains: the one-page false-singleton candidate set (P1), the side-effecting binding-store read (P2), the path-only stale binding via `matchesWorkflow` (P2), the broad resolver `catch` (P3), and the `Math.min` spread (P3). Still open, tracked separately: - **Cross-account state (P1).** With the agent stores no longer read for telemetry, the remaining exposure is `lastTriggerSource`, which predates this work and is not addressed here. - **Panel-open semantics (P2).** Whether the metric should mean "stored preference" or "panel the user could actually see" is a product decision; the limitation is now documented rather than silently wrong. - **`agent_thread_id` in GTM (policy).** Moot in this revision since the field is gone. If client-side attribution returns, the question of whether a stable conversation identifier belongs in `window.dataLayer` needs an explicit answer first. - **Empty `last_message_at` (bug, pre-existing).** `last_message_at` is `string`, "empty when unset" on the wire, so the `??` chain in `toChatSession` never falls through and never-activated threads are stamped `Date.now()`. Confirmed against `@comfyorg/ingest-types`. This is on `main` today and is unrelated to this PR; it needs its own change with a history-ordering test. ## How has this been tested? `pnpm exec vitest run` across the telemetry and agent trees: **177 files, 2890 passed** (17 expected-fail). `pnpm exec vue-tsc --noEmit` clean; ESLint and oxfmt clean on changed files. Full-suite and browser coverage via CI on this head. The provider test that pinned the carry-over is replaced by its inverse: a click that never executes must not leak its panel state onto a later unrelated run.
…18390) Adds an `agent_paywall` source across the checkout flow so agent-driven purchases can be attributed, and instruments the agent paywall card itself. Implements **E1, E2, E3, E5** and the derivable part of **E4** of [PM-1473](https://linear.app/comfyorg/issue/PM-1473/e-new-labels-agent-paywall-source-attribution-e1e5). Follows the pattern established by #13363 ("attribute payment intent through paywall, checkout, and top-up telemetry"). Unblocks revenue attribution R4. | Item | Type | Value | |---|---|---| | E1 | `PaymentIntentSource` | `agent_paywall` | | E2 | `AddCreditsClickMetadata.source` | `agent_paywall` | | E3 | `CheckoutEntrySource` | `agent_paywall` | The grooming pointed at E1, but that one was already safe: `VALID_PAYMENT_INTENT_SOURCES` is `satisfies Record<PaymentIntentSource, true>`, so adding a union member breaks the build until the key is added. `checkoutJourney.ts` was the opposite. `ENTRY_SOURCES`, `ENTRY_FLOWS` and `UI_MODES` were `ReadonlySet<T>`, which constrains element *types* but does **not** require every union member. A value added to one of those unions but forgotten in the Set compiled clean and then degraded to `'unknown'` at runtime — inside `normalizeRecord`, the persisted-record rehydration path. That path is the *primary* one for hosted checkout: `useSubscriptionCheckout` sets `uiMode: 'hosted'` when embedded checkout is off, the user leaves for Stripe, and the journey resumes from storage on return. Every phase re-reads the record through `normalizeRecord` rather than holding it in memory, so `entered` would have carried `agent_paywall` while every later phase carried `unknown` — including `operation_linked`, the phase that binds `billing_op_id` and is therefore the join to the billing lifecycle events. **Correction (raised in review).** An earlier revision of this description, and two code comments, said these allowlists guard "the `.succeeded` events revenue attribution reads". That is wrong. `entry_source` exists only on `CheckoutJourneyContext`, which rides on `billing.checkout.*`; `billing.topup.succeeded` carries no `entry_source`, and subscription terminal events carry the separate `payment_intent_source`. What these allowlists actually protect is the persisted journey's own phases. Both comments are fixed. All three are now `satisfies Record<T, true>`, matching the pattern used next door, so the omission is a build error instead. Verified: adding an unregistered `CheckoutEntrySource` member now fails `vue-tsc` at the `satisfies Record<CheckoutEntrySource, true>` clause. A table-driven test pins **every** entry source through a persisted hosted journey into the resumed telemetry context, so this cannot silently regress for any member. Confirmed non-vacuous by reverting the allowlist to the stale `ReadonlySet` — the test fails with `expected 'unknown' to be 'agent_paywall'`. `useAccountPreconditionDialog` hardcoded `reason: 'subscription_required'` and passed no source on the credits branch, and it is shared with two `app.ts` callers (the execution-error handler and the prompt precondition). `source` is therefore **optional**, with each branch falling back to the literal it previously hardcoded. Both `app.ts` callers emit exactly what they emitted before; only the agent passes `agent_paywall`. Making it required would force those callers to pick a value, which is precisely where a real attribution regression would come from. Covered by tests asserting the unchanged default in both branches. Two further seams: - The source survives the `showTopUpCreditsDialog` → `showSubscriptionRequiredDialog` fall-through, which otherwise rewrites `reason` for exactly the users who had no funds. - Both checkout rails already receive a `PaymentIntentSource`, so the journey's entry source is **derived** from it via `resolveEntrySource` rather than plumbed separately. Sources absent from that map keep their rail's default (`'pricing'` / `'settings_billing'`), which holds every pre-existing surface byte-identical. `TopUpCreditsDialogContentWorkspace` hardcoded `entrySource: 'settings_billing'` in `onMounted`, so a top-up opened from the agent paywall was **already** attributed to the settings billing panel, independent of this ticket. It now reads the source that opened it, defaulting to `settings_billing`. - `app:agent_paywall_shown` — `reason` (E4) - `app:agent_paywall_cta_clicked` — `cta`: `subscribe` / `add_credits` / `upgrade` (E5) `reason` is derived from the single `AgentPaywallPresentation` kind the resolver produced, so precedence between overlapping states **is** the resolver's own branch order and cannot drift from a second ordering maintained separately. That yields the proposed `subscription_inactive` > `no_funds`: a workspace that cannot top up reads as needing a subscription even though its balance is also empty. Pinned by a test. The spec named three reasons, but `member`, `salesManaged` and `local` are real paywall states with no spec'd value. Dropping them would make the funnel's **denominator** wrong, not merely incomplete — it would silently exclude team members. So `reason` is extended: | Presentation | `reason` | |---|---| | `subscribed` | `no_funds` | | `local` | `no_funds` | | `subscriptionRequired` | `subscription_inactive` | | `member` | `member_cannot_pay` (**new**) | | `salesManaged` | `sales_managed` (**new**) | | `unavailable` | `unknown` (defensive; withheld in practice, see below) | **@hunter — this wants your sign-off.** Every paywall the resolver can show now emits exactly one event. The agent gratis allowance is implemented as a Metronome **scoped credit at a burn priority** (`PriorityAgentGratis = 20`), not a client-visible counter. Once gratis is spent with no paid credits, the frontend sees `hasFunds: false` and a zero balance — **indistinguishable from a plain out-of-credits user**. The FE billing contract (`composables/billing/types.ts`) exposes only `hasFunds` and balances; there are zero FE references to `funding_class` or `agent-gratis`. So E4 ships 2 of 3 spec'd reasons. **Will billing-status expose `funding_class` or allowance-remaining client-side, in what shape, and when?** Please align that one field with PM-1467 (A11/A12 `funding_class`) and PM-1484 M3 (`allowance_remaining_micro_usd`) so one field serves all three tickets. The shown event is keyed on the **id of the message carrying the paywall part**, not on the `paywallPresentation` computed, which re-evaluates on every billing-state change and would over-count one impression. A paywall part only enters the conversation through `recordPaywall` on a refused send — `normalizeAgentTranscript` produces none — so a first-claimed id is always a fresh impression and never history replayed on thread load. The event is **withheld** while the presentation is still the pre-bootstrap default and fires once as soon as capabilities and role land, rather than reporting a real paywall as `unknown`. The claim record is owned by the **conversation store**, not the panel: closing the panel unmounts `AgentPanelRoot` via `DockedAgentPanel`'s `v-if` while its paywall messages stay in the conversation, so panel-scoped bookkeeping would forget what it reported and count the same refused send again on reopen. (Caught in review; covered by a close/reopen regression test.) **Fallow gate (CI red — now green).** Two separate causes: 1. *Complexity.* The optional `source` added two decision points to `showTopUpCreditsDialog`, pushing it over the gate (cyclomatic 13, CRAP 49.5). Extracted `topUpFallbackReason`, since the reason it computes is a standalone rule. 2. *Dead code.* Fallow reported the two new paywall methods on `TelemetryRegistry`, `PostHogTelemetryProvider` and `HostTelemetrySink` as unused class members. They are not — the registry's are reached through `TelemetryDispatcher` and the providers' through the optional `TelemetryProvider` member `dispatch` invokes, so no reference to any of the three classes appears at a call site, which is what the analyzer looks for. About eighty existing telemetry methods produce the same finding and sit in `.fallow-baselines/`; since that baseline is a shrinking migration aid rather than somewhere to add new entries (ADR-DEVEX-LINT-0015), these use the `fallow-ignore-next-line unused-class-member` escape hatch litegraph already uses for interface-carried members. This finding was unrenderable by `scripts/cicd/fallow-findings.ts`, so the CI table showed an empty result — worth extending that renderer separately. Audit against the gate's base is now clean: `dead_code_introduced`, `complexity_introduced`, `duplication_introduced` and `styling_introduced` all 0, verdict pass. **Top-up billing lifecycle attribution (CodeRabbit merge-risk note) — deliberately deferred, not done.** The note is correct: E3 names `billing.topup.succeeded`, and the `billing.topup.*` family carries no source. The subscription rail gets this for free because `SubscriptionCheckoutBillingEvent` already has `payment_intent_source`; `TopupBillingEvent` does not. I implemented it, then backed it out. Adding the field is trivial, but *feeding* it means editing inside `handleBuy` (cyclomatic 20), and the billing store's `handleSuccess` (16) and `handleFailure` (14) for the poller path — which is the common path for real payments. Fallow attributes complexity per function, so touching those three pulled all of them plus the component's `<template>` (35) into this PR's scope, turning a telemetry change into a refactor of billing-critical code. That is the wrong trade for this PR, and it is why the second push was reverted rather than extended. **The attribution is not lost, but the join is partial.** The checkout journey carries `entry_source: 'agent_paywall'` and binds `billing_op_id` (`bindOperationToCheckoutJourney`), so response-backed top-up events can be joined back to it, which is how the journey instrumentation (#17348) was designed to be queried. **Correction (raised in review).** An earlier revision of this description claimed *every* `billing.topup.*` event carries `billing_op_id`. It does not: `TopupBillingEvent.billing_op_id` is optional, and it is absent on `started` and on failures that occur before an API response returns one. So the join covers the response-backed terminal events R4 needs, but **not** the full top-up lifecycle. The defence of deferring the direct field was overstated to that extent; the deferral itself still stands on the complexity grounds above. @hunter — happy to take the direct field as a follow-up ticket if you'd rather R4 read it off the event without a join; it wants its own PR so the function extractions can be reviewed on their own merits. **Impression dedupe across panel remounts (project review — fixed).** The claim record was panel-scoped, but `DockedAgentPanel`'s `v-if` unmounts `AgentPanelRoot` on close while the conversation keeps its messages, so reopening re-reported every retained paywall. Moved to the conversation store, whose lifetime matches the messages it describes. Close/reopen regression tests added. Four P2 and four P3 findings, plus one P2 on this description. All addressed. **P2 — the agent credits path still dropped attribution.** `openAccountPrecondition('credits', …)` always sets `isInsufficientCredits: true`, so `topUpFallbackReason` returned `out_of_credits` and `agent_paywall` never reached subscription checkout. The tradeoff I documented (copy correctness over attribution) was the wrong one, because it was a false choice. The display reason and the payment-intent source are now separate fields: `SubscriptionDialogOptions.paymentIntentSource` carries the originating surface, `useSubscriptionDialog` resolves it once — defaulting to `reason` — and each of the three pricing contents drives its checkout from it while the copy still branches on `reason`. Composition is pinned at each link: dialog service → dialog options → content props → `useSubscriptionCheckout` argument → journey `entry_source`. To be precise about the compatibility claim (raised in review): the **attribution value** every reason-only caller produces is unchanged, which is the guarantee that matters. Their *call shape* is not — those callers now also receive a resolved `paymentIntentSource` prop, and the content tests expect it. `PricingTable`'s own prop is still named `reason`; it is attribution-only (it feeds `payment_intent_source` and the checkout call, never copy) and the legacy content now passes the resolved source into it. Renaming it is a pre-existing tidy-up that would have pulled a 560-line component into this diff for no behavioural gain. **P2 — the new telemetry wiring had no direct coverage.** Every changed suite mocked `TelemetryDispatcher`, so deleting a registry method or swapping an event constant left all of them green. Both paywall methods now sit in the registry's agent-event dispatch table, and PostHog and `HostTelemetrySink` each get a capture case pinning the exact event name. Verified by mutation: removing the registry dispatch, and swapping each sink's constant for the other event, each fails exactly the new case. Those references also earned their keep twice over — with real call sites, Fallow reports all six `fallow-ignore-next-line unused-class-member` suppressions as **stale**, so they are gone, along with the comments that explained them (which the tests have now made false). **P2 — subscription rail composition untested.** `resolveEntrySource(paymentIntentSource, 'pricing')` had no test. Two now cover it, asserting both the emitted journey context and the persisted record. Mutation-verified against the exact regression named in review: hardcoding `entrySource: 'pricing'` fails the `agent_paywall` case. **P3s.** Function declarations for `resolveEntrySource`, `toAgentPaywallReason` and `toAgentPaywallCta`, per `docs/guidance/engineering.md`. An own-key type predicate replaces three `as` assertions at the persisted-data boundary, so the runtime check establishes the type. `resolveEntrySource` now takes the `string` it actually owns hardening for — its callers read from a Vue prop and a composable argument, neither enforced at runtime — which also means its prototype-key test no longer needs the prohibited `as unknown as`. And the paywall watcher's rationale drops what the telemetry type, the presentation mapping and the store method already document; what remains is local and load-bearing. **Fallow.** `dead_code_introduced`, `complexity_introduced` and `duplication_introduced` are all 0 and the enforced `audit-verdict` gate passes. One `warn`-severity `styling_introduced` remains: a pre-existing `color: white` in `SubscriptionRequiredDialogContent.vue`'s `<style scoped>` block, byte-identical to `main`, which moved from line 248 to 256 because the script block above it grew. Fallow keys findings by path and line, so a shifted line reads as introduced. Its suggested token is a 4%-alpha white, which would be a visible regression on that button; left alone deliberately. One P2 and five P3s, all addressed. **P2 — the legacy pricing path's fix had no test.** Demonstrated, not asserted: reverting `SubscriptionRequiredDialogContent.vue`'s binding to `:reason` restored `agent_paywall` → `out_of_credits` misattribution with all 491 focused tests still green. I had tested the two variants that already had test files and skipped the one that didn't. `SubscriptionRequiredDialogContent.test.ts` is new and stubs `PricingTable` to observe the prop the binding sets. A wrinkle worth recording: in that component the two concerns never render together — the copy branch is in the `v-else` legacy panel, `PricingTable` only under `showCustomPricingTable`. So one render cannot show both, and the test doesn't pretend otherwise; a separate case flips `subscription_required` off and pins that the legacy panel still branches its heading on `reason`. **P3 — one policy, four owners.** `useSubscriptionDialog` is the only non-test reference to all three content components (checked, not assumed), and it already resolves the fallback, so each child re-resolving `paymentIntentSource ?? reason` was redundant and let a variant quietly grow a second policy. The child prop is now required as `PaymentIntentSource | undefined` and consumed directly. That also deleted two fallback-only component tests — green proof of a path production cannot take. **P3s — test hygiene.** The entry-source cases are table-driven with no loop and assert the projected source collection once, leaving rehydration to `checkoutJourney.test.ts`, which owns it. The `paymentIntentSource: undefined` case is gone: `toHaveBeenCalledWith` ignores explicitly-undefined properties, so it never distinguished absent from present — visible in my own earlier mutation run, where it was not among the failures. The single-expression `mock.calls[0][1]` helpers are inlined, and the restated copy-versus-attribution comments are removed in favour of the one on `SubscriptionDialogOptions`. **Fallow.** Enforced `audit-verdict` gate passes; `dead_code_introduced`, `complexity_introduced` and `duplication_introduced` are 0. `styling_introduced` is now 3 rather than 1: the same path+line artifact as before, multiplied because this round shifted `SubscriptionRequiredDialogContent.vue`'s lines again. All three are pre-existing and byte-identical to `main`; two of them sit below the `PricingTable` binding, so any comment there moves them. Relocating a comment away from the line it explains to quiet a line-keyed heuristic isn't a trade worth making. - **`agent_paywall` vs `free_tier_quota`** — kept distinct. `free_tier_quota` attributes the free-tier *job* allowance surface (`useFreeTierQuota.ts`, driven by `remoteConfig.free_tier_balance`), a different allowance from the agent gratis grant. Noted in a doc comment on the union member. - **`entry_source` property-name collision** — `cloud/common/analytics/agent_session_events.go:16` already emits a property named `entry_source` on `agent_session_started` with an unrelated value space (e.g. `"new_tab"`). The two enums now share a property name in PostHog, so **the R4 funnel must scope by event name**, not by `entry_source` alone. Flagged in a doc comment on `CheckoutEntrySource` for whoever builds the dashboards. > **Superseded — measured on `774b4ca7a9`, before any review round.** Kept for the mutation-verification record only. The current-head figures are in *Verification at the current head* below. `pnpm typecheck` clean, `pnpm lint` 0 errors, `pnpm format` clean. - 493 tests pass across the 7 directly affected suites; 180 across the top-up/billing-store/precondition suites after the scope revert. - Wider sweep: 208 files / 3891 tests in `src/workbench/extensions/agent` + `src/platform/workspace`, and 65 files / 1032 tests across `src/platform/telemetry`, `src/services/dialogService.test.ts`, `useSubscriptionCheckout.test.ts` and `src/platform/cloud/subscription`. The load-bearing new tests were each confirmed non-vacuous by mutating the implementation and observing the expected failure: the E3 rehydration test (stale allowlist → `'unknown'`), the per-impression dedupe (guard removed → double emit), the pre-bootstrap gate (gate removed → `reason: "unknown"`), the remount test (panel-scoped claim → double emit). Everything in this section was measured on this commit. Any figure elsewhere in this description that names a different commit is superseded and labelled as such. `pnpm typecheck` clean across all five projects; `pnpm lint` **0 errors, 199 warnings**; `pnpm format` clean; diff-scoped Fallow **pass** with `dead_code_introduced`, `complexity_introduced` and `duplication_introduced` all 0. - **844 / 845** across the 15 affected suites, run locally. The single failure — `checkoutJourney.test.ts > does not resurrect a journey whose removal from storage failed` — is a local environment artifact, not a regression: it reproduces with that file pair checked out from `62bee2dcbf`. It stubs `sessionStorage.removeItem` to throw, which Node 26's native `sessionStorage` does not honour. (Node 26 also needs `--localstorage-file` for `AgentPanelRoot.test.ts` to run at all locally; with it, all 271 pass.) So this figure is a local count including one local-only failure — CI's own result is below. - Lint went 195 → 199 warnings purely from upstream. The one warning inside a file this PR touches (`checkoutJourney.test.ts:136`, `no-loss-of-precision` on a `1e400` literal) is blamed to `6a6a4a2eb9`, not to this change. - The legacy pricing regression test still fails when its binding is reverted to `:reason`, and is silent under `--disable-console-intercept` — verified sensitive by removing an i18n key and observing the warnings return. - Every test added across the review rounds was mutation-verified; the per-round sections above list each mutation and what it fails. Independent of the above: CI on `713adff370` is **91 pass, 0 fail, 17 skipping**, including `test`, `lint-and-format`, `typecheck`, `e2e-status`, `website-e2e`, `fallow`, `perf-tests` and the Playwright matrix. CI's `test` job passes in full — it does not reproduce the local `sessionStorage` failure, which is why that one is attributed to this Node 26 workspace rather than to the code. The mutation results quoted throughout are local experiments run by the author, not CI output; CI has no mutation job. They are reproducible by applying the named mutation and running the named suite. ---------
…18974) Closes **E1** and **E3** of [PM-1473](https://linear.app/comfyorg/issue/PM-1473/e-new-labels-agent-paywall-source-attribution-e1e5). Both were shipped as `Done` by #18390 but do not work in merged code. Unblocks revenue attribution **R4**. It does **not** close **E4**'s `allowance_exhausted`, which is blocked on a separate decision — see below. The only emitter of that event is `SubscribeButton.vue`, and the agent paywall's subscribe CTA **bypasses that component entirely**: it goes `AgentPanelRoot.onPaywallAction` → `useAccountPreconditionDialog` → `showSubscriptionRequiredDialog`. The subscribe leg of the funnel therefore carried no agent attribution at all — not a wrong value, no event. `onPaywallAction`'s subscribe branch now emits the shared event with `reason: 'agent_paywall'`, mirroring the `trackAddApiCreditButtonClicked` call in the add-credits branch directly above it. `SubscriptionMetadata.reason` already existed and is already typed `PaymentIntentSource`; nothing new was needed on the type. Worth recording, because #18390 disclosed E3's and E4's limits at length and claimed E1 shipped. E1 was judged complete on the strength of `VALID_PAYMENT_INTENT_SOURCES ... satisfies Record<PaymentIntentSource, true>` — "adding a union member breaks the build until the key is added." That guard is real, and it is still here, but it proves the value is **registered**, not that a call site **emits** it. Type-safety can show a value is able to flow; it cannot show anyone made the call. The asymmetry is visible in one function. E2 needed an explicit call site and got one. E1's symmetric call was never written, and no test asserted the subscribe leg, so both the compiler and the suite were satisfied by a funnel with a missing event. The guard against a repeat is behavioural, not structural: `AgentPanelRoot.test.ts` now asserts the agent CTA reports `agent_paywall` on that event. Removing the emit fails it. A helper shared with `SubscribeButton` would not have caught the original bug, which was an absent call site rather than a malformed one. `app:subscribe_now_button_clicked` has exactly two emitters after this change: `SubscribeButton` and the agent CTA. Other surfaces that open subscription checkout — `subscribe_to_run` (`useCoreCommands`), `upload_model_upgrade`, `settings_billing_panel`, and the two `app.ts` precondition callers — emit **no** `subscribe_clicked` today and still don't. That is pre-existing and deliberately untouched: the shared choke point is `useSubscriptionDialog.showPricingTable`, and emitting there would fire the event on every path that currently only fires `modal_opened`, changing existing funnel volumes well outside this ticket. `SubscribeButton` now also names its own surface (`reason: 'subscribe_now_button'`, the same value it already passes to the dialog it opens). Strictly additive — the field was previously absent on that event — and it makes `reason` total across both emitters, so the funnel can segment the subscribe leg rather than reading "not agent" as an absent field. Flagging it explicitly since it changes an existing event's payload for non-agent clicks. `TopupBillingEvent` declared neither attribution field, so this was structural rather than a call-site omission. The field is added as **`payment_intent_source`**, matching `SubscriptionCheckoutBillingEvent`, `BillingOperationBillingEvent` and `ResubscribeBillingEvent`, rather than the spec's `entry_source`. The existing divergence is deliberate and kept: `entry_source` is the journey's own smaller enum (`CheckoutEntrySource`), a different value space. The value is fed from the operation record the poller **already holds**. `billingOperationStore` reads `operation.paymentIntentSource` for its `operation` and `subscription_checkout` events on the same object; the `topup` branch simply never included it. Plumbing: `dialogService` → component `source` prop → `adoptPendingOperation` → `startOperation` → `operation.paymentIntentSource` → terminal `billing.topup.*`. The poller is the common path for a real payment — a synchronous `completed` is the exception — so the `adoptPendingOperation` hop is the one that matters for R4, and it has its own test. `handleBuy` (cyclomatic 20), `handleSuccess` (16) and `handleFailure` (14), turning a telemetry change into a refactor. That cost did not materialise: adding a property to an object literal introduces no decision point, so the complexity delta is 0 and no extraction was needed. Diff-scoped Fallow is clean (see Testing). **Every emit site has its own falsifier.** All four store stages (`succeeded`, `failed`, `reconciliation_needed`, `timeout`) and all five dialog sites (`started`, both synchronous failures, `succeeded`, `reportPurchaseError`) were mutated one at a time; each now fails its suite. The dialog cases assert the whole projected (stage, source) collection, so a source dropped from any single site cannot hide behind the others. **Correction.** An earlier revision of this description said `timeout` was not directly asserted because driving one "costs the full top-up poll budget in fake time". That was wrong — the multi-hour budget is the `awaiting_invoice_payment` parked case; a plain pending top-up times out at `TIMEOUT_MS` (two minutes), so the row is cheap and is now included. Two paths deliberately out of scope, both pre-existing: - **The legacy top-up rail** (`TopUpCreditsDialogContentLegacy.vue`) receives only `isInsufficientCredits`; `dialogService` does not forward `source` to it. It emits no `succeeded` event at all, so it is not on R4's path. - **The SDK rail** (`billingSdkStore`) emits `billing.operation.*` only, never `billing.topup.*` — `toBillingTelemetryEvent` has no topup case, and `billingSdkStore.ts:225` additionally drops non-resumed topup lifecycle telemetry. Its `operation` events have carried `payment_intent_source` since #13363. **Consequence, raised by CodeRabbit and confirmed pre-existing:** a pending top-up on the SDK rail can finish without any `billing.topup.succeeded`, so it has no terminal top-up attribution to carry. That was already true on `main` before this change and is unaffected by it — `adoptPendingOperation`'s early return on that rail is deliberate, since the SDK lifecycle adopted the operation when the command was issued and a second registration would mean two pollers on one operation. Closing it means adding new `billing.topup.*` emission to the SDK rail plus guarding against both rails emitting for one operation; that belongs in its own PR. `agent_paywall` has to survive hosted checkout: with embedded checkout off the user leaves for Stripe and the journey resumes from storage through `normalizeRecord`, which is the path that produces the `.succeeded` events R4 reads. The `satisfies Record<T, true>` hardening on `ENTRY_SOURCES` / `ENTRY_FLOWS` / `UI_MODES` is **unchanged**, and verified still load-bearing: adding an unregistered `CheckoutEntrySource` member fails `vue-tsc` at `checkoutJourney.ts:44` with `Property 'unregistered_probe' is missing in type ... but required in type 'Record<CheckoutEntrySource, true>'`. The existing table-driven rehydration test is **extended** rather than paralleled. It already pinned every entry source from a persisted hosted journey into the resumed telemetry context; it now continues through `bindOperationToCheckoutJourney`. That is the hop R4 joins on — binding rewrites the persisted record and every later phase re-reads it, so an entry source lost there would strand `operation_linked`, and with it the `billing_op_id` join, on `'unknown'` while `entered` still read true. Not addressed here, and not addressable in the frontend. The agent gratis allowance is a Metronome scoped credit at a burn priority; once spent with no paid credits the frontend sees `hasFunds: false` and a zero balance, indistinguishable from a plain out-of-credits user. @huntcsg — this still needs the answer #18390 asked for: will billing-status expose `funding_class` or allowance-remaining client-side, in what shape, and when? Please align it with PM-1467 (A11/A12) and PM-1484 (M3) so one field serves all three. All figures measured locally on `135c30a336`. `pnpm typecheck` exit 0 across all projects. `pnpm lint` **0 errors**, 198 warnings (all pre-existing `import-x/no-named-as-default-member` in untouched files). `pnpm format` clean. Pre-commit hooks (oxlint type-aware, eslint, `typecheck:app`) passed on commit. **45 files / 1097 tests passed**, 0 failed, across the affected suites: ``` Test Files 45 passed (45) Tests 1097 passed (1097) Duration 142.09s ``` covering `AgentPanelRoot.test.ts` (308), `billingOperationStore.test.ts` (127), `checkoutJourney.test.ts` (51), `TopUpCreditsDialogContentWorkspace.test.ts` (43), `SubscribeButton.test.ts` (2, new), `useTopupOperation.test.ts`, and all of `src/platform/telemetry/`. Every new test was mutation-verified non-vacuous: | Mutation | Result | |---|---| | Remove the agent `trackSubscription` emit | both E1 cases fail (`Number of calls: 0`) | | Remove `reason` from `SubscribeButton` | its case fails; the dialog-source case stays green | | Remove `payment_intent_source` from the store's topup `succeeded` | that case fails; the two failure-stage cases stay green | | Drop `paymentIntentSource` from the `adoptPendingOperation` hand-off | the poller-hop case fails | | Lose `entry_source` at the bind hop only | 6 of 7 rehydration rows fail — the 7th is `unknown`, which the mutation cannot distinguish | The `checkoutJourney.test.ts > does not resurrect a journey whose removal from storage failed` case that #18390 reported failing locally on Node 26 **passed** here; all 51 in that file are green. `AgentPanelRoot.test.ts` still needs `--localstorage-file` to run locally on Node 26. **Not run locally: E2E / Playwright.** Nothing in this diff was exercised by a browser test here — those only run in CI, and no claim is made about them. Production serves a SHA pinned on `cloud/1.54`, so this is not landed until it is backported. Labelled `needs-backport` + `cloud/1.54`. **Do not approve or merge this PR on my behalf** — `backport-auto-merge.yaml` squash-merges on approval, so approval is the release action.
ed215d1 to
3b81246
Compare
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 2142 passed, 0 failed · 2 flaky📊 Browser Reports
🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. Fallow gates on new findings in changed files only, so everything below was introduced or moved by this PR (65 changed files).
Pre-existing findings are baselined in Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since b064d929ceef9d8ae529449288f5eee76db8fcd4
Full docs: ADR-DEVEX-LINT-0015 🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-10-01T21:39:15.600Z",
"gitSha": "6c732ffe0ce92d2a0f0f3a0aae28bb6cdbef9d5a",
"branch": "consolidated-cloud-1.55-backport",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2007.1529999999598,
"styleRecalcs": 9,
"styleRecalcDurationMs": 6.379,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 375.939,
"heapDeltaBytes": 7994776,
"heapUsedBytes": 75852956,
"domNodes": -263,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 8.190999999999997,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 1992.5230000000056,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.096000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 397.77,
"heapDeltaBytes": -8288868,
"heapUsedBytes": 59711416,
"domNodes": -260,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 9.274000000000001,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1677.564000000018,
"styleRecalcs": 46,
"styleRecalcDurationMs": 13.632,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 643.353,
"heapDeltaBytes": 13472816,
"heapUsedBytes": 81347280,
"domNodes": -258,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 119.539,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1725.3079999999272,
"styleRecalcs": 46,
"styleRecalcDurationMs": 14.019,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 709.0110000000001,
"heapDeltaBytes": 5707448,
"heapUsedBytes": 73427004,
"domNodes": -260,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 126.328,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1708.7289999999484,
"styleRecalcs": 31,
"styleRecalcDurationMs": 14.167000000000002,
"layouts": 6,
"layoutDurationMs": 1.0839999999999999,
"taskDurationMs": 316.29400000000004,
"heapDeltaBytes": 3081096,
"heapUsedBytes": 71000872,
"domNodes": 77,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 13.506,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1692.2969999999395,
"styleRecalcs": 28,
"styleRecalcDurationMs": 15.167,
"layouts": 6,
"layoutDurationMs": 1.046,
"taskDurationMs": 325.65,
"heapDeltaBytes": 3001632,
"heapUsedBytes": 71071572,
"domNodes": 78,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 13.905999999999999,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 559.9829999999884,
"styleRecalcs": 14,
"styleRecalcDurationMs": 9.203,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 376.48099999999994,
"heapDeltaBytes": 18920008,
"heapUsedBytes": 86532696,
"domNodes": 24,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 139.873,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 570.3659999999218,
"styleRecalcs": 13,
"styleRecalcDurationMs": 8.726999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 371.591,
"heapDeltaBytes": 18465568,
"heapUsedBytes": 86681860,
"domNodes": 22,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 133.62199999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1019.3039999999769,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 662.5210000000002,
"heapDeltaBytes": 38548336,
"heapUsedBytes": 106715964,
"domNodes": 0,
"jsHeapTotalBytes": 19296256,
"scriptDurationMs": 52.98,
"eventListeners": 0,
"totalBlockingTimeMs": 409,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1014.5129999999654,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 642.491,
"heapDeltaBytes": 38504304,
"heapUsedBytes": 106573644,
"domNodes": 0,
"jsHeapTotalBytes": 18247680,
"scriptDurationMs": 51.984,
"eventListeners": 0,
"totalBlockingTimeMs": 401,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 765.7930000000306,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 375.9979999999996,
"heapDeltaBytes": 14816304,
"heapUsedBytes": 90137788,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 117.40099999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 155,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 768.8369999999622,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 365.6920000000001,
"heapDeltaBytes": 14905072,
"heapUsedBytes": 90094420,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 121.06299999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 162,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 7209.315000000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6333.164,
"heapDeltaBytes": -1276984,
"heapUsedBytes": 80878436,
"domNodes": -14,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 5214.16,
"eventListeners": 0,
"totalBlockingTimeMs": 62,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-clean-combined-draw",
"durationMs": 7191.390999999953,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.8240000000000018,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6366.999,
"heapDeltaBytes": 3993500,
"heapUsedBytes": 82101660,
"domNodes": -273,
"jsHeapTotalBytes": 1302528,
"scriptDurationMs": 5232.019,
"eventListeners": -174,
"totalBlockingTimeMs": 29,
"frameDurationMs": 18.33666666666668,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 7353.831000000014,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.1030000000000024,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6492.568,
"heapDeltaBytes": 4593816,
"heapUsedBytes": 81456980,
"domNodes": -273,
"jsHeapTotalBytes": 1040384,
"scriptDurationMs": 5161.115,
"eventListeners": -174,
"totalBlockingTimeMs": 97,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 33.29999999999927
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 7332.442000000015,
"styleRecalcs": 2,
"styleRecalcDurationMs": 1.4770000000000025,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6466.613,
"heapDeltaBytes": 4574680,
"heapUsedBytes": 81267228,
"domNodes": -271,
"jsHeapTotalBytes": 253952,
"scriptDurationMs": 5105.9130000000005,
"eventListeners": -174,
"totalBlockingTimeMs": 43,
"frameDurationMs": 17.776666666666703,
"p95FrameDurationMs": 33.29999999999927
},
{
"name": "large-graph-idle",
"durationMs": 2023.1750000000375,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.509,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 515.0689999999998,
"heapDeltaBytes": -10978312,
"heapUsedBytes": 77118104,
"domNodes": -251,
"jsHeapTotalBytes": 28672,
"scriptDurationMs": 31.511999999999997,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2025.1969999999346,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.662000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 469.7349999999999,
"heapDeltaBytes": -7531788,
"heapUsedBytes": 79831496,
"domNodes": -241,
"jsHeapTotalBytes": 1077248,
"scriptDurationMs": 33.46099999999999,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2151.5529999999217,
"styleRecalcs": 67,
"styleRecalcDurationMs": 12.646999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1329.6350000000002,
"heapDeltaBytes": 18693380,
"heapUsedBytes": 83873500,
"domNodes": 12,
"jsHeapTotalBytes": 1536000,
"scriptDurationMs": 678.847,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2159.131000000002,
"styleRecalcs": 66,
"styleRecalcDurationMs": 11.587999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1402.7060000000001,
"heapDeltaBytes": 15201648,
"heapUsedBytes": 79726068,
"domNodes": 8,
"jsHeapTotalBytes": 749568,
"scriptDurationMs": 681.1080000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3221.4629999999715,
"styleRecalcs": 63,
"styleRecalcDurationMs": 11.928,
"layouts": 60,
"layoutDurationMs": 15.34,
"taskDurationMs": 1390.9000000000003,
"heapDeltaBytes": 8183488,
"heapUsedBytes": 74560212,
"domNodes": 8,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 635.93,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3228.9309999999887,
"styleRecalcs": 63,
"styleRecalcDurationMs": 12.87,
"layouts": 60,
"layoutDurationMs": 13.816,
"taskDurationMs": 1458.4489999999998,
"heapDeltaBytes": 9856120,
"heapUsedBytes": 75401616,
"domNodes": 8,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 657.975,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "legacy-node-drag",
"durationMs": 2362.581999999975,
"styleRecalcs": 46,
"styleRecalcDurationMs": 8.821,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1612.4999999999998,
"heapDeltaBytes": -16456620,
"heapUsedBytes": 74759040,
"domNodes": -220,
"jsHeapTotalBytes": -8192,
"scriptDurationMs": 814.986,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2384.2989999999418,
"styleRecalcs": 44,
"styleRecalcDurationMs": 6.977,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1643.3929999999996,
"heapDeltaBytes": 14369120,
"heapUsedBytes": 82533864,
"domNodes": 8,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 826.922,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2003.0970000000252,
"styleRecalcs": 6,
"styleRecalcDurationMs": 4.971,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 553.816,
"heapDeltaBytes": 20632076,
"heapUsedBytes": 84711636,
"domNodes": -246,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 34.607,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2047.9810000000498,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.601,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 621.902,
"heapDeltaBytes": -7540448,
"heapUsedBytes": 82138868,
"domNodes": -240,
"jsHeapTotalBytes": 552960,
"scriptDurationMs": 38.666999999999994,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 556.5690000000814,
"styleRecalcs": 49,
"styleRecalcDurationMs": 11.953000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 357.55699999999996,
"heapDeltaBytes": 13994332,
"heapUsedBytes": 84264364,
"domNodes": 24,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 127.751,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 545.6159999999954,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.652,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 345.744,
"heapDeltaBytes": 13884416,
"heapUsedBytes": 77343380,
"domNodes": 20,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 122.113,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2008.6029999999937,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.592,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 404.53799999999995,
"heapDeltaBytes": 10990660,
"heapUsedBytes": 81076112,
"domNodes": -275,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 8.895999999999999,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2004.4959999999037,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.713,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 397.54,
"heapDeltaBytes": 11834364,
"heapUsedBytes": 81698388,
"domNodes": -273,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 8.562999999999999,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1693.313000000046,
"styleRecalcs": 47,
"styleRecalcDurationMs": 13.932,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 617.4409999999999,
"heapDeltaBytes": -6994580,
"heapUsedBytes": 63048544,
"domNodes": -276,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 89.62,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1693.2339999999613,
"styleRecalcs": 44,
"styleRecalcDurationMs": 11.322,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 606.586,
"heapDeltaBytes": -9221336,
"heapUsedBytes": 61168984,
"domNodes": -277,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 85.467,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 867.2280000000683,
"styleRecalcs": 18,
"styleRecalcDurationMs": 23.217000000000002,
"layouts": 5,
"layoutDurationMs": 9.542000000000002,
"taskDurationMs": 692.391,
"heapDeltaBytes": 20221952,
"heapUsedBytes": 103859208,
"domNodes": 13667,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 21.449999999999996,
"eventListeners": 2383,
"totalBlockingTimeMs": 93,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8235.79499999994,
"styleRecalcs": 251,
"styleRecalcDurationMs": 39.713,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4794.938,
"heapDeltaBytes": -19408892,
"heapUsedBytes": 67941360,
"domNodes": -210,
"jsHeapTotalBytes": 5009408,
"scriptDurationMs": 2289.986,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8522.964000000002,
"styleRecalcs": 251,
"styleRecalcDurationMs": 40.501,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5081.012,
"heapDeltaBytes": -6804560,
"heapUsedBytes": 80219784,
"domNodes": -238,
"jsHeapTotalBytes": 253952,
"scriptDurationMs": 2314.721,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 15000.111999999945,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14874.781,
"heapDeltaBytes": -28238732,
"heapUsedBytes": 192713848,
"domNodes": -8061,
"jsHeapTotalBytes": -18493440,
"scriptDurationMs": 219.20600000000002,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 15036.278000000038,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14957.974999999999,
"heapDeltaBytes": -34240988,
"heapUsedBytes": 176858612,
"domNodes": -8061,
"jsHeapTotalBytes": -12431360,
"scriptDurationMs": 228.097,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 17650.14599999995,
"styleRecalcs": 127,
"styleRecalcDurationMs": 16.316999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17525.56,
"heapDeltaBytes": -69822048,
"heapUsedBytes": 167591832,
"domNodes": -8061,
"jsHeapTotalBytes": -16101376,
"scriptDurationMs": 719.3559999999999,
"eventListeners": -14928,
"totalBlockingTimeMs": 18,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 17556.287999999993,
"styleRecalcs": 121,
"styleRecalcDurationMs": 16.35599999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17485.489999999998,
"heapDeltaBytes": -49221880,
"heapUsedBytes": 188395468,
"domNodes": -8062,
"jsHeapTotalBytes": -16957440,
"scriptDurationMs": 758.0740000000001,
"eventListeners": -14928,
"totalBlockingTimeMs": 32,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 5239.375999999993,
"styleRecalcs": 20,
"styleRecalcDurationMs": 59.91800000000003,
"layouts": 20,
"layoutDurationMs": 22.50400000000001,
"taskDurationMs": 5213.156,
"heapDeltaBytes": -45088384,
"heapUsedBytes": 178221180,
"domNodes": -8062,
"jsHeapTotalBytes": 16019456,
"scriptDurationMs": 88.93499999999999,
"eventListeners": -14928,
"totalBlockingTimeMs": 233,
"frameDurationMs": 17.220000000000013,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 5413.062000000082,
"styleRecalcs": 20,
"styleRecalcDurationMs": 64.97200000000001,
"layouts": 20,
"layoutDurationMs": 24.261999999999993,
"taskDurationMs": 5380.478,
"heapDeltaBytes": -40182148,
"heapUsedBytes": 197382572,
"domNodes": -8062,
"jsHeapTotalBytes": 17977344,
"scriptDurationMs": 94.18599999999999,
"eventListeners": -14928,
"totalBlockingTimeMs": 315,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-zoom-out-idle",
"durationMs": 7393.5789999999315,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7347.324000000002,
"heapDeltaBytes": 4325984,
"heapUsedBytes": 175221760,
"domNodes": 0,
"jsHeapTotalBytes": -12058624,
"scriptDurationMs": 110.402,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-zoom-out-idle",
"durationMs": 7385.124000000019,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7330.876000000002,
"heapDeltaBytes": 37535172,
"heapUsedBytes": 195542424,
"domNodes": 0,
"jsHeapTotalBytes": -4456448,
"scriptDurationMs": 109.458,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 462.7490000000307,
"styleRecalcs": 19,
"styleRecalcDurationMs": 23.471000000000004,
"layouts": 6,
"layoutDurationMs": 3.191,
"taskDurationMs": 129.455,
"heapDeltaBytes": 5493500,
"heapUsedBytes": 71332564,
"domNodes": 155,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 16.37,
"eventListeners": 81,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666682,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 71.71100000005026,
"styleRecalcs": 5,
"styleRecalcDurationMs": 10.286999999999999,
"layouts": 3,
"layoutDurationMs": 1.441,
"taskDurationMs": 54.39599999999999,
"heapDeltaBytes": 2982872,
"heapUsedBytes": 69056840,
"domNodes": 121,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 4.794,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999727
}
]
} |
#18665's reportWorkflowBound lands at cyclomatic 13 / CRAP 49.5 on cloud/1.55, which fallow gates as a newly introduced finding. Extracts the pending-bind parking, the pending-bind take, and the last-reported lookup into named helpers. Behaviour is unchanged: the fallback passed to lastReportedWorkflowFor is the same expression the old ternary's else branch computed, and it has no side effects.
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## cloud/1.55 #19803 +/- ##
=============================================
Coverage ? 80.91%
=============================================
Files ? 2213
Lines ? 117900
Branches ? 33522
=============================================
Hits ? 95401
Misses ? 22111
Partials ? 388
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
3b81246 to
29fc07f
Compare
christian-byrne
left a comment
There was a problem hiding this comment.
Reviewed exact head 29fc07f against cloud/1.55 b064d92. The branch is 6 commits ahead / 0 behind, required lint-and-format and test checks pass, no unresolved review threads remain, and the backport-only reportWorkflowBound helper extraction preserves the prior fallback/clearing semantics. I found no blocking source-delta defect. The still-running cloud Playwright job is non-required; do not merge unless it finishes green.
Summary
Single consolidated backport into
cloud/1.55of Hunter's agent telemetry / paywall attribution cluster. Each PR was cherry-picked individually, in merge order, with conflicts resolved and typecheck + the affected suites run before each commit.f937e5573aagent_panel_openon run attribution events (PM-1471)437f420c53agent_panel_openfresh (PM-1472)f70be945cdffbaaaea8dc1607791f0#18664 is not here — it already landed
The request listed six PRs. #18664 (panel open time: pagehide teardown + visibility flag, G2/G3) is already on
cloud/1.55, backported as part of #19790 ("Complete 1.54 parity sweep"), which merged while this branch was being built. Its commit body lists #18664 explicitly, andgetPageVisibilityMetadata.{ts,test.ts}are present on the base. This branch was rebased onto the newcloud/1.55and the now-redundant #18664 cherry-pick dropped. All six PRs from the request are oncloud/1.55once this merges.Applied in merge order rather than the order listed in the request: #18390 (Sep 25) merged three days before #18974 (Sep 28), which is a direct follow-up fixing #18390's E1/E3 gaps. Applying #18974 first would have meant resolving the follow-up against a base missing the thing it fixes.
Two backport-specific commits on top
29fc07f3d6refactor(agent): splitreportWorkflowBoundfor the fallow CRAP gate. feat: instrument agent panel actions #18665'sreportWorkflowBoundlands at cyclomatic 13 / CRAP 49.5 on this base, whichfallowgates as a newly introduced finding (it was the only one of the 9 reported findings actually attributed to this PR —complexity_introduced: 1, the other 25 are inherited). Extracted the pending-bind parking, the pending-bind take, and the last-reported lookup into named helpers. Behaviour is unchanged: the fallback passed tolastReportedWorkflowForis the same expression the old ternary's else branch computed, and it has no side effects.npx fallow audit --changed-since <base>now returnsverdict: pass,complexity_introduced: 0.Co-authored-by:trailers stripped (Claude Fable 5,Amp), which.github/scripts/check-ai-co-authors.shrejects. No human co-author attribution was removed. The script passes locally against this base.Conflict resolutions
The recurring cause is that
cloud/1.55already carries later work these PRs predate — chiefly the #19521 backport (standing credits-exhausted paywall), which introducedAgentPaywallSurface; the #19497 backport (app:agent_error/ TEL-8); and #19790's agent-panel target handling.#18665 —
useAgentSession.ts. The incoming patch andcloud/1.55both rewrote the malformed-event / message-done region.cloud/1.55's version is the superset: it hastrackMalformedStreamEvent(TEL-8),markStoppedTurnReady, andhandleActiveTab. Kept that and folded in #18665's additions —turnStartedAtcleanup onagent_message_doneand in the malformed path,forgetActiveTurnStartedAt(), and theonAskResolvedcallback. Dropped #18665'shandleMessageDone, whose inline stopping→ready transitionmarkStoppedTurnReadyalready performs.#18665 —
AgentPanelRoot.vue, against #19790. Two conflicts introduced by the rebase:start()next to its new approval handlers. [backport cloud/1.55] Complete 1.54 parity sweep #19790 had already movedstart()deliberately, with a comment explaining the ordering against target startup. Kept [backport cloud/1.55] Complete 1.54 parity sweep #19790's call site and added only the approval handlers, avoiding a secondstart().onNewChat— [backport cloud/1.55] Complete 1.54 parity sweep #19790 replacedsetWorkflowTarget(activeWorkflow)withretainWorkflowTarget()/startFollowingVisibleWorkflow()keyed on selection tags. Kept [backport cloud/1.55] Complete 1.54 parity sweep #19790's logic; feat: instrument agent panel actions #18665's contribution there is only threadingsourceintonewChat(source).#18390 / #18974 —
surfacefield. Roughly 20 conflicts acrosstypes.ts,PostHogTelemetryProvider,HostTelemetrySink,TelemetryRegistry, andAgentPanelRootwere the same shape:cloud/1.55carriessurfaceonAgentPaywallShownMetadata/AgentPaywallCtaMetadata, #18390 branched before it existed. Keptcloud/1.55in every case and folded in #18390's actual contribution, the{ source: 'agent_paywall' }argument toopenAccountPrecondition.#18390 — duplicates from a clean auto-merge. Several files auto-merged without a conflict but produced duplicate declarations, because #18390 re-added what #19521 already backported. Removed the duplicate copy in each: the paywall-impression
watchinAgentPanelRoot.vue,claimPaywallImpressioninagentConversationStore.ts,trackAgentPaywallShown/trackAgentPaywallCtaClickedinPostHogTelemetryProvider.ts, and duplicate type imports inTelemetryRegistry.tsandagentPaywallPresentation.ts.resolvePaywallswas kept over the incomingsetPaywallsResolved, which has no definition on this branch.#18401 —
agentPanelStore.test.ts. Both sides appended tests at the same point; kept both.Deliberately dropped
#18974's one-line addition to theintent-stage top-up event inTopUpCreditsDialogContentWorkspace.vue.cloud/1.55'sTopupBillingEventstage union isBillingStarted | BillingSucceeded | BillingFailed— there is nointentstage, andhandlePrimaryActionemits no telemetry on the amount→confirm step. #18974 only addedpayment_intent_sourceto an event that does not exist here, so there was nothing to attribute. The field itself is on the type, and the other fivepayment_intent_sourcecall sites (started, two synchronous failures,succeeded,reportPurchaseError) plus theadoptPendingOperationpoller hand-off all applied. E3's actual coverage is intact.Two test expectations were adjusted to match the branch rather than upstream:
TopUpCreditsDialogContentWorkspace.test.ts— the fourcarries the opening surface onto every top-up eventrows drop'intent'from their expected stage collections, matching the dropped emit. They still assert the whole projected(stage, source)collection, so the falsifier fix(telemetry): close the E1 and E3 agent paywall attribution gaps #18974 relied on is preserved for every remaining site.AgentPanelRoot.test.ts—attributes its CTA to the credits_exhausted surfacenow expectsopenAccountPrecondition('credits', { source: 'agent_paywall' }). That test came from [backport cloud/1.55] feat(agent): show the credits paywall when the workspace runs out, not only when a send is refused #19521 and predates feat: attribute agent paywall purchases through checkout telemetry #18390's new argument.Tests
On
3b81246105, rebased ontob064d929ce:pnpm typecheck— exit 0 across all five projects (app, account-core, billing-web, account-ui, billing-contract).pnpm lint— 0 errors, 198 warnings, all pre-existingimport-x/no-restricted-pathsandimport-x/no-named-as-default-memberin files this PR does not touch.pnpm format:check— clean.pnpm vitest run src/workbench/extensions/agent src/platform/telemetry src/extensions/core/agentPanel.test.ts— 167 files passed, 2826 passed, 2 expected fail, 0 failures.pnpm test:unit(whole suite) passed exit 0 on the pre-rebase tree; it is re-running against this base, and CI is the authority on the result.Browser/Playwright tests were not run locally — those only run in CI, and no claim is made about them here.