Skip to content

fix: add duration: 8000 to all toast.error() calls (#87)#88

Merged
zacharias-ona merged 1 commit into
mainfrom
fix/87-toast-error-duration
Apr 16, 2026
Merged

fix: add duration: 8000 to all toast.error() calls (#87)#88
zacharias-ona merged 1 commit into
mainfrom
fix/87-toast-error-duration

Conversation

@zacharias-ona
Copy link
Copy Markdown
Collaborator

Closes #87

What

All toast.error() calls added in PR #86 (and one pre-existing call in page-menu.tsx) used Sonner's default 4-second duration instead of the design-spec-required 8 seconds for error toasts. Users seeing transient errors had insufficient time to read the message.

How

Added { duration: 8000 } as the second argument to all 10 toast.error() calls that were missing it across page-tree.tsx (8 calls), workspace-home.tsx (1 call), and page-menu.tsx (1 call). Also fixed the example in .agents/conventions.md that showed toast.error() without the duration option — this was the root cause of the convention gap that led to the bug.

Testing

Added a static analysis regression test (src/components/toast-error-duration.test.ts) that scans all source files under src/ for toast.error() calls and fails if any are missing { duration: 8000 }. This prevents the same class of violation from recurring in future PRs.

Co-authored-by: Ona <no-reply@ona.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment Apr 16, 2026 1:17pm

Request Review

@zacharias-ona zacharias-ona merged commit fd94bf9 into main Apr 16, 2026
6 checks passed
@zacharias-ona zacharias-ona deleted the fix/87-toast-error-duration branch April 16, 2026 13:20
@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

✅ UI verification passed — design spec compliance confirmed.

All changes are behavioral only (toast.error() duration parameter). The { duration: 8000 } value matches the design spec exactly ("Duration: 4 seconds for success, 8 seconds for errors"). No visual, layout, or styling modifications were made — no violations detected.

@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

✅ Post-merge verification passed.

Ad-hoc smoke tests (all passed):

  • Landing page (/) — loaded, has title
  • Sign-in page (/sign-in) — rendered with email input
  • Health endpoint (/api/health) — healthy
  • Authenticated login flow — signed in, redirected to workspace
  • Workspace page — fully loaded

Skipped:

  • /dashboard (not yet built)
  • Editor route via sidebar (no page buttons found in test workspace)

E2E suite: 16 passed, 7 failed, 4 skipped. All 7 failures are pre-existing editor/link/page-crud issues already tracked in #85 — not caused by this PR (which only changed toast.error() duration values).

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.

bug: UI does not match design spec after PR #86

1 participant