Repository navigation
fix(native): render heading images through guarded media - #211
Merged
Merged
Conversation
rynfar
force-pushed
the
nw/187-heading-images
branch
2 times, most recently
from
November 4, 2026 19:41
af5e441 to
54a6822
Compare
rynfar
force-pushed
the
nw/187-heading-images
branch
from
November 4, 2026 20:32
aefb219 to
b498c3e
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.
Heading-authored Markdown images bypassed the native guarded media path. ATX h1–h6 and Setext images now use the existing bounded renderer, guarded/signed source resolution, streamed reference context and document-relative file preview scope. Surrounding prose retains heading typography, inline formatting and link ownership. Literal block-looking text stays inline; angle and GFM URL/email autolinks retain their parsed destinations. Heading wrappers keep the pinned 0.3rem trailing padding in normal, last and list contexts.
Mixed assistant citations now follow source order. The native client first validates the exact window quote against the message's live parent and child participants and their current document/run source. It then maps those owned selections onto the rendered source, restores ordinary text enclosed by nested endpoints and constructs the citation from the contiguous source span. This covers paragraphs before, between and after image headings, including parent copies that already enclose custom blocks. Unmapped, ambiguous or noncontiguous media selections are refused. Message/thread/connection checks and weak child lifetimes remain in place. No global renderer or copy rewrite is included.
Refs #187; keep it OPEN. TR-MEDIA stays partial for native playback and table/HTML image forms. Only that row differs from the current 131-row ledger; all other 130 rows, intake audit references and UPSTREAM are preserved. Scope remains core media/policy.rs and assistant_citations.rs; transcript media.rs, markdown.rs and messages.rs; thread_view/citations.rs; and the TR-MEDIA ledger row. No snapshot, dependency, AppState, main, composer, workspace, toast, client-store or inspector/timeline edits.
Metadata-only integration rebase: exact head
b498c3e1923674b177be2758dcf2bf83e5380087is based on actualnative8ae4831dd6c096973f4648a373c4c4f73307d175, which includes the merged #233 conformance fix. All six feature source blobs are identical to runtime headaefb2195a32a5ade8a4e63afaeed4d22bd4eec86./private/tmp/native-factory-2f5f764a/evidence-187-headings-rebase-8ae/rebase-proof.jsonrecords each blob/hash, the current 131-row ledger and preserved UPSTREAM. The other 130 rows include the new TR-INSPECT partial/#233 content unchanged. No new feature implementation, app invocation or captures were made for this rebase.The new exact-head validation receipts are in
/private/tmp/native-factory-2f5f764a/evidence-187-headings-rebase-8ae/checks-manifest.jsonl: strict workspace Clippy, all 1,386 native workspace tests, theme/parity, conformance--check, diff whitespace and normal/snapshot builds pass. The merged #233 conformance fix is now verified on this head. Overall validation remains RED only for inherited full-ledger formatting (exit1): the current base and rebased formatter comparison each change 282 lines, and the required other 130 rows remain byte-identical. No broad formatting or #233 source/fixture edit is included.The R5 regression and runtime evidence below belong to
aefb2195a32a5ade8a4e63afaeed4d22bd4eec86on the previous917a20bdaa1c9eaa9112faccc914231c0209cd4abase. Source-identity receipts connect that preserved evidence to this metadata-only rebase; no exact rebased-head runtime execution is claimed.The existing focused GPUI citation case was extended with a meaningful failing regression before the fix. It now covers preceding/interleaved paragraphs, an empty or selected parent between headings, the retained following-paragraph and child-only cases, Unicode UTF-16 offsets, enclosing parent copies, repeated visible words, foreign quote text, current-source replacement and expired child lifetime.
Preserved local runtime evidence:
/private/tmp/native-factory-2f5f764a/evidence-187-headings-r3/.prior-drag-before.png/prior-drag-after.pngandbetween-drag-before.png/between-drag-after.png: immutable fixtures and identical gestures reproduce then restore Cite.prior-cite-after.png,between-cite-after.png,after-cite-final.pngand their composer audits: actual drag→Cite→composer, correct environment/thread/message identity, source-order quotes/ranges 0–17, 4–27 and 5–22, zero submissions. The pinned between-heading selection omits the parent participant; the citation restores the ordinary source text between its owned endpoints.final/summary.json,final/source-proof.json,final/checks-manifest.jsonl,final/citation-proof.json,final-manifest.jsonlandcapture-manifest.jsonl: exact head/tree, source/fixture hashes, argv, cwd, exits, build hashes and separate document/full-app counts. All earlier rounds and raw logs remain intact. An invalid extra test fixture that included image-alt text is explicitly marked inexpanded-fixture-correction.json; it is not the meaningful R5 red.The preserved document-only heading/control samples retain selection with zero notifications and draws. Full-app samples are reported separately and remain nonzero. Earlier LLVM callback profiling remains attributed to its original af5e head; no new callback profile is claimed for this head. Initial first-round file-before/file-after captures lacked an explicit selected thread and remain invalid integration evidence. Corrected previews prove relative-image fallback plus a data image, not a successful signed relative-file fetch. Prior heading/literal/spacing/autolink evidence remains in the earlier evidence directories. Known #202 offscreen glyph loss remains separate from production behavior.
Remaining live verification limits: thirty-minute signed URL renewal, two fallback environments and first live mid-turn rewrite. All runtime verification uses copied smoke14658 state only, with no real windows, clipboard/browser automation, new servers, provider turns or server mutations. Screenshots stay local.
Built with GPT-6.1 Sol in Codex