add toast notification system (T-50)

Non-modal operation-feedback toasts, bottom-right: a ClideToast card per
severity (success/warning/error/info), auto-dismiss (errors linger), queue
with a visible cap, slide+fade in, manual dismiss, live-region a11y.

ToastService is a MessageBus consumer — components raise a toast by publishing
to the 'toast' channel (publishToast helper), so emitters stay decoupled from
the UI. GitController's push/pull are the first emitters. ToastOverlay mounts
in the app-root Stack.

Also adds comprehensive GitController coverage: importing it for the toast
emitter test first pulled the whole file into the coverage denominator, so the
controller is now tested end to end (status/stage/commit/stash/push/pull).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-05 23:14:42 +02:00
co-authored by Claude Opus 4.8
parent 55ed3013e1
commit 1f09abcfd7
12 changed files with 747 additions and 4 deletions
+6
View File
@@ -5,6 +5,7 @@ import 'package:clide/kernel/src/clipboard.dart';
import 'package:clide/kernel/src/commands/keybindings.dart';
import 'package:clide/kernel/src/keymap/keymap_service.dart';
import 'package:clide/kernel/src/text_zoom.dart';
import 'package:clide/kernel/src/toast.dart';
import 'package:clide/kernel/src/commands/palette.dart';
import 'package:clide/kernel/src/commands/registry.dart';
import 'package:clide/kernel/src/dialog.dart';
@@ -72,6 +73,7 @@ class KernelServices {
required this.scheduler,
required this.keymap,
required this.textZoom,
required this.toast,
});
final Logger log;
@@ -105,6 +107,7 @@ class KernelServices {
final SchedulerService scheduler;
final KeymapService keymap;
final TextZoom textZoom;
final ToastService toast;
static Future<KernelServices> boot({
required Directory appDir,
@@ -166,6 +169,7 @@ class KernelServices {
final scheduler = SchedulerService(events);
scheduler.start();
final textZoom = TextZoom();
final toast = ToastService(messages: messages);
final project = ProjectManager(
log: log,
events: events,
@@ -252,6 +256,7 @@ class KernelServices {
scheduler: scheduler,
keymap: keymap,
textZoom: textZoom,
toast: toast,
);
}
@@ -265,6 +270,7 @@ class KernelServices {
commands.dispose();
palette.dispose();
quickOpen.dispose();
toast.dispose();
recentFiles.dispose();
readerNav.dispose();
i18n.dispose();