Skip to content

Add shared Studio toast handling - #256

Merged
thsnkhn merged 4 commits into
mainfrom
studio-toasts
Aug 30, 2026
Merged

Add shared Studio toast handling#256
thsnkhn merged 4 commits into
mainfrom
studio-toasts

Conversation

@thsnkhn

@thsnkhn thsnkhn commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a shared Studio toast system with store, host component, and useToast() helper.
  • Wire API responses to emit best-effort toast intents alongside existing dialogs without changing request semantics.
  • Surface toast feedback in the record form and document the v1 toast contract in docs/toasts.md.

Testing

  • Added unit coverage for the API client toast path, toast store behavior, and toast JSON serialization.
  • Not run (not requested).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c9902bfa65

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

</script>

<template>
<div v-if="visibleToasts.length" class="studio-toast-host" aria-live="polite" aria-atomic="false">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep toast live region mounted

When the toast list is empty, this v-if removes the aria-live container, so the first toast after an idle period is inserted as part of a newly created live region rather than as a change to an existing one. Screen-reader users can miss initial or single success/error toasts in that scenario; keep the live region mounted and conditionally render only the toast children or hide the empty container instead.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 1b0c02a. The aria-live toast host now remains mounted when the queue is empty, with a regression test.

@thsnkhn
thsnkhn merged commit d211ce7 into main Aug 30, 2026
3 checks passed
@thsnkhn
thsnkhn deleted the studio-toasts branch August 30, 2026 17:41
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