Skip to content

fix(native): render heading images through guarded media - #211

Merged
rynfar merged 4 commits into
nativefrom
nw/187-heading-images
Nov 4, 2026
Merged

rynfar merged 4 commits into
nativefrom
nw/187-heading-images

Conversation

@rynfar

@rynfar rynfar commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

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 b498c3e1923674b177be2758dcf2bf83e5380087 is based on actual native 8ae4831dd6c096973f4648a373c4c4f73307d175, which includes the merged #233 conformance fix. All six feature source blobs are identical to runtime head aefb2195a32a5ade8a4e63afaeed4d22bd4eec86. /private/tmp/native-factory-2f5f764a/evidence-187-headings-rebase-8ae/rebase-proof.json records 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 aefb2195a32a5ade8a4e63afaeed4d22bd4eec86 on the previous 917a20bdaa1c9eaa9112faccc914231c0209cd4a base. 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.png and between-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.png and 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.jsonl and capture-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 in expanded-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

This was referenced Nov 4, 2026
@rynfar
rynfar force-pushed the nw/187-heading-images branch 2 times, most recently from af5e441 to 54a6822 Compare November 4, 2026 19:41
@rynfar
rynfar force-pushed the nw/187-heading-images branch from aefb219 to b498c3e Compare November 4, 2026 20:32
@rynfar
rynfar merged commit ee315b2 into native Nov 4, 2026
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.

1 participant