feat(#3996): render generated images inline via manifest-gated resolution - #4029
Draft
aheritier wants to merge 2 commits into
Draft
feat(#3996): render generated images inline via manifest-gated resolution#4029aheritier wants to merge 2 commits into
aheritier wants to merge 2 commits into
Conversation
Collaborator
Author
|
👋 This PR has merge conflicts with the base branch. Please rebase or merge the latest base branch and resolve them. I've moved it to draft and added |
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 24, 2026 15:13
7438c97 to
2bb441e
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 25, 2026 08:01
2bb441e to
105245f
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 25, 2026 08:17
105245f to
d9ac92d
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 25, 2026 08:33
d9ac92d to
781cec4
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 25, 2026 20:24
781cec4 to
5339887
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 26, 2026 11:11
5339887 to
28ee2f3
Compare
Collaborator
Author
|
👋 This PR has merge conflicts with the base branch. Please rebase or merge the latest base branch and resolve them. I've moved it to draft and added |
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
September 1, 2026 16:30
28ee2f3 to
f209843
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
September 1, 2026 19:59
f209843 to
20a7918
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
September 6, 2026 16:15
20a7918 to
2b3832d
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
September 7, 2026 11:19
2b3832d to
07465fa
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
September 7, 2026 11:35
07465fa to
c64ba62
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
September 7, 2026 16:25
c64ba62 to
39a1e31
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
September 7, 2026 16:48
39a1e31 to
7d74be6
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
September 8, 2026 06:17
7d74be6 to
6261e50
Compare
…tion Render model-generated images inline in the same assistant turn (with a filename-only fallback on non-graphics terminals), resolving strictly through LocalRuntime.ResolveGeneratedFile: one recorded reference resolves to bytes plus a validated canonical path, gated on the generated-media manifest, the owning session's persisted WorkingDir (bounded parent fallback, never the viewer cwd), os.Root containment, and symlink-free path components — a forged DocumentSource or a symlink swapped in after materialization selects nothing. Per-owner roots and manifest records are cached on the runtime and seeded at materialization. The chat page attaches a sanitized "unavailable" placeholder synchronously and resolves inside a routed tea.Cmd — never in Update — then swaps results in by ID, for live MessageAddedEvents and for restored session messages. Successful resolution shows the canonical workspace path in the non-graphics fallback; every failure (missing, replaced, tampered, unknown root kind, unrecorded) degrades to the filename-only wording. Runtimes without the capability (remote) render nothing. TUI regression tests pin that same-turn labels and fallbacks come from the final persisted Document name and the resolver-validated canonical workspace path (including collision-suffixed names) — the TUI never constructs paths or sees provisional MediaDelta names.
Resolve manifest-authorized generated media from the owning session's SQLite blob before consulting the legacy workspace path. Return defensive copies from the database path, keep the canonical workspace display path when the stored WorkingDir remains valid, and otherwise fall back to the artifact filename without making the bytes unavailable. Rows created before migration 029 still use the existing manifest-gated workspace resolver, including symlink and containment checks and the 20 MiB workspace read bound. A corrupt or unreadable blob is an error and never silently selects a potentially different workspace file.
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
September 8, 2026 07:58
6261e50 to
7479fbe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Renders generated images inline in the TUI through manifest-gated file resolution, with runtime events, app state, and component coverage.
Why
Users can inspect generated images directly in chat while resolution remains restricted to known session manifest entries.
Validation
task test; generated-file, runtime, message, TUI component, and chat tests.Test instructions
Run:
task testStart a TUI session, generate an image, and inspect the chat. Expected: the generated image renders inline. Attempt to reference an unmanifested path; expected: it is not resolved or displayed.