Add option for the notification interval#92
Open
kecsap wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
1 issue found across 10 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/plugin/src/tui/index.tsx">
<violation number="1" location="packages/plugin/src/tui/index.tsx:674">
P2: Server-sent per-message `duration` field is silently discarded. Previously the poller honored `p.duration` from the payload, allowing the server to control how long specific toasts appear. Now all toasts use the unified duration. Consider accepting an optional `durationOverride` in `showToast` and falling through to the unified default when absent.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| if (msg.type === "toast") { | ||
| const p = msg.payload | ||
| api.ui.toast({ | ||
| showToast(api, { |
There was a problem hiding this comment.
P2: Server-sent per-message duration field is silently discarded. Previously the poller honored p.duration from the payload, allowing the server to control how long specific toasts appear. Now all toasts use the unified duration. Consider accepting an optional durationOverride in showToast and falling through to the unified default when absent.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/plugin/src/tui/index.tsx, line 674:
<comment>Server-sent per-message `duration` field is silently discarded. Previously the poller honored `p.duration` from the payload, allowing the server to control how long specific toasts appear. Now all toasts use the unified duration. Consider accepting an optional `durationOverride` in `showToast` and falling through to the unified default when absent.</comment>
<file context>
@@ -650,10 +671,9 @@ const tui: TuiPlugin = async (api, _options, meta) => {
if (msg.type === "toast") {
const p = msg.payload
- api.ui.toast({
+ showToast(api, {
message: String(p.message ?? ""),
variant: (p.variant as "info" | "warning" | "error" | "success") ?? "info",
</file context>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by cubic
Adds a configurable toast duration for Magic Context notifications across the TUI. Introduces
toast_duration_msand wires it through RPC so all toasts use a single, consistent lifetime.New Features
toast_duration_msto config and schema (default 5000ms, 1000–60000).ctx-statusaction to the TUI.toast-durationRPC to return the resolved duration from config.showToasthelper for all toasts.send-session-notificationnow enqueues RPC “toast” messages with the configured duration.Migration
toast_duration_msin your config if you want longer or shorter toasts. Defaults to 5000ms.Written for commit 7e1e48d. Summary will update on new commits. Review in cubic