Repository navigation
fix(native): preserve structured tool results and inspector images - #254
Conversation
|
R1 fixed in 142f796 on actual fork/native 917a20b. The one-line change renders CallPart::Key with the existing selectable helper and stable part ID, keeping muted typography and all JSON/HTML/TypeScript value rendering, bounds and caches intact. No new state or trivial UI wiring tests. Identical-fixture offscreen drags leave html/options labels unselected before and visibly selected after. Local HTML pair: After the final source change: 1,383 native tests, 42 parity tests, strict Clippy, theme/conformance generation, scoped formatting and both normal/snapshot builds passed. All commands joined, and the branch is clean. Source/build/capture manifests, exact argv, exits, hashes and all attempts are separate in |
Structured MCP results with blank text showed the whole content/structuredContent envelope, and results with images preferred their text summary over structured data. The native inspector also left JSON/HTML arguments and output unhighlighted, and images followed arguments inside the output slot.
Port the current itemDetail.ts and V2ItemInspector.tsx behavior from
pingdotgg/t3code#30389: prefer meaningful structuredContent when text is blank or images are present, retain unsupported/overflow image markers and the original eight served-image indices, put images before arguments independently of the output slot, and prepare JSON/HTML syntax once in the existing bounded inspector cache. Large JSON arguments remain capped with plain text beyond the syntax budget. The existing off-thread derivation and fetched-item lifetimes stay in place. Regenerate the existing item-detail fixture from the real TypeScript implementation.Tracks #233. TR-INSPECT remains partial; filename inference and unported web lexers remain tracked by #64/#78/#108/#233. All other 130 actual-base ledger rows, intake source/Issue/status bookkeeping, and UPSTREAM are preserved against fork/native 917a20b.
Validation: reproduced the exact upstream conformance red (6 pass/1 fail, structured-blank output text), then all 7 conformance cases passed. Core behavior and inspector derivation tests also failed before their fixes. Final checks after the last source change: 1,383 native workspace tests, 42 parity tests, strict workspace Clippy, theme generation, conformance generation, scoped row formatting/whitespace, and normal plus snapshot builds all passed. The full ledger already has unrelated formatter drift on the base; only the owned row was formatted, and the pre-commit autoformatter was skipped to preserve the other rows. No repo-wide check:changed was run.
Local evidence (not uploaded or committed):
/private/tmp/native-factory-2f5f764a/evidence233/before-structured.png/private/tmp/native-factory-2f5f764a/evidence233/after-structured.png/private/tmp/native-factory-2f5f764a/evidence233/before-images.png/private/tmp/native-factory-2f5f764a/evidence233/after-images.png/private/tmp/native-factory-2f5f764a/evidence233/final-proof.jsonand adjacent files.Inspected both before/after pairs using identical fixtures and gestures. These are offscreen captures through the existing turn-items hook and a copied 14658-only home. The image pair proves fallback placement, not successful signed/live MCP image fetching. No real windows or provider turns were used by this worker; live image delivery remains unverified. The historical #185 incident remains recorded in the factory handoff, and known #202 glyph loss is separate. The existing user app bundle hash is unchanged. Primary merged integration remains the factory's gate.
R1 follow-up: separated JSON/HTML argument labels now use the existing selectable text helper, preserving their muted typography and stable IDs. This is a one-line view change and also restores selection for the pre-existing TypeScript label path; capping, syntax budgets and cached derivation are unchanged. No state/logic changes or trivial UI unit tests were added. All required native checks and both builds passed again after the final source change.
R1 local selection proof:
/private/tmp/native-factory-2f5f764a/evidence233-r1/final-proof.json; HTML before/after PNGsbefore-html-selection.pngandafter-html-selection.png, JSON before/after PNGsbefore-json-selection.pngandafter-json-selection.pngin that directory. Identical fixtures and drags leave labels unselected before and visibly selected after. The HTML pair is fully legible; the JSON after capture shows the selected options label with known #202 glyph loss elsewhere, preserved as a limitation. No clipboard action was used. Original evidence and final-proof.json are unchanged.Built with GPT-6.1 Sol in Codex