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
@@ -1,7 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
// The agent handing a file over: a head row naming it, the image (when
|
||||
// there is one) under it, capped so a screenshot cannot take the
|
||||
// stream; code and file download on click.
|
||||
// stream. Every card downloads, images included: a picture the browser
|
||||
// cannot paint, an SVG, or bytes that failed to fetch must still come
|
||||
// out of the store.
|
||||
import type { AttachmentCard } from '~/composables/useTranscript'
|
||||
|
||||
defineProps<{ attachment: AttachmentCard }>()
|
||||
@@ -35,7 +37,6 @@ function formatBytes(size: number): string {
|
||||
<span class="attachment-name mono">{{ attachment.name }}</span>
|
||||
<span class="attachment-size mono">{{ formatBytes(attachment.size) }}</span>
|
||||
<button
|
||||
v-if="attachment.media !== 'image'"
|
||||
class="ghost"
|
||||
:title="`download ${attachment.name}`"
|
||||
@click="emit('download', attachment.id, attachment.name)"
|
||||
|
||||
Reference in new issue
Block a user