Working notes: a shown file's card, an edit's diff, what is parsed and not drawn

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
HomerandClaude Fable 5.2 committed 2026-11-24 13:32:24 +00:00
1 parent 3eddd22425
commit 025bcf45ea
1 file changed
+23
+23
@@ -370,3 +370,26 @@ design change, before a phone.
folder today, "in the trash", or -- from an instance without the route (`noSuchRoute`) -- the
folder it was written to. **An archive's entries** come in its content answer (`archive`)
and are drawn as text (`ArchiveBody`); nothing is unpacked on the phone.
- **A file an agent showed is `media` with `shown`** (`contract/tool_media_shown.json`,
`ShownMediaTest`): no `show` card, no attachment, drawn by `MediaCard` where generated media
is. `kind` is then the file's own (`image`, `audio`, `video`, `pdf`, `model3d`, `archive`,
`binary`, `text`, or a word the app does not know). **A shown file is never nothing**: every
card names the file, says its kind in words (`mediaKind(kind, shown)`: an unknown kind is
"File") and has Open in Files, Download, Share and Open with -- also a picture, whose name
stands under it, because a picture this phone cannot decode is otherwise an empty box. A new
kind gets a word in `mediaKindWord`, an icon in `mediaIcon` and, only if the phone can draw
it, a `MediaView`. A PDF is `MediaView.Document`: Open lays its pages out over the chat
(`DocumentDialog`, `PdfBody(Raw, …)`, by node id). A 3D model has no viewer here.
- **An edit's diff is worked out on the phone** (`api/Diff.kt`, `ui/chat/DiffCard.kt`) from the
card's `diffs` (`contract/event_ask_edit.json`): both texts are a model's and a file's words
of up to 2 MB, so every step has a bound -- the middles are compared only up to a million
line pairs (past that: old removed, new added), one file's diff is one plain `Text` of at
most `DIFF_MOST` lines of at most `DIFF_LINE_MOST` characters, folded to `DIFF_FOLD` until
opened. The lines scroll sideways in their own box; the card (a sheet that scrolls down)
never does. Nothing in a diff is rendered or highlighted. Where an item has `diffs` they
stand in place of its `detail` (the call's arguments as JSON).
- **A picture in a reply waits at the gate** (`Pictures.load`, `passLater`), like every other
fetch of the account's files; before, one that came into view behind the lock was fetched.
- **Parsed and drawn nowhere** (the editor round's pin): a device's `files`, `files_writable`,
`files_that_run_code`; `EditorModels` (`GET /editor`); the `device_fs_*` shapes have no model
at all yet. There is no browser for a linked computer's files and no editor settings screen.