Skip to content

feat(image-output): render generated images from rollout - #1651

Open
zein-wang wants to merge 2 commits into
BigPizzaV3:mainfrom
zein-wang:codex/image-output-rendering
Open

feat(image-output): render generated images from rollout#1651
zein-wang wants to merge 2 commits into
BigPizzaV3:mainfrom
zein-wang:codex/image-output-rendering

Conversation

@zein-wang

Copy link
Copy Markdown

变更概述

Render image generation results stored in Codex rollout files so generated images can appear in the Codex++ chat UI.

主要改动

  • Add an image output data service that locates rollout JSONL files and extracts image_generation_call results as data URLs.
  • Add the /image-outputs bridge route and wire it through the launcher data service.
  • Render found images in the injected chat UI and keep the data bridge watchdog from falling back to core-only routes.
  • Add data-layer and bridge route tests.

验证

  • cargo test -p codex-plus-data image_outputs
  • cargo test -p codex-plus-core bridge_routes_cover_all_current_paths

[#AI]

@BigPizzaV3

Copy link
Copy Markdown
Owner

Codex++ maintainer review note

当前 main 下这个 PR 仍存在 merge conflict,暂时不能合并。请先 rebase 到最新 main 并解决冲突;更新后我们会重新跑针对性测试再复审。

This PR currently conflicts with main, so it is not mergeable yet. Please rebase onto the latest main and resolve the conflicts, then we can review and test it again.

@zein-wang
zein-wang force-pushed the codex/image-output-rendering branch from a66c133 to 68d3019 Compare July 27, 2026 02:07
@zein-wang

Copy link
Copy Markdown
Author

Rebased onto latest main (0ceb2d0) and resolved the conflict in apps/codex-plus-launcher/src/main.rs by keeping the upstream BridgeReinjector flow and preserving the image output bridge additions.\n\nLocal targeted tests passed:\n- cargo test -p codex-plus-data image_outputs\n- cargo test -p codex-plus-core bridge_routes_cover_all_current_paths\n\nThanks!

@zein-wang
zein-wang force-pushed the codex/image-output-rendering branch 4 times, most recently from 553b023 to dca8fbe Compare July 28, 2026 02:56
@zein-wang

Copy link
Copy Markdown
Author

Updated this PR with the final image-output rendering fixes after local validation.

Changes since the previous review update:

  • grouped generated images by turn_id instead of rendering the whole session image list at the latest assistant message;
  • added assistant_text metadata from rollout so the renderer can anchor each generated image under the matching assistant response;
  • delayed rendering when the assistant response DOM is not ready yet, and repositions existing image lists when the initial anchor was unstable;
  • preserved the existing bridge/reinjection flow from latest main.

Local verification:

  • node --check assets/inject/renderer-inject.js
  • cargo fmt --check
  • cargo test -p codex-plus-data image_outputs
  • cargo test -p codex-plus-core image_output_result_json_shape_matches_rust_model
  • cargo test -p codex-plus-core bridge_routes_cover_all_current_paths
  • cargo build --release

Visual validation screenshots:

Commit: dca8fbe
image
image

@zein-wang
zein-wang force-pushed the codex/image-output-rendering branch 4 times, most recently from 19875e9 to 86256ed Compare August 1, 2026 13:48
@zein-wang
zein-wang force-pushed the codex/image-output-rendering branch from 86256ed to f01bf36 Compare August 3, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants