fix(gif): still previews + a11y for recent GIFs

Address findings from 2 review agents on the recent-GIFs row:

- Motion/perf: the Recent row rendered up to 16 full animated GIFs at
  once (autoplaying). Capture a small still image at pick time
  (fixed_width_small_still / *_still) into RecentGif.previewUrl and render
  that for the thumbnail, so recents no longer autoplay. Pre-existing
  recents without a preview fall back to the animated url. Re-send still
  uses the animated url, so the sent m.image is unchanged.

- a11y: the recent buttons all had the identical label "Send recent GIF".
  Give them positional labels ("Send recent GIF N of M") and wrap the grid
  in a role="group" labelled by the "Recent" section heading, so the row
  is a distinguishable, announced group.

Correctness review found no bugs (write-before-unmount, term gating,
dedupe, re-send fidelity all verified).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 12:34:51 -04:00
co-authored by Claude Opus 4.8
parent 5b58e5fe43
commit 9a4796c167
2 changed files with 41 additions and 12 deletions
+2
View File
@@ -5,6 +5,8 @@ export type RecentGif = {
url: string;
width: number;
height: number;
/** A small still image used for the picker thumbnail (so recents don't all autoplay). */
previewUrl?: string;
};
const STORAGE_KEY = 'cinny_recent_gifs_v1';