Skip to content

fix: polish the save download error row and stop layout shift - #191

Merged
flamboh merged 3 commits into
mainfrom
fix/save-error-states
Sep 2, 2026
Merged

flamboh merged 3 commits into
mainfrom
fix/save-error-states

Conversation

@flamboh

@flamboh flamboh commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Note

🤖 Fable 5 on behalf of Oliver

problem

Download failures in tagium save rendered as bare red text mounted below the fixed-height progress slot, so the error's variable height pushed recent downloads (and, on short viewports, the attribution) around. Each failure also fired a sonner toast on top of the inline row, reporting the same thing twice.

solution

  • ErrorRow now renders inside the existing reserved h-9 progress slot — working and error states are mutually exclusive, so they share it. Showing or clearing an error moves nothing.
  • The row is a vertically centered single-line truncated message (full text in a title tooltip) with retry/reset icon buttons sized to fit the slot, and a fade-in that respects prefers-reduced-motion. No card or border — just the text and buttons.
  • The redundant toast is gone: presentVideoDownloadFailure now uses the pure getSystemFailurePresentation instead of reportSystemFailure, which only fed this one inline path. All other failure contexts still toast as before.

review instructions

  1. Run bun run dev, open http://localhost:3001/?app=tagium-save (or your dev port), and with no cobalt instance running, submit any valid https url. Expect the inline error "downloads are temporarily unavailable." to appear inside the download stage with no toast and no movement of the recent-downloads list or attribution.
  2. Hit retry/reset on the row — retry re-runs the download, reset returns to idle; again nothing below should shift.
  3. Edge cases worth a glance: dark mode (theme toggle, same tokens), and a retryable vs non-retryable failure (non-retryable hides the retry button).

Tradeoff to consider: long provider messages truncate to one line (full text in the title tooltip and screen-reader alert). All current failure messages are short normalized strings, so truncation should be rare.

Verified automatically: bun run typecheck, bun run lint, and the full bun run test suite (899 tests) pass, including a new regression guard asserting the alert renders inside the reserved slot and that no toast fires. Layout stability was also confirmed in-browser: the slot's bounding rect is identical before and after the error appears.


🤖 changes written by gpt-5.6-luna via codex, orchestrated and reviewed by Fable 5 in Claude Code.

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit e688ea3.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 29, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tagium e688ea3 Commit Preview URL

Branch Preview URL
Sep 02 2026, 03:40 AM

@flamboh
flamboh force-pushed the fix/save-error-states branch from 43f287c to e688ea3 Compare September 2, 2026 03:38
@flamboh
flamboh merged commit 913e385 into main Sep 2, 2026
6 checks passed
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