34ed127653
New <toast-host> overlay: components post 'toast' CustomEvents ({message, kind: success|error|info}) and it shows brief, auto-dismissing, bottom-right toasts (errors linger). <repo-menu> (git + coordination actions) and <pr-list> (create/merge) now post friendly success/error toasts instead of alert(); the activity feed still logs everything. Also adds the slice 11 CHANGELOG entry. Verified live: 'Checked for updates' toast shown.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.0 KiB
1.0 KiB
toast-host
Intent
A singleton overlay for brief command-result feedback (AGENT.md §6 polish). It
gives immediate, legible confirmation of what a UI action did — "Published",
"Merged & cleaned up PR #3", or an error — instead of only the activity feed or a
browser alert(). Any component can post to it without a reference to it.
Public surface
- Tag:
<toast-host>(place once, near the end of the page). - Listens:
toastondocument—detail: { message, kind?, timeout? }, wherekind∈success | error | info(defaultinfo). - Behavior: toasts stack bottom-right, animate in, auto-dismiss (errors last longer — 6s vs 3.5s), and dismiss on click. Renders nothing until posted to.
History
- 2026-09-20: created — slice 12; inline toasts for menu/PR command results.
Notes / gotchas
- Posters build the
CustomEventthemselves (components are standalone, no shared module); keep the detail shape in sync with this contract. - Messages are set via
textContent(no HTML injection).