Skip to content

feat(desktop): show Agent Graph output previews - #4751

Open
testikun wants to merge 4 commits into
apache:mainfrom
testikun:codex/issue-3714-agent-graph-v2
Open

feat(desktop): show Agent Graph output previews#4751
testikun wants to merge 4 commits into
apache:mainfrom
testikun:codex/issue-3714-agent-graph-v2

Conversation

@testikun

@testikun testikun commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Project a 280-code-point per-operator output preview and usage-derived token rate from the child Session's existing RuntimeEvent/read-model authority. Live deltas fold replay-safe absolute offsets; durable rebuilds use completed model text and provider-reported output-token usage.
  • Carry the optional bounded fields through the strict Runtime Host allowlist/decoder, bumping the compatibility epoch from 109 to 110, and render distinct live/result labels plus TPS in the Desktop Agent Graph panel.
  • Keep the existing Open child task path and leave graph scheduling, admission, execution, recovery, and child-session semantics unchanged.

Fixes #3714

Verification

  • node --test packages/runtime/dist/__tests__/stream-graph-projection.test.js packages/runtime/dist/__tests__/stream-graph-read-model.test.js packages/runtime-host/dist/__tests__/agent-graph-protocol.test.js packages/runtime-host/dist/__tests__/agent-graph-coordinator.test.js apps/desktop/dist/main/__tests__/agent-graph-panel.test.js — 45 passed
  • node --test --test-name-pattern="boots an empty graph" packages/runtime/dist/__tests__/stream-graph-coordinator.test.js — the CI regression passes with bounded output-commit and exact invalidation coverage
  • npm --workspace @maka/runtime run test:dist — 3,224 tests; 3,211 passed, 13 skipped, 0 failed
  • npm run typecheck — passed; affected Runtime, Runtime Host, and Desktop typechecks also passed after rebasing onto current main
  • npm run lint — passed
  • npm run format:check — passed
  • npm --workspace @maka/desktop run build:with-deps — passed after the final rebase
  • npm --workspace @maka/desktop run check:architecture — 71 passed; renderer architecture check passed against the final base
  • npx knip --workspace apps/desktop and npx knip --workspace packages/ui — passed
  • npm --workspace @maka/desktop run build-storybook — passed
  • node scripts/protocol-epoch-check.mjs --staged — passed (109 -> 110)

Real-window verification: built and launched current head ff866d713 in a visible local Electron App, opened the production Agent Graph panel through the repository's persisted Host projection, and verified streaming/completed output previews, measured TPS, the 24-operator scroll layout, collapse behavior, and retained Open child task actions.

Real App screenshot

This is a direct capture from the locally built and running Maka Electron App after the test above; it is not a Storybook render, mockup, or generated image.

Real Maka Agent Graph output previews

Review focus

RuntimeEvents remain the only output/usage authority. The new projection is presentation-only and bounded before it reaches the wire; it does not create graph activity records for text deltas or participate in supervisor replay.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex implemented the bounded Runtime/read-model projection, strict protocol plumbing, Desktop rendering, deterministic tests, Storybook fixture, and verification. The material commit carries the required Generated-by: OpenAI Codex trailer.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/L Under 1000 readable lines label Sep 4, 2026
@testikun
testikun force-pushed the codex/issue-3714-agent-graph-v2 branch from e0010b0 to ff866d7 Compare September 4, 2026 09:04
testikun and others added 3 commits September 5, 2026 09:53
Project bounded child output and usage-derived throughput from existing RuntimeEvent facts into the Agent Graph read model, then render streaming and completed previews without changing graph execution semantics.

Generated-by: OpenAI Codex
Replace the obsolete no-delta-write assertion with bounded streaming projection and one-invalidation-per-commit coverage.

Generated-by: OpenAI Codex
@testikun
testikun force-pushed the codex/issue-3714-agent-graph-v2 branch from ff866d7 to 156bc6d Compare September 5, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/L Under 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(desktop): Agent Graph 节点 TPS 与输出 preview

1 participant