Skip to content

Fade inline images and Mermaid diagrams in from their spinner - #119

Merged
Tarquinen merged 1 commit into
devfrom
image-load-fade
Nov 17, 2026
Merged

Tarquinen merged 1 commit into
devfrom
image-load-fade

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

A Markdown image or a Mermaid diagram in the transcript replaced its loading spinner box in one frame once it loaded.

Now its pixels fade in over the dim role, as the agent image gallery's already do. Under Reduce Motion the fade uses the reduced curve, and an image that was already decoded when the view first showed doesn't fade.

Verified on the emulator against session-lab:

  • Inline image (files checkpoint, 3 s file latency, cold start) and Mermaid diagram (math-diagrams checkpoint, cold start): frame by frame, each now passes through partly transparent frames instead of a one-frame swap, in light and dark.
  • With animations off, both show fully drawn at once.
  • scripts/check.sh :feature:transcript :feature:media passes.

Not checked on a phone.

Left alone: the tool image tile still appears fully drawn, because in a live reply it mounts before the list has scrolled to it, so a fade there finishes out of sight. The box still changes height when the image or diagram loads, since the real size isn't known until then.

The video shows v0.8.0 (left) and this branch (right) loading an inline image and a Mermaid diagram, at real speed and at 1/4 speed.

before-after.mp4

A Markdown image or Mermaid diagram that finished loading replaced its
spinner box in one frame. Now its pixels fade in over the dim role, as
the agent image gallery's do: reduced under Reduce Motion, and no fade
when the image was already decoded when the view first showed.

Verified on the emulator against session-lab (files checkpoint with
3 s file latency, cold start; math-diagrams checkpoint, cold start):
frame by frame the image and diagram pass through partly transparent
frames in light and dark, and show at once with animations off.
scripts/check.sh :feature:transcript :feature:media passes.
@Tarquinen
Tarquinen merged commit 88735d1 into dev Nov 17, 2026
3 checks passed
@Tarquinen Tarquinen mentioned this pull request Nov 18, 2026

This branch was previously deployed

1 inactive deployment
release — d6aabfd6 Deployed Nov 17, 2026 by Tarquinen via check #402
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