M1.12: notifications as toasts
The host publishes picker, command-line and pump errors as notification events (Engine::notify, same id sequence) instead of stderr, keeps notifications and watchFailed published before engine_ready and replays them after the state replay, so startup warnings (corrupt settings, journal entries) reach the UI. ipc.ts announces engine_ready once all subscriptions started together are registered. Frontend: notifications store and NotificationStack (bottom right, info auto-dismissed after 5 s, warnings/errors stay, close button and Escape, at most 5 visible with "+n more", role status/alert); watchFailed maps to a warning toast; failed commands without their own UI raise an error toast. Catalog keys notification.settings.*, project.*, vfs.*, watch.*, command.* plus the runtime allow-list. Docs updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7b7273a947
commit
f41df518b5
21 changed files with 1178 additions and 94 deletions
|
|
@ -37,13 +37,23 @@ const usedKeys = sourceFiles(SRC).flatMap((file) =>
|
|||
|
||||
/**
|
||||
* Keys the source never passes to `t` literally because they arrive at
|
||||
* runtime from the engine: theme labels from `theme.list` and the
|
||||
* `messageKey` of `notification` events.
|
||||
* runtime: theme labels from `theme.list`, the `messageKey` of
|
||||
* `notification` events (engine and desktop host), and the keys the
|
||||
* notifications store passes through a constant.
|
||||
*/
|
||||
const RUNTIME_KEYS = new Set([
|
||||
"notification.command.failed",
|
||||
"notification.project.notLocal",
|
||||
"notification.project.openFailed",
|
||||
"notification.project.unsavedChanges",
|
||||
"notification.recovery.corrupt",
|
||||
"notification.recovery.unavailable",
|
||||
"notification.recovery.writeFailed",
|
||||
"notification.settings.corrupt",
|
||||
"notification.settings.corruptNotMoved",
|
||||
"notification.settings.unavailable",
|
||||
"notification.vfs.pumpFailed",
|
||||
"notification.watch.failed",
|
||||
"theme.lutraDark",
|
||||
"theme.lutraLight",
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue