GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix: auto-dismiss toast notifications after timeout by ranvier2d2 · Pull Request #847 · pingdotgg/t3code Conversation
| |||||||||||||||||||||||||||||||||||||
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: a3523db7fc
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -263,7 +265,7 @@ function Toasts({ position = "top-right" }: { position: ToastPosition }) { | |||
| toast={toast} | |||
| > | |||
| <ThreadToastVisibleAutoDismiss | |||
| dismissAfterVisibleMs={toast.data?.dismissAfterVisibleMs} | |||
| dismissAfterVisibleMs={toast.data?.dismissAfterVisibleMs ?? DEFAULT_DISMISS_AFTER_VISIBLE_MS} | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Skip default timeout for manually managed toasts
Using toast.data?.dismissAfterVisibleMs ?? DEFAULT_DISMISS_AFTER_VISIBLE_MS forces a 5s auto-dismiss even when a toast is intentionally long-lived via timeout: 0. In apps/web/src/components/GitActionsControl.tsx, runGitActionWithToast creates a loading toast and later updates that same toastId with success/error; when a git action runs longer than ~5s, this auto-dismiss closes the toast first and the later toastManager.update(...) no longer reliably surfaces the result. This regresses progress/result visibility for longer operations.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -27,6 +27,8 @@ const anchoredToastManager = Toast.createToastManager<ThreadToastData>(); | |||
| type ToastId = ReturnType<typeof toastManager.add>; | |||
| const threadToastVisibleTimeoutRemainingMs = new Map<ToastId, number>(); | |||
|
|
|||
| const DEFAULT_DISMISS_AFTER_VISIBLE_MS = 5_000; | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium ui/toast.tsx:30
DEFAULT_DISMISS_AFTER_VISIBLE_MS is unconditionally applied to all toasts, including loading toasts. This causes loading toasts to auto-dismiss after 5 seconds even if the async operation is still running, leaving users without feedback and causing them to miss the eventual success/error state. Consider exempting loading toasts from the default timeout or requiring explicit durations only for non-loading types.
In file apps/web/src/components/ui/toast.tsx around line 30:
`DEFAULT_DISMISS_AFTER_VISIBLE_MS` is unconditionally applied to all toasts, including `loading` toasts. This causes loading toasts to auto-dismiss after 5 seconds even if the async operation is still running, leaving users without feedback and causing them to miss the eventual success/error state. Consider exempting `loading` toasts from the default timeout or requiring explicit durations only for non-loading types.
Evidence trail:
- apps/web/src/components/ui/toast.tsx line 30: `DEFAULT_DISMISS_AFTER_VISIBLE_MS = 5_000`
- apps/web/src/components/ui/toast.tsx lines 267-270: `ThreadToastVisibleAutoDismiss` rendered for ALL toasts with fallback to default timeout
- apps/web/src/components/ui/toast.tsx lines 64-143: `ThreadToastVisibleAutoDismiss` effect manages timer independent of base-ui's `timeout` property
- apps/web/src/components/GitActionsControl.tsx lines 154-157: `threadToastData` only contains `{ threadId: activeThreadId }`, no `dismissAfterVisibleMs`
- apps/web/src/components/GitActionsControl.tsx lines 308-311, 316-319, 328-330: Loading toasts created with `timeout: 0` but no `dismissAfterVisibleMs` in data
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Add a 5s default auto-dismiss for toasts. Loading toasts are excluded so they persist until their operation completes. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
This is the intended behavior for “Action Failed” toasts, as stated by the maintainer in PR #672. To quote:
You may consider closing this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Address all 3 review findings from `@d1-reviewer` (`pingdotgg#847`): 1. Remove unwired DOM-HTML Markdown re-serialization helpers (`wrap_inline_code`, `serialize_markdown_anchor`, `escape_markdown_prose`, `ListCopyItem`, `serialize_list_slice`) from `crates/core/src/markdown/clipboard.rs` and update `TR-MARKDOWN` in `apps/native/parity/LEDGER.md` accurately. 2. Add `restore_preserved_leading_whitespace` and wire `user_markdown_view` with a `Copy` (`Cmd+C`) action interceptor (`crates/app/src/transcript/markdown.rs`, `messages.rs`) so user-message Copy and Cite restore ASCII spaces/tabs while preserving literal user-typed NBSPs (`pingdotgg#38079`), verified by GPUI test `user_markdown_copy_restores_leading_spaces_and_preserves_literal_nbsp`. 3. Fetch omitted family side chats via `fetch_family_side_chats` alongside `ORCHESTRATION_GET_WORKTREE_THREAD_IDS` in `delete_thread_then` (`crates/app/src/sidebar/controller.rs`, `pingdotgg#36800`) before calling `has_other_worktree_occupants`, verified by GPUI test `worktree_cleanup_prompt_excludes_omitted_family_side_chats` (and fixed `late_teardown_does_not_close_replacement_host` under `--features snapshot` in `transcript/mcp_app.rs`).
…ltas (#453) * feat(native): port #444 Part B Sidebar, Thread & Transcript parity deltas Port all remaining Sidebar, Thread View, and Transcript parity deltas from upstream `4121b30..80cf4f7` and flip `TV-LINEAGE` and `TR-WORK` to `done` in `apps/native/parity/LEDGER.md`. Sidebar (`SB-ROW`, `SB-SECTIONS`, `SB-MENU`, `SB-UNDO`, `SB-SEARCH`, `SB-GROUPING`): - Regenerating title glimmer (`pingdotgg#29383`) - Settle-undo position restore via `plan_undo_for_thread` + `UnsettleRestore`/`ReorderActive` (`pingdotgg#33248`) - Clear opened failed badge in sidebar rows and collapsed folder dots (`pingdotgg#28616`) - Suppress `Done` badge for stopped/interrupted/cancelled runs (`pingdotgg#37475`) - 1h snooze clock-minute rounding (`pingdotgg#36785`) - Opening a delegated task selects its listed parent ancestor (`pingdotgg#37500`) - Side-chat children included in worktree deletion check (`pingdotgg#36800`) - Failed message search error state in sidebar search and command palette (`pingdotgg#38155`) - Jump-hint modifier recheck after hold delay (`pingdotgg#38545`) - Command palette `Failed` status pill prioritized over background `Waiting` (`pingdotgg#38968`) Thread & Transcript (`TV-HISTORY`, `TV-LINEAGE`, `TV-FOLLOW`, `TR-WORK`, `TR-MARKDOWN`, `TR-CITE`, `TR-MCPAPP`): - Subagent history model preservation via `merge_older_subagents` (`pingdotgg#38724`) and hide Resume when `supportsNativeResume` is false without an unsent continuation source (`pingdotgg#39229`) - Cancel active smooth scroll in `keep_end` so finished-while-away threads open at end (`pingdotgg#38963`) - MCP PR/CI work-log rows & summaries (`pingdotgg#26751`, `pingdotgg#26752`) and Windows `pwsh`/`powershell`/`cmd` launcher unwrapping (`pingdotgg#38946`) - Leading-space user markdown preservation (`pingdotgg#38079`), RTL `<details>` and template cards (`pingdotgg#36876`, `pingdotgg#36922`), `Cite` on `send_to_user` rows (`pingdotgg#36858`), home/host paths out of workspace folder (`pingdotgg#39146`), and code/list/email copy serialization fixes (`pingdotgg#36712`, `pingdotgg#36830`, `pingdotgg#36867`, `pingdotgg#36915`, `pingdotgg#37284`, `pingdotgg#39150`) - MCP app content-block filtering for stripped images (`pingdotgg#31338`), teardown generation race test (`pingdotgg#30387`), and pre-query/fragment download filename derivation (`pingdotgg#30712`) * fix(native): address PR #453 review findings Address all 3 review findings from `@d1-reviewer` (`pingdotgg#847`): 1. Remove unwired DOM-HTML Markdown re-serialization helpers (`wrap_inline_code`, `serialize_markdown_anchor`, `escape_markdown_prose`, `ListCopyItem`, `serialize_list_slice`) from `crates/core/src/markdown/clipboard.rs` and update `TR-MARKDOWN` in `apps/native/parity/LEDGER.md` accurately. 2. Add `restore_preserved_leading_whitespace` and wire `user_markdown_view` with a `Copy` (`Cmd+C`) action interceptor (`crates/app/src/transcript/markdown.rs`, `messages.rs`) so user-message Copy and Cite restore ASCII spaces/tabs while preserving literal user-typed NBSPs (`pingdotgg#38079`), verified by GPUI test `user_markdown_copy_restores_leading_spaces_and_preserves_literal_nbsp`. 3. Fetch omitted family side chats via `fetch_family_side_chats` alongside `ORCHESTRATION_GET_WORKTREE_THREAD_IDS` in `delete_thread_then` (`crates/app/src/sidebar/controller.rs`, `pingdotgg#36800`) before calling `has_other_worktree_occupants`, verified by GPUI test `worktree_cleanup_prompt_excludes_omitted_family_side_chats` (and fixed `late_teardown_does_not_close_replacement_host` under `--features snapshot` in `transcript/mcp_app.rs`).
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Toasts keep hanging
There was an error while loading. Please reload this page.