Skip to content

[agent-v1 roll-up] feat(agent): review-audit deltas from the v1 slicing - #16448

Closed
CodeJuggernaut wants to merge 332 commits into
mainfrom
nathaniel/agent-v1/rollup
Closed

CodeJuggernaut wants to merge 332 commits into
mainfrom
nathaniel/agent-v1/rollup

Conversation

@CodeJuggernaut

@CodeJuggernaut CodeJuggernaut commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Single merge vehicle for the agent-v1 review-audit deltas. During the slicing and review audits of the original agent-v1 work, 130 review artifacts (29 high severity - security scoping, race fixes, and their regression tests) were found that did not make it through the large integration merge (#16198). This PR is the eleven slices merged in order from today's main, so everything lands in one merge.

Review happens on the slice PRs - each shows only its own delta, with its resolved artifacts listed in its description:

# Conflicts:
#	docs/adr/README.md
#	src/services/litegraphService.test.ts
# Conflicts:
#	docs/adr/README.md
# Conflicts:
#	src/services/litegraphService.test.ts
# Conflicts:
#	src/components/LiteGraphCanvasSplitterOverlay.vue
# Conflicts:
#	package.json
#	vite.config.mts
- agent REST client with typed responses and AgentApiError
- conversational event schemas with recorded REST/WS fixtures
- turn transport folding ws events into assistant message parts
- event source adapting the api host socket, interface homed here
  until the session composable lands
- knip transitional entries for types the session and renderer
  slices consume
- toApiError's tail falls through to the canonical error parser, so a
  short text/plain proxy body surfaces and an HTTP/2 response with no
  reason phrase yields 'HTTP <status>' instead of an empty message
- the four caller-id path interpolations percent-encode, so a hostile
  id cannot retarget the route
- turn ids mint through toTurnId instead of a banned cast; the real
  account UID in the ws-turn-edit fixture is replaced with test-actor
- the three clock-vulnerable transport tests pin Date.now; new pins for
  the tabs wire flattening, the per-emit snapshot contract, the
  pagination cap, the ws-fixture glob lower bound, and the ComfyApi
  host shape
- JSON null parsed to a body the ?? treated as absent, so the raw text
  'null' surfaced as the user-facing error message; the canonical
  parser degrades all JSON primitives to the status fallback, and the
  agent path now matches it for every pinned case
- session composable owning thread, message, turn, cancellation,
  and active-tab state over the landed control plane
- conversation store folding transport events into entries with
  identity-keyed turn reconciliation
- run-mode store persisting the auto/ask choice
- the event-source interface now imports from its 07 home; the
  session locale notices land with their consumer
- knip transitional entries retire as their consumers land (the
  config-hint gate forces per-slice retirement)
DEFECT-FIX F1 (hydrateFromServer/loadThread/start): a loadThread whose
history GET failed non-404 left the previous thread's transcript
rendered under the new thread id, and the two hydrate entry paths
disagreed on failure semantics. Entry-path hydrates now reset identity
and transcript together on failure and clear the persisted key; the
start() rehost path keeps its retain semantics. Receipt: (f1a)/(f1b)
red at faff148, green here.

DEFECT-FIX F2 (sendMessage): the try wrapped post-ack bookkeeping, so a
localStorage.setItem or workflow.adopted throw after a server-accepted
POST reported the turn failed and orphaned its events. Store
transitions now precede the fallible side effects, persistence and
consumer bookkeeping are best-effort, and sending clears on every path.
Receipt: (f2a)/(f2b) red at base.

DEFECT-FIX F3 (localErrorCount): the instance-scoped counter re-minted
duplicate error ids into the app-scoped store across a remount; moved
to module scope beside sessionGeneration. Receipt: (f3) red at base.

DEFECT-FIX T3-guard (start): re-subscribing without releasing the prior
subscription double-ingested every frame under the real source's
per-call closure semantics; the old single-slot test fake masked it.
Receipt: (t3b) red at base under the per-subscription fake.

F4 (knip.config.ts): whole-file ignore replaced with the
knipIgnoreUsedByStackedPR tag on WorkflowTurnContext. Receipt: knip
exit 0 with the tag; exit 1 reporting WorkflowTurnContext without it.

F5/F6 (test file): import grouping per file idiom; SelectedNode shadow
carries its retirement marker (slice 16).

F12 (knip.config.ts): agentMessageParts comment names the actual
residual (PartState, NoticePart, TabLinkPart, ActivityPart) now that
the factory is consumed by this slice.

Pins: (t1a)/(t1b) post-settle frame immunity on the active and
background-retained paths; (t2a-d) workflow wire shape, prepare gate,
timeout, and rejection; (t3a)/(t3b) subscription lifecycle; (t4) reset
resurface probe; (t5a)/(t5b) rememberedWorkflowId across remounts, with
module state reset in beforeEach. Mutant receipts in the round
delivery.
DEFECT-FIX R2-1 (hydrateFromServer 404 branch): the 404 sibling of
R1's F1 still stranded the foreign transcript - it returned before
the reset, nulling identity while leaving the previous thread's rows
rendered. resetOnFailure now folds into the 404 branch (reset when
set, setThreadId(null) otherwise); rehost 404 semantics unchanged.
Receipt: (r2a) red at BOTH faff148 and b6948b7, green here.

DEFECT-FIX R2-2 (start boot path): R1 passed resetOnFailure=true on
the stored-key boot branch beyond the package, which destroyed an
accepted in-flight turn on a transient 500 and deleted the resume
pointer. The boot path no longer resets, and every reset site now
requires activeTurnId === null, so a turn accepted mid-fetch is
never destroyed. Receipt: (r2b) red at b6948b7 (green at
faff148 - the hazard was introduced by R1), green here.

DEFECT-FIX R2-3 (sendMessage): workflow.prepare/current()/tabs() ran
after sending=true but outside the try, so a synchronous throw
latched sending forever and killed the composer until remount. All
three now run inside the inner try: a throw surfaces sendFailed and
the finally clears sending. Receipt: (r2c) red at both bases (the
latch predates R1), green here.

DEFECT-FIX R2-4 (post-ack catches): both silent catches now
console.warn per the file's own idiom; the adopted() hook is the
09-14 consumer surface and must be diagnosable. Receipt: the warn
assertions folded into (f2a)/(f2b) are red at b6948b7.

Corrections of record for the R1 commit body (b6948b7):
- "entry-path hydrates reset identity and transcript together on
  failure" was FALSE for the 404 half until R2-1.
- "sending clears on every path" was FALSE for synchronous workflow
  callback throws until R2-3.
- The R1 start() guard dedupes the SUBSCRIPTION only; a second
  start() still costs a duplicate history GET (known, harmless).
- loadThread resets while rehost retains is a deliberate divergence;
  both satisfy the coherence-on-failure property.

Hygiene: (t2b)/(t2d) moved onto fake timers (each leaked a pending
real 3s timer); (t5a) flushes its unawaited boot hydrate.
DEFECT-FIX R3-1 (director ruling, hydrateFromServer): the R2
in-flight guard re-opened the stranded-transcript failure at the 404
site when a send acked against the loading thread mid-flight. Both
resetOnFailure sites now STASH-THEN-RESET: stashActiveTurn() parks
the accepted turn in background state (reset does not clear it),
then reset() clears the foreign rows and identity; the acked turn
resumes on a later load of its thread; the activeTurnId guard
retires. Receipts: (r3a) 404 flavor and (r3b) 500 flavor red at
e0d9180, green here. Known cost boarded, store fenced: reset's
dropAttachmentPreviews revokes the stashed turn's blob previews.

Pins R3-4: (r3c) throwing tabs() and (r3d) synchronously-throwing
prepare join the no-latch property; both red at b6948b7 and
faff148 (they inherit R2-3's receipt), green since R2-3.

Hygiene R3-5: (t5a) now awaits the actual hydrate promise from the
getMessages spy result instead of two blind microtask ticks, so the
dangling-hydrate flush is proven, not assumed.

Notes

- Receipt-integrity corrections for the R2 delivery doc land beside
  this commit (observed failure text, executed-vs-call-site test
  counts reconciled: it.for at (b6) registers two tests per site).
- thread listing with recency grouping over the server's titles
- rename overlay and delete tombstones cover the endpoints the
  server does not expose yet
DEFECT-FIX T1 (agentChatHistoryStore.test.ts): the persistence
property was unpinned - all nine shipped tests stayed green with
useLocalStorage swapped for a plain ref. New pin walks a rename and
a tombstone across the pinia re-instantiation boundary in the
sibling idiom (agentRunModeStore's save / nextTick / createPinia
round-trip). Receipt: mutant-red - the ref-swap turns exactly the
new pin red while the nine shipped tests stay green.

DEFECT-FIX T2: the newest-first assertion could not fail - the
input literal was already sorted. The literal now leads with
earlyToday so input order differs from expected order; expected
values unchanged, timezone-independent. Receipt: mutant-red -
removing the sort turns the today-bucket assertion red.

T3 (director ruling, honest minimum): the spring-forward test name
claimed DST discrimination it does not have (the transition
postdates the computed boundary in every timezone); renamed to what
it proves. startOfLocalDay's DST behavior at the yesterday boundary
stays unpinned - recorded in the round delivery and boarded to the
chain tail with the TZ-mechanism gap.

Notes

- Store blob 5ce2253 untouched (hash-verified before and after).
- code blocks with lazy shiki highlighting and a plain escaped
  fallback (shiki joins the workspace catalog)
- tool-call cards and grouping with reasoning and duration rows
- the tool glyph map pairing each tool's label key and icon
- renderer strings land with their consumers; the tool-grouping
  spec for the message container follows with that component
- the message container, markdown stream, user message, and
  feedback controls compose over the landed leaves
- media asset groups with audio playback, lazy 3D thumbnails, and
  lightbox handoff; workflow tab-link cards navigate through the
  shared workflow service
- the agent theme and panel style sheets land with their first
  mounted consumers, wired through the global style import
- the tab binding store rides with its first consumer; the
  tool-grouping spec returns to its full form
- the composer surface: text entry, node references from canvas
  selection, asset drag-in, attachment chips with upload states
- attachment validation and upload through the shared asset paths
- the workflow selector chip binds a chat to a tab, backed by the
  tab activity store landing with this first consumer
- the run-mode popover writes the persisted run preference
- the agent tooltip builder completes its shared composable
The slice's restore of useAgentSession.test.ts to canonical bytes
deleted the three chain-authored 08-fix describe blocks while
useAgentSession.ts stays deliberately divergent, carrying the 08
fixes those tests pin. Per the round ruling, the pins move VERBATIM
(from 3fc436c) into useAgentSessionChainFixes.test.ts: the three
describes, the Set-based fakeEvents double with its
subscription-semantics comment, resetHarness, and the helpers they
depend on. The canonical test file is untouched. The header states
provenance and the retirement rule: delete this file in the same
commit that ever reverts useAgentSession.ts to canonical.

Receipts: without this file, greps for the five re-covered paths'
markers (sendFailed handling, the persist-failure warn, double-start
ingestion, the prepare timeout gate, the remount id-mint pin by its
test name) hit zero test files; with it they restore, and the pins
run green against the divergent composable.
The follower doc, wire schema and frame client, mint ports, litegraph
mutator and semantic projector, layout follower bridge, op envelope and
sender, schema guard, and the dev panel - all flag-gated and inert with
no consumer in this slice (activation arrives with the agent stack).
Carries the beforeLoadGraph/afterLoadGraph extension hooks, the
layoutStore withActor scope, graph traversal support, the four
transport prompt-error registrations with their locale entries, the
comfy-multi-player dependency with its license-scan exclusion, ADR-0020
and the follower boundary check. Transitional knip entries mark the
tree until slices 07+ import it.
…heet

- rename ADR 0020 -> 0024 (main already carries 0020-0023), fix its H1,
  update all references, add the missing README index row
- correct the license-exclusion comment: the pinned package declares
  GPL-3.0-only and ships a LICENSE file
- genericize RUN-CLOUD-E2E.md (no internal hosts or names) and note the
  follower has no mount site until the agent-panel slice
- install __agentCrdtPoc only under import.meta.env.DEV
- update stale PoC comments; document both load hooks in
  docs/extensions/core.md including the configure-failure asymmetry
- port the child's graph-load hook test and pin once-each-in-order
- pin afterLoadGraph skipped when graph configure fails
- cover the four agent prompt-error types in the resolver suite
- document beforeLoadGraph/afterLoadGraph pairing on ComfyExtension
- dedupe findSubgraphPathById/findSubgraphNodePathById via a shared walk
- reject async callbacks in layoutStore.withActor, with a pinning test
- exercise the traversal walker's malformed-subgraph guard
- remove the comfy-multi-player license-scan exclusion: the pinned
  package declares GPL-3.0-only (allowlisted), and keeping the check
  live guards future pin bumps of a git-ref dependency
- render CrdtDevPanel only in dev builds; knip tracks it via ignore
  instead of entry so unused-export reporting stays live for the tree
- reword the ADR and boundary-check lines that asserted an env gate
  that does not exist on this branch
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 1, 2026
## Summary

Extract transcript normalization from the conversation store so
persisted history is deterministically ordered by sequence and grouped
by stable turn identity.

## Changes

- **What**: adds a pure `normalizeAgentTranscript` helper and focused
tests, then delegates `hydrate()` to it without changing the store's
hydrated-message bookkeeping.

## Review Focus

Please verify that sequence ordering, stable `turn_id` identity, and
assistant/user grouping match the existing inline hydration behavior.
This is the bounded `cjx-7` extraction from frozen audit source Comfy-Org#16448
onto current `main`; it intentionally excludes unrelated rollup changes.

Validation:

- `pnpm test:unit
src/workbench/extensions/agent/services/agent/agentTranscript.test.ts
src/workbench/extensions/agent/stores/agent/agentConversationStore.test.ts`
(22 passed)
- `pnpm typecheck`
- targeted ESLint and commit hooks, including Knip

No UI behavior changes; Storybook and screenshots are not applicable.

---------

Co-authored-by: Pipeline Agent <agent@pipeline.local>
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 1, 2026
Extracts the frozen Comfy-Org#16448 CRDT follower runtime-gate contract without
changing the follower, ECS adapter, or human-op sender seams.

- [KEEP row:
`followerGate.test.ts`](https://github.com/christian-byrne/in-app-agent-program/blob/170beabe5ff3daebd39bf02cf7f68e25914185c2/program/cj16448-triage.md#L114)
- [KEEP row:
`followerGate.ts`](https://github.com/christian-byrne/in-app-agent-program/blob/170beabe5ff3daebd39bf02cf7f68e25914185c2/program/cj16448-triage.md#L115)

<details><summary>Full context for agent readers</summary>

The two extracted files are byte-identical to frozen Comfy-Org#16448 head
`278338e6a0`. Original authorship is preserved for Nathaniel Parson
Koroso.

Verification on Node 25:
- all 17 `src/workbench/extensions/agent/crdt` test files: 169 tests
passed
- `pnpm typecheck`: passed
- `pnpm lint`: passed with existing repository warnings only
- `pnpm knip`: passed
- Oxfmt check: passed

The diff leaves `useAgentCrdtFollower.ts`, `ecsFollowerAdapter.ts`, and
`opSender.ts` unchanged.

</details>

authored-by:agent

---------

Co-authored-by: Nathaniel Parson Koroso <tetratrade@zoho.com>
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 1, 2026
## Summary

Preserve the chat-history inline rename editor through dropdown focus
restoration and bucket regrouping, extracted from the frozen Comfy-Org#16448
audit source onto current `main`.

## Changes

- **What**: Fence dropdown auto-focus restoration, commit valid rename
drafts on blur, preserve draft/focus across regrouping, and cap titles
at 200 characters.
- **Tests**: Expand `ChatHistoryScreen` unit coverage and add a
Playwright regression for the dropdown-close focus race.

## Review Focus

Please focus on the `@close-auto-focus.prevent` boundary and the
callback-ref behavior when a renamed row changes history bucket. Source
provenance: frozen Comfy-Org#16448 head
`278338e6a0e30e95be3659e4a6c24f3a6f6cc513`; no commits were pushed to
that branch.

## Screenshots (if applicable)

Not applicable; behavior-only focus fix with executable browser
coverage.

Linear: FE-1308

---------

Co-authored-by: Pipeline Agent <agent@pipeline.local>
christian-byrne added a commit that referenced this pull request Sep 2, 2026
Extracts the frozen #16448 CRDT follower runtime-gate contract without
changing the follower, ECS adapter, or human-op sender seams.

- [KEEP row:
`followerGate.test.ts`](https://github.com/christian-byrne/in-app-agent-program/blob/170beabe5ff3daebd39bf02cf7f68e25914185c2/program/cj16448-triage.md#L114)
- [KEEP row:
`followerGate.ts`](https://github.com/christian-byrne/in-app-agent-program/blob/170beabe5ff3daebd39bf02cf7f68e25914185c2/program/cj16448-triage.md#L115)

<details><summary>Full context for agent readers</summary>

The two extracted files are byte-identical to frozen #16448 head
`278338e6a0`. Original authorship is preserved for Nathaniel Parson
Koroso.

Verification on Node 25:
- all 17 `src/workbench/extensions/agent/crdt` test files: 169 tests
passed
- `pnpm typecheck`: passed
- `pnpm lint`: passed with existing repository warnings only
- `pnpm knip`: passed
- Oxfmt check: passed

The diff leaves `useAgentCrdtFollower.ts`, `ecsFollowerAdapter.ts`, and
`opSender.ts` unchanged.

</details>

authored-by:agent

---------

Co-authored-by: Nathaniel Parson Koroso <tetratrade@zoho.com>
christian-byrne added a commit that referenced this pull request Sep 2, 2026
## Summary

Preserve the chat-history inline rename editor through dropdown focus
restoration and bucket regrouping, extracted from the frozen #16448
audit source onto current `main`.

## Changes

- **What**: Fence dropdown auto-focus restoration, commit valid rename
drafts on blur, preserve draft/focus across regrouping, and cap titles
at 200 characters.
- **Tests**: Expand `ChatHistoryScreen` unit coverage and add a
Playwright regression for the dropdown-close focus race.

## Review Focus

Please focus on the `@close-auto-focus.prevent` boundary and the
callback-ref behavior when a renamed row changes history bucket. Source
provenance: frozen #16448 head
`278338e6a0e30e95be3659e4a6c24f3a6f6cc513`; no commits were pushed to
that branch.

## Screenshots (if applicable)

Not applicable; behavior-only focus fix with executable browser
coverage.

Linear: FE-1308

---------

Co-authored-by: Pipeline Agent <agent@pipeline.local>
@huang47 huang47 added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026 — with ChatGPT Codex Connector
@huang47 huang47 removed the risk:R3 PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026
christian-byrne added a commit to christian-byrne/ComfyUI_frontend that referenced this pull request Sep 2, 2026
Narrows agent prompt error handling to object errors with a string
`message`, preventing unsafe property access while preserving existing
grouping behavior.

- [KEEP row:
`useErrorGroups.test.ts`](https://github.com/christian-byrne/in-app-agent-program/blob/4848c1b60a6d56209b93ad9e7d46a677763d2e4e/program/cj16448-triage.md#L27)
- [KEEP row:
`useErrorGroups.ts`](https://github.com/christian-byrne/in-app-agent-program/blob/4848c1b60a6d56209b93ad9e7d46a677763d2e4e/program/cj16448-triage.md#L28)

<details><summary>Full context for agent readers</summary>

This focused extraction adds a type guard before reading `error.message`
and covers primitive and message-less error values without importing
unrelated Comfy-Org#16448 changes.

Verification on Node 25:
- focused Vitest: 47 tests passed
- `pnpm typecheck`: passed
- `pnpm lint`: passed with existing repository warnings only
- `pnpm knip`: passed after rebuilding the stale local cache; no ignores
added
- `git diff --check`: passed

</details>

<!-- authored-by:agent cjx-5-unblock -->

---------

Co-authored-by: Alexander Brown <drjkl@comfy.org>
@christian-byrne christian-byrne added cursor-review Trigger multi-model Cursor agent review on this PR and removed cursor-review Trigger multi-model Cursor agent review on this PR labels Sep 2, 2026
github-merge-queue Bot pushed a commit that referenced this pull request Sep 12, 2026
## Summary

Keeps graph toasts inside the workspace inset when the agent panel
narrows the canvas.

## Changes

- Applies the workspace inset to the toast fallback when neither CSS
anchor is available.
- Adds a browser regression that verifies the rendered toast stays
inside that inset.

## Review Focus

Please verify the nested CSS anchor fallback remains correct when
neither the graph anchor nor docked agent panel is present.

## Evidence

- `pnpm test:unit src/components/toast/GlobalToast.test.ts` — 7 passed.
- Focused ESLint and Oxfmt — passed.
- `pnpm typecheck` — passed.
- `pnpm knip --cache` — passed, including the pre-push hook.
- `pnpm exec playwright test
browser_tests/tests/toastNotifications.spec.ts --list` — 6 tests
discovered, including the fallback regression.
- Commit hooks — passed on Node 25.

Source accounting: extracts the approved workspace-inset behavior from
frozen #16448 at `278338e6a0`, excluding selection-mode test churn and
source-markup assertions per the triage ledger. The current diff is 2
files, +35/−1 against `main`.

<!-- authored-by:agent lane-cjx-3-1653 -->
christian-byrne added a commit that referenced this pull request Sep 12, 2026
## Summary

Prevent an asynchronously loaded workflow from being inserted after its
target canvas has been replaced.

## Changes

- **What**: Capture the target canvas before loading and abort if
`app.canvas` changes; add a permanent regression test covering both the
old and replacement canvases.

## Review Focus

Please verify that aborting the stale insertion is preferable to
redirecting it into the newly active canvas. This extracts only the
canvas-identity race fix from frozen PR #16448 and deliberately excludes
its rejected selection-mode blocking.

## Screenshots (if applicable)

Not applicable; behavior is covered by the focused unit test.

Justification: Christian approved the proposed merge path in
blocked-on-christian #330 and explicitly authorized ignoring the newly
introduced feature-flag-policy failure for this previously approved fix.

---------

Co-authored-by: Pipeline Agent <agent@pipeline.local>
@CodeJuggernaut

Copy link
Copy Markdown
Contributor Author

Closing: superseded by the merged agent slices.

christian-byrne added a commit to christian-byrne/ComfyUI_frontend that referenced this pull request Sep 21, 2026
## Summary

Extracts provider-neutral gaps from frozen
[Comfy-Org#16448](Comfy-Org#16448) onto
`main`: agent API failures resolve through the existing error catalog,
feedback telemetry carries nullable workflow attribution, and feedback
now derives that attribution from the rated assistant message rather
than mutable session state.

## Changes

- Registers `agent_api_failed` and adds focused catalog-routing
coverage.
- Types nullable feedback `workflow_id`.
- Attributes feedback to the rated message's final tab link, with
last-tab and null-path regression coverage.
- Omits PostHog engagement expansions, unused `VITE_AGENT_CRDT_FOLLOWER`
typing, stale CRDT POC documentation, and the untranslated
`agent_draft_apply_failed` key.

## Review Focus

Please verify that the extraction stays provider-neutral and that
per-message workflow attribution is the intended behavior when a message
contains multiple or no tab links.

Source: frozen
[Comfy-Org#16448](Comfy-Org#16448) at
[`278338e6a0`](Comfy-Org@278338e);
original hunk authorship is preserved in the first commit trailer.

## Evidence

- `gh pr checks 16491 --repo Comfy-Org/ComfyUI_frontend` — exact head
[`62e11958e3`](Comfy-Org@62e1195):
no pending or failed checks; unit, E2E, lint/format, custom-node matrix,
performance, security, and CodeRabbit checks pass.
- `git diff origin/main 278338e -- <cjx-12 files>` — confirmed the
live provider-neutral residuals are `agent_api_failed` routing and
nullable feedback `workflow_id`; excluded the PostHog/provider-specific
telemetry surface.
- `rg
'VITE_AGENT_CRDT_FOLLOWER|agentCrdtFollower|Comfy.Agent.CrdtFollower'
src --glob '!vite-env.d.ts'` — no consumers; the stale environment
typing and POC README instructions remain omitted.

<!-- authored-by:agent lane-cjx-12-1658 -->

---------

Co-authored-by: Nathaniel Parson Koroso <tetratrade@zoho.com>
Co-authored-by: cheap-drain <christian@ampcode.com>
CodeJuggernaut pushed a commit that referenced this pull request Sep 23, 2026
## Summary

Extracts provider-neutral gaps from frozen
[#16448](#16448) onto
`main`: agent API failures resolve through the existing error catalog,
feedback telemetry carries nullable workflow attribution, and feedback
now derives that attribution from the rated assistant message rather
than mutable session state.

## Changes

- Registers `agent_api_failed` and adds focused catalog-routing
coverage.
- Types nullable feedback `workflow_id`.
- Attributes feedback to the rated message's final tab link, with
last-tab and null-path regression coverage.
- Omits PostHog engagement expansions, unused `VITE_AGENT_CRDT_FOLLOWER`
typing, stale CRDT POC documentation, and the untranslated
`agent_draft_apply_failed` key.

## Review Focus

Please verify that the extraction stays provider-neutral and that
per-message workflow attribution is the intended behavior when a message
contains multiple or no tab links.

Source: frozen
[#16448](#16448) at
[`278338e6a0`](278338e);
original hunk authorship is preserved in the first commit trailer.

## Evidence

- `gh pr checks 16491 --repo Comfy-Org/ComfyUI_frontend` — exact head
[`62e11958e3`](62e1195):
no pending or failed checks; unit, E2E, lint/format, custom-node matrix,
performance, security, and CodeRabbit checks pass.
- `git diff origin/main 278338e -- <cjx-12 files>` — confirmed the
live provider-neutral residuals are `agent_api_failed` routing and
nullable feedback `workflow_id`; excluded the PostHog/provider-specific
telemetry surface.
- `rg
'VITE_AGENT_CRDT_FOLLOWER|agentCrdtFollower|Comfy.Agent.CrdtFollower'
src --glob '!vite-env.d.ts'` — no consumers; the stale environment
typing and POC README instructions remain omitted.

<!-- authored-by:agent lane-cjx-12-1658 -->

---------

Co-authored-by: Nathaniel Parson Koroso <tetratrade@zoho.com>

(cherry picked from commit c14309b)
@DrJKL DrJKL added agent Comfy Agent product, integration, tests or product documentation agent-attachments Agent asset uploads, attachments or media references agent-crdt Agent document synchronization, graph projection or CRDT operations agent-docs Agent product architecture, contracts or documentation agent-session Agent sessions, history, turn lifecycle or workflow binding agent-telemetry Agent analytics, diagnostics, error reporting or observability agent-test-playwright Touches Agent-related Playwright tests, fixtures or configuration agent-test-unit Touches Agent-related unit/component tests or their support agent-ui Agent panel, composer, transcript or other user-interface components labels Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Comfy Agent product, integration, tests or product documentation agent-attachments Agent asset uploads, attachments or media references agent-crdt Agent document synchronization, graph projection or CRDT operations agent-docs Agent product architecture, contracts or documentation agent-session Agent sessions, history, turn lifecycle or workflow binding agent-telemetry Agent analytics, diagnostics, error reporting or observability agent-test-playwright Touches Agent-related Playwright tests, fixtures or configuration agent-test-unit Touches Agent-related unit/component tests or their support agent-ui Agent panel, composer, transcript or other user-interface components cursor-review Trigger multi-model Cursor agent review on this PR risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants