-
Notifications
You must be signed in to change notification settings - Fork 9
Add ct-toast and use it for omnibot
#1934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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. `<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()`.</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(); |
There was a problem hiding this comment.
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. `<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()`.</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>
0f5a353 to
f867065
Compare
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.