feat(desktop): show Agent Graph output previews - #4751
Conversation
24b07e8 to
c2124a0
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Synthesis: GO, no P0–P2 (with 1 credibility note + 3 P3 observations)
This conclusion comes from @Ox-Qronos's independent review. I did not read this diff myself; I verified the current head has not drifted and the exact-head CI state.
What this diff actually does (16 files, three layers): per-operator bounded output previews (280 code points + 2KiB dual cap) with usage-derived TPS for Agent Graph projection; strict allowlist/decoder carriage of the optional output fields with compatibility epoch 133→134; Desktop panel rendering of live/result labels, TPS, and previews.
Credibility note on the PR body (not a code defect, but the author should know): the body claims the screenshot shows real output with measured TPS from a local build at ff866d713. Verification shows that commit only touches a coordinator test file (+35/-5) and contains no panel rendering (added 4 days later); the screenshot content matches storybook fixture data verbatim (session name, title, tokensPerSecond:42/18, mirrored story copy). So: real app window with synthetic data. Rendering itself matches the code path exactly, and feature validity is independently proven by local tests and hosted CI.
P3 observations:
- Write amplification tradeoff: every text delta now materializes one bounded projection commit plus invalidation (the old design explicitly asserted zero projection writes on deltas). Payloads are bounded and semantics correct, but commit volume on high-frequency streaming sessions is worth knowing. The author already declared this tradeoff in the review focus.
- Display semantic difference: durable rebuild truncates from the head while live streaming truncates from the tail, so the preview window flips from "start" to "end" on reconnect. Display layer only, authoritative data unaffected.
- Dead code: the
?? textEvents[0]!.tsfallback nearprojection.ts:346is unreachable (latestTextis guaranteed non-empty). Harmless.
Not covered: real-provider streaming TPS behavior (no live streaming environment here); whether the author validated with real data beyond fixtures (only proven inconsistent with the claimed head, intent not proven); lint/format/knip not run locally (hosted CI green governs).
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
|
Thanks for the review. The unreachable |
153a20f to
e3995ab
Compare
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
e3995ab to
44366b7
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Re-verification on new head: GO stands, P3③ fixed
This follows up the review above. The PR has since moved to a new head with exactly one commit (fix(runtime): remove unreachable output timestamp fallback), which removes the dead-code fallback this review flagged as P3③. This conclusion comes from @Ox-Qronos's re-verification. I did not read this diff myself; I verified the head binding and the exact-head CI state below.
- The removal is behavior-preserving (the preceding guard guarantees a non-empty model text event, so the fallback was unreachable).
- Prior GO verdict (no P0–P2), the credibility note, and the remaining two P3 observations carry over unchanged.
- Exact-head
testis green on this head.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
Merge current main, advance the strict protocol epoch to 136, and consistently retain the bounded output tail. Remove the now-unnecessary head/tail option and cover streamed completion and immutable rebuild. Generated-by: OpenAI Codex
|
Automated follow-up by OpenAI Codex on behalf of testikun (not an independent human review). Pushed 15d7f89, merging current main and advancing compatibility from 135 to 136. Live, completed, and rebuilt previews now consistently retain the bounded tail; removed the unnecessary head/tail selector and added regressions. The per-text-delta projection-write tradeoff remains explicit: this patch does not introduce a second throttling lifecycle or change graph execution authority. Validation: full build:test and typecheck; 55 focused projection/read-model/protocol/Host/Desktop tests and the graph boot/recovery integration case passed. diff against main passes whitespace checks. Correction to earlier evidence: the existing screenshot demonstrates a real Electron renderer with synthetic fixture data, not independently measured live-provider TPS. The old ff866d7 attribution does not prove the later panel implementation. No real-provider TPS claim is made by this verification. |
Merge latest main and retain its epoch 136 contract; graph output extends epoch 137. Generated-by: OpenAI Codex
|
Automated follow-up by OpenAI Codex on behalf of testikun. Main advanced during this repair and #5117 now owns epoch 136. Resolved the resulting conflict against main f091198: retain upstream epoch history and move the Agent Graph output extension to 137. Full build:test, 62 focused Graph projection/read-model/Desktop/protocol tests and the protocol epoch guard (136 -> 137) pass. Latest head 0dae287 is pushed. The earlier CI success belongs to the previous head; this update needs a fresh run and human review. |
Astro-Han
left a comment
There was a problem hiding this comment.
Re-verification on new head: GO stands
This follows up the reviews above. The PR has since moved to a new head containing two main merges plus three author-side changes. This conclusion comes from @Ox-Qronos's re-verification, rebuilt and re-run locally (5 suites green). I did not read this diff myself; I verified the head binding and the exact-head CI state below.
- Unified tail truncation (both durable and live paths now take the last 280 code points without trim) resolves the previously noted P3② display inconsistency, in the right direction and covered by tests.
- Panel visibility call updated for
main's refactor; no behavior concern. - Exact-head
testis green on this head.
One action needed before merge: the declared compatibility epoch (137) is already taken on main (now at 141), so another rebase with a fresh epoch stamp will be required — the gate will enforce it, do not let it linger.
- Prior GO verdict (no P0–P2) and remaining observations carry over.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
Summary
Fixes #3714
Latest Verification
After merging main at f60fcb1: full build:test and full typecheck passed; 55 focused projection/read-model/protocol/panel tests and the graph boot integration regression passed. That earlier head passed GitHub CI. After main advanced to f091198, the epoch conflict was resolved; full build:test, 62 focused tests and the protocol guard passed again. Latest-head CI is pending. Durable completion and live output now both retain the bounded tail.
Screenshot Provenance
The previously supplied image shows the real Electron renderer using synthetic fixture data. It does not demonstrate live-provider measured TPS. No new visual verification was performed in this repair pass.
Review Focus
RuntimeEvents remain the output and usage authority. The bounded projection is presentation-only. Per-delta projection writes remain an explicit tradeoff; no throttling abstraction was introduced.
AI Use
OpenAI Codex implemented and repaired this change on behalf of testikun. This update is not an independent human review. Commits include Generated-by: OpenAI Codex.
Behavior Change
Yes: Agent Graph displays bounded output previews and usage-derived token rate.