Defer AppView wait behind a pending toast on post

Step 5 of sending a post (waiting for the AppView to index the new record)
can take an unbounded amount of time, but the post is already created after
step 4. Close the composer immediately after the record is written and show
a pending toast while the AppView wait runs in the background. When it
settles, swap the pending toast in place for the existing success toast.

Adds a 'pending' ToastType that renders a spinner via the existing Loader,
and a new Toast.promise() helper that drives the in-place swap on both
sonner and sonner-native.
This commit is contained in:
Claude
2026-05-17 09:38:18 +00:00
parent 45597de6e0
commit f03bf2a65f
7 changed files with 243 additions and 103 deletions
-5
View File
@@ -539,11 +539,6 @@
"count": 8
}
},
"src/view/com/composer/Composer.tsx": {
"@typescript-eslint/no-explicit-any": {
"count": 2
}
},
"src/view/com/composer/drafts/state/queries.ts": {
"@typescript-eslint/no-explicit-any": {
"count": 2