fix(web/claw): render and download the images a turn hands over
ci / checks (push) Successful in 1m13s
android / debug (push) Successful in 2m17s
android / release (push) Successful in 2m13s
ci / test (push) Successful in 42s
ci / chart (push) Successful in 5s
ci / docker (push) Successful in 1m52s
ci / web (push) Successful in 12s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m57s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 13s
ci / publish-edge-chart (push) Successful in 3s
ci / checks (push) Successful in 1m13s
android / debug (push) Successful in 2m17s
android / release (push) Successful in 2m13s
ci / test (push) Successful in 42s
ci / chart (push) Successful in 5s
ci / docker (push) Successful in 1m52s
ci / web (push) Successful in 12s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m57s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 13s
ci / publish-edge-chart (push) Successful in 3s
An attachment card lands inside the turn that produced it, and both passes that touch image cards scanned only the top-level rows. The pass that fetches bytes never saw the card, so it stayed a name and a size with no picture. The pass that stores the fetched object URL had the same blind spot, so even a fetch that ran dropped its result. Both now walk finished turns and the live one, through one helper that knows where cards live. Consents move to the same helper: a card whose turn already closed had the same problem. The download control was hidden for `media: "image"`, which left an image with no way out of the store when its bytes did not paint, as they never did. Every card offers it now. The anchor also joins the document for the click, which some browsers require before they follow a `download` on a blob URL.
This commit is contained in:
1 parent
1a1ace014a
commit
04b06e7623
4 files changed
+83
-67
No files matched your search
+10
-5
@@ -112,11 +112,16 @@ Two consequences worth knowing before changing this code:
|
||||
and again on the stream's `consent_resolved` echo; nothing persists
|
||||
client-side, so a reload rebuilds the cards from the replay.
|
||||
- **Attachments render inline.** An `attachment` event becomes a card
|
||||
— media glyph, file name, B/KB/MB size, caption. Images fetch the
|
||||
bearer-guarded bytes (`GET /v1/attachments/{id}`, blob → object URL,
|
||||
like the identity images) and render capped at 240px; code and file
|
||||
cards download on click. Object URLs cache per id, so a replay never
|
||||
refetches.
|
||||
— media glyph, file name, B/KB/MB size, caption. The media kind comes
|
||||
from the file extension, decided by the daemon when it stores the
|
||||
file, so a `.png` renders and a `.patch` downloads without the client
|
||||
guessing. Images fetch the bearer-guarded bytes
|
||||
(`GET /v1/attachments/{id}`, blob → object URL, like the identity
|
||||
images) and render capped at 240px; every card downloads on click,
|
||||
images included. A card lives inside the turn that produced it, so
|
||||
the scan that fetches image bytes walks finished turns and the live
|
||||
one, not just the top-level rows. Object URLs cache per id, so a
|
||||
replay never refetches.
|
||||
- **Your images ride along.** The composer's `+` — and an image on the
|
||||
clipboard — stage as removable chips (`▣1 photo.png 1.2 MB`), the
|
||||
claw's own budget enforced client-side (8 a message, 5 MiB decoded
|
||||
|
||||
Reference in new issue
Block a user