Skip to content

Conversation

@bfollington
Copy link
Contributor

@bfollington bfollington commented Oct 22, 2025

Summary by cubic

Adds ct-toast and ct-toast-stack components and integrates them with Omnibot to show auto-dismissing notifications for assistant messages. Users now see concise toasts in the top-right without interrupting their flow.

  • New Features
    • ct-toast: variants (default, destructive, warning, success, info), dismiss button, optional action, relative timestamp, theme-aware.
    • ct-toast-stack: accepts Cell<ToastNotification[]>, positions (top/bottom + left/right/center), auto-dismiss timing, max visible, add/remove/clear APIs, emits ct-toast-action and ct-toast-dismiss.
    • Default app: converts Omnibot assistant messages into notifications via lift, stores them in a Cell, and renders a top-right stack with 5s auto-dismiss and max 5 toasts.
    • Exports: ct-toast and ct-toast-stack added to v2 index.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 6 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="packages/ui/src/v2/components/ct-toast-stack/ct-toast-stack.ts">

<violation number="1" location="packages/ui/src/v2/components/ct-toast-stack/ct-toast-stack.ts:216">
`notifications` is documented to accept either a `Cell` or a plain array, but this line always calls `.get()`. Passing an array (e.g. `&lt;ct-toast-stack .notifications=${[...]}&gt;`) triggers a TypeError because arrays do not implement `get()`, so the stack never renders. Please guard with `isCell(...)` or otherwise handle array inputs before calling `.get()`.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

`;
}

const notificationsArray = this.notifications.get();
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 22, 2025

Choose a reason for hiding this comment

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

notifications is documented to accept either a Cell or a plain array, but this line always calls .get(). Passing an array (e.g. <ct-toast-stack .notifications=${[...]}>) triggers a TypeError because arrays do not implement get(), so the stack never renders. Please guard with isCell(...) or otherwise handle array inputs before calling .get().

Prompt for AI agents
Address the following comment on packages/ui/src/v2/components/ct-toast-stack/ct-toast-stack.ts at line 216:

<comment>`notifications` is documented to accept either a `Cell` or a plain array, but this line always calls `.get()`. Passing an array (e.g. `&lt;ct-toast-stack .notifications=${[...]}&gt;`) triggers a TypeError because arrays do not implement `get()`, so the stack never renders. Please guard with `isCell(...)` or otherwise handle array inputs before calling `.get()`.</comment>

<file context>
@@ -0,0 +1,375 @@
+      `;
+    }
+
+    const notificationsArray = this.notifications.get();
+
+    // // Ensure all notifications have IDs - if any are missing, update the Cell
</file context>
Fix with Cubic

@bfollington bfollington merged commit 7647d78 into main Oct 23, 2025
8 checks passed
@bfollington bfollington deleted the feat/2025-10-22-toast-notifications branch October 23, 2025 06:42
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.

3 participants