Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): prompt stash — cmd+S saves the composer to a per-provider queue #4453

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 8 commits intomain fromrefs/pull/4453/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

What

Copies Claude Code's "cmd+S to stash a prompt" flow into the web composer. Pressing ⌘S / Ctrl+S snapshots the in-progress prompt — text and image attachments plus the model selection — into a client-only stash queue, then clears the composer with an Undo toast. The queue is stored in localStorage and scoped per connection method (ProviderInstanceId, so Claude Code / Codex / Cursor / custom instances each get their own queue).

Design + interactive mocks: https://puxe56fxtfjc.postplan.dev (this ships mocks D + B).

UX

  • ⌘S with content → stash: composer clears, a ghost of the prompt flies into a bookmark badge on the composer's shoulder (one-shot 550ms animation, prefers-reduced-motion respected), success toast with Undo.
  • ⌘S on an empty composer (or clicking the badge) → opens the stash picker above the composer: arrows to navigate, Enter to restore, ⌘⌫ or the hover ✕ to delete, Esc to close.
  • Restore rehydrates everything: prompt (appended if the composer already has text), images rebuilt into live Files through the existing persisted-attachment codec, and the saved model selection (only if that provider instance is still enabled). Restoring removes the entry — it's a queue, not a library.
  • Picker shows a hint when other connection methods have stashed prompts.

Implementation

  • composer.stash command in the keybinding contract + default mod+s (!terminalFocus) — rebindable via the existing registry. The handler runs capture-phase on window and always preventDefault()s so the browser save dialog never appears, even in states that can't stash (approvals, plan questions, palette open).
  • New promptStashStore (t3code:prompt-stash:v1): zustand persist + Effect-Schema validation + debounced storage + beforeunload flush, cloned from the composer draft store's conventions. 20 entries per queue (oldest evicted with a toast note), ~2MB per-entry attachment budget with dropped images surfaced by name, quota-safe writes that degrade to in-memory instead of throwing in the debounce timer.
  • Terminal/element contexts are intentionally not stashed — they reference live sessions and would dangle; inline placeholders are stripped from the stashed prompt.

Testing

  • 8 new unit tests for the store (scoping incl. __none__ bucket, LIFO order, eviction at cap, take-once semantics, attachment budget partitioning).
  • Full monorepo typecheck clean; web unit suite 1513 passed; shared/contracts suites pass; lint clean on touched files.
  • Not visually verified — automated browsers can't see authenticated views here, so the badge/fly/picker need an eyeball pass.

🤖 Generated with Claude Code


Note

Medium Risk Rebinds mod+s in the composer and persists large base64 payloads in shared localStorage; failure modes are mostly toasts and no-op, but quota or non-durable storage can leave stash/composer state surprising after reload.

Overview Adds a prompt stash to the chat composer: ⌘S / Ctrl+S (composer.stash, !terminalFocus) always prevents the browser save dialog, then either snapshots the current draft or toggles the stash picker when the composer is empty.

Stash behavior: Text (inline terminal placeholders stripped), model selection, and images go into a per–connection-method queue in promptStashStore (localStorage, 20 entries, immediate persist with quota / durability handling). The composer clears only prompt + images via clearComposerPromptAndImages, leaving terminal/element contexts and review comments. Images are compressed for storage (compressImageForStash); restore rehydrates files, dedupes, respects attachment limits, and can reapply model selection when the provider is still available.

UI: ComposerStashBadge + ComposerStashMenu (keyboard navigation, delete, cross-scope hints) with a short count pulse animation in CSS.

Tests: Unit coverage for the stash store and image compression pipeline.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 69fcdddfe26efed03d803276e14713ff6e8dc10f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Add cmd+S prompt stash to composer with per-provider queue and stash menu

  • Pressing mod+s in the composer saves the current prompt and images to a provider-scoped stash queue (up to a bounded cap), clears the prompt and images, and briefly pulses a new ComposerStashBadge showing the queue count.
  • New promptStashStore persists stash entries to localStorage with an in-memory fallback, enforces per-queue eviction, and handles async image finalization via compressImageForStash.
  • New ComposerStashMenu lists stashed entries with keyboard navigation (arrows, Enter to restore, mod+Backspace to delete) and shows attachment previews, image save status, and a footer notice when other provider queues have entries.
  • Restoring an entry merges prompt text and adds images up to the attachment capacity limit; warnings are shown for dropped, unreadable, or over-limit images.
  • Risk: stash persistence relies on localStorage; if storage is unavailable or non-durable, toasts warn the user but the in-memory state still works for the session.
Macroscope summarized 69fcddd.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: fe442759-7c74-402d-873e-bd8a017da3a4

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Commit unit tests in branch `t3code/prompt-save-queue`

      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.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs human review

      1 blocking correctness issue found. This PR introduces a new feature (prompt stash with Cmd+S) with new UI components, state management, and keybindings. New user-facing features require human review, and there are also unresolved high-severity comments identifying potential state persistence bugs.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Addressed all 7 review comments (rebased onto latest main, so the branch was force-pushed).

      Cursor Bugbot

      1. Async stash wipes newer composer input — fixed. The composer is now cleared synchronously at keypress, before any image-encoding await, so edits made during encoding can't be clobbered. Added an in-flight guard so a repeat ⌘S during encoding can't stash the same snapshot twice.
      2. Restore drops excess images permanently — fixed. Attachments past the composer's limit are now reported by name in a warning toast instead of being silently sliced away.
      3. Unreadable images blamed on size limit — fixed. unreadableImageNames is now a separate field on the entry, so the UI says "could not be read" vs "exceeded the stash size limit" vs "composer is at its N-image limit" as appropriate.
      4. Stash wipes unrestorable contexts — fixed. Added clearComposerPromptAndImages to the draft store; stash now clears only what it can round-trip, leaving terminal/element contexts, preview annotations, and review comments intact.

      Macroscope

      1. __proto__ prototype pollution (promptStashStore.ts:128) — guarded with Object.hasOwn. Note the premise is narrower than described: ProviderInstanceId is validated against /^[a-zA-Z][a-zA-Z0-9_-]*$/, so no real provider id can be __proto__. The guard still matters because persisted queue keys decode as plain Schema.String, so a corrupted/hand-edited localStorage payload can carry one. Regression test covers that rehydration path.
      2. __none__ scope collision (promptStashStore.ts:44) — fixed as suggested: provider keys are now namespaced provider:<id>, so they can never equal the unscoped sentinel. (Same caveat as above — a provider named __none__ isn't constructible today, but the prefix makes it structural rather than incidental.)
      3. Enter on the delete button restores instead of deleting — fixed; the capture-phase handler now bails when the event originates from a focused control inside the row.

      Also in this push (from local testing, not review comments): stashed images are re-encoded (WebP with JPEG fallback, 2048px, quality ladder to 0.68) instead of being dropped when over budget — only the stashed copy is compressed, so sending without stashing still uploads the original. The save toast and fly-in animation were removed in favor of a subtle badge pulse.

      Verification: web typecheck clean, 1535 unit tests passing (17 for the stash store + compression), lint clean.

    5. Second round addressed in 01bb40b3a.

      Failed image stash still clears composer (High) — fixed, and worth explaining since it's in direct tension with the previous round's fix. Clearing after the async encode loses edits typed during encoding; clearing before loses the prompt if the tab closes mid-encode. Neither ordering is safe on its own, so the write is now split: the text-only entry is persisted and flushed first, the composer is cleared second, and images are attached via a new finalizeEntryImages action as they finish encoding. Entries carry a pendingImageCount in the meantime (shown as "saving N images…" in the menu), so a crash mid-encode leaves the prompt recoverable rather than gone.

      Stash lock never clears on error (Medium) — fixed; stashInFlightRef is now cleared in a finally.

      Queue eviction toast never shown (Medium) — fixed; the evicted entry returned by stashEntry is now surfaced in a warning toast. (The general save toast stays removed per feedback in-thread; this one only fires on actual data loss.)

      Size failures marked unreadable (Medium) — fixed at the source: compressImageForStash now returns a tagged { ok: false, reason: "too-large" | "unreadable" } instead of null, so the caller no longer has to guess. Budget failures and decode failures are tracked and reported separately.

      Fallback downscale never shrinks below source (stashImageCompression.ts:191, Medium) — good catch, this was a real no-op. The passes multiplied a fixed MAX_DIMENSION, but encodeWithinBudget clamps to the bitmap, so for any source under 2048px all three passes resolved to the source size. They now scale off min(MAX_DIMENSION, longest edge). Added a regression test with an 800px source asserting a genuine sub-source downscale is attempted.

      localStorage property access can throw SecurityError (promptStashStore.ts:128, High) — fixed as suggested with a guarded resolveBaseStorage() helper, so a blocked-storage or sandboxed-iframe context falls back to in-memory instead of crashing at module import.

      Restore drops excess images permanently — this one is a re-post of a comment already resolved in cad63658b; restoreStashEntry reports overflow by name in a warning toast rather than discarding silently.

      Verification: web typecheck clean, 1536 unit tests passing (18 across the stash store + compressor), lint clean.

    6. Third round addressed in 60c290477.

      Clear ignores failed stash persist (Medium) — real bug, fixed. createQuotaSafeStorage swallowed quota errors, so a rejected write still cleared the composer and a reload lost both copies. flushPromptStashStorage() now returns whether the write actually landed; on failure the entry is rolled back, the composer is left untouched, and an error toast explains why.

      Restore drops in-flight images (High) — fixed. finalizeEntryImages now returns false when its target entry is gone instead of silently no-oping, and the caller warns that the images could not attach. Restore is also blocked (click and Enter) while an entry still has a pendingImageCount, so the window is much harder to hit in the first place.

      Encode throw leaves pending forever (Low) + Exceptions from encodeWithinBudget escape (stashImageCompression.ts:208, Medium) — same root cause, fixed together. The per-pass encode is now wrapped, so a throw from canvas allocation or convertToBlob returns { ok: false, reason: "unreadable" } rather than escaping the loop, skipping finalization, and stranding the entry as permanently "saving…". The finally that closes the bitmap is retained.

      Four other comments in this batch (Failed image stash still clears composer, Size failures marked unreadable, Stash lock never clears on error, Queue eviction toast never shown) are re-posts against the pre-fix commit — all were resolved in 01bb40b3a. They show with line: null in the API, which is how Bugbot surfaces comments whose anchor no longer exists in the current diff.

      New tests: finalizeEntryImages attaching vs. reporting a lost entry. Web typecheck clean, 1538 unit tests passing, lint clean.

    7. Pushed 5c1955d01 — six more fixes, from an independent audit rather than review comments (the same classes of bug the bots have been finding, so worth getting ahead of).

      High — reload mid-encode created permanently unrestorable entries. pendingImageCount is written before encoding, but the loop that clears it does not survive a reload. Orphaned entries showed "saving…" forever and refused to restore. The count is now settled during rehydration, with the lost images recorded so the prompt itself stays restorable.

      High — cross-tab writes deleted each other's entries. Every mutation persisted the tab's entire queuesByScopeKey from its own hydrated snapshot, so two tabs stashing would clobber one another. Mutations now re-read from storage and union by entry id (preferring whichever copy has images attached), newest-first, capped at the queue limit.

      High — a rejected second-phase write was ignored. The images flush discarded its boolean, so if the text entry fit but the image payloads exceeded quota, disk kept the phase-one entry with a pending count and the user saw nothing. Now warned.

      Medium — the in-flight guard rejected unrelated prompts. It was a single boolean held for the whole encode, but the composer is cleared before the first await — so typing a genuinely new prompt (or switching threads) and pressing ⌘S was silently dropped. Now keyed by target+prompt+image-ids.

      Medium — restore capacity used id-only dedup. The draft store also dedupes by mimeType+sizeBytes+name (composerDraftStore.ts:628), so a metadata duplicate consumed a capacity slot the store then refused to fill, pushing a genuinely unique image into overflow and deleting it with the entry. Restore now filters on the same key.

      Low — image-only restore appended blank lines and moved the caret. Restoring a stash with no text into a non-empty composer added \n\n and yanked focus to the end. Both are now conditional on the prompt actually changing.

      New tests: cross-tab merge and pending-count recovery. Web typecheck clean, 1540 unit tests passing, lint clean.

    8. Pushed f0abec9cf. Most of this round's comments were bugs in the cross-tab merge I added last round, so rather than patch it (tombstones, flush-before-read) I replaced the approach.

      The merge was unsound. An id-union of disk and memory can't distinguish "another tab created this entry" from "this tab deleted it" — so deletes resurrect, and no amount of tombstoning makes that clean. Every mutation now does a synchronous read-modify-write against storage: read live disk state, apply the change, write back. Writes are immediate rather than debounced; stashing is a deliberate keystroke, not a per-character autosave, so there was nothing to coalesce and the debounce window was pure race surface. This resolves at once:

      • Merge resurrects deleted stash entries (High) — structurally impossible now; disk is the source of truth.
      • Mutations skip cross-tab merge (High) — takeEntry and finalizeEntryImages go through the same path as stashEntry.
      • Merge overwrites finalized images (High) — no merge, no preference rule to get wrong.
      • Failed stash rollback wipes peers (High) — rollback is re-reading disk, not replaying a stale snapshot.
      • Read-merge-write is not atomic (promptStashStore.ts:238) and stashEntry resurrects deleted entries (:306) — same root cause.
      • Merge keeps orphaned pending (Medium) — stale counts are settled on every read, not just hydration.

      Also dropped the zustand persist middleware (writes are direct now) and added a storage event listener so a tab picks up another tab's changes live.

      Orphaned stash unrestorable (High, + the Macroscope variant) — the pendingImageCount guard is gone. Orphans are settled on read, so a nonzero count now genuinely means "encoding right now", and restoring then is already handled by the existing "images did not attach" warning. Blocking restore was the wrong trade: it trapped recoverable text.

      Delete ignores persist failure (Medium) — deleteStashEntry and restoreStashEntry now surface a rejected write instead of discarding the result.

      Non-durable fallback reported as durable (promptStashStore.ts:117) — durability is now tracked separately from write success, so the in-memory fallback no longer claims a stash will survive a reload.

      Compression skips smaller scales (Medium) — an encode throw is often caused by the target size itself, so the loop now continues to the smaller fallback passes instead of returning immediately; the failure reason reflects whether the last attempt threw.

      New tests cover the cross-tab guarantees directly: another tab's entries survive a stash, a deleted entry is not resurrected, a take doesn't clobber a peer's entries, and a stale pending count is settled on read. Web typecheck clean, 1542 unit tests passing, lint clean.

    9. @@ -0,0 +319,21 @@
      319+ const nextQueue = [...queue];
      320+ nextQueue[index] = {
      321+ ...existing,
      322+ attachments: images.attachments,
      323+ droppedImageNames: images.droppedImageNames,
      324+ unreadableImageNames: images.unreadableImageNames,
      325+ pendingImageCount: 0,
      326+ };
      327+ return { next: { ...queues, [scopeKey]: nextQueue }, result: true };
      328+ });
      329+ set(() => ({ queuesByScopeKey: next }));
      330+ return { attached: result, durable };
      331+ },
      332+}));
      333+
      334+/**
      335+ * Refreshes the in-memory queues from disk. Mutations already read-modify-write
      336+ * synchronously, so this only matters for picking up another tab's changes.
      337+ */
      338+function syncQueuesFromStorage(): void {
      339+ const persisted = readPersistedQueues();
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium src/promptStashStore.ts:339

      When another tab calls localStorage.removeItem(PROMPT_STASH_STORAGE_KEY) or localStorage.clear(), this tab does not clear its in-memory queues: readPersistedQueues() returns null, and syncQueuesFromStorage treats null as "nothing to sync" and skips the setState call. This tab's stale queues remain in memory. The next mutation then falls back to those stale localQueues inside commitQueues (because disk is empty) and writes every cleared entry back to storage, resurrecting the stash another tab just deleted. The storage listener already handles event.key === null, so a cleared key should produce an empty in-memory state, not a no-op. Consider having syncQueuesFromStorage set queuesByScopeKey to {} when readPersistedQueues() returns null (and likewise having commitQueues treat a null disk read as {} rather than falling back to localQueues).

      🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
      In file @apps/web/src/promptStashStore.ts around line 339:
      
      When another tab calls `localStorage.removeItem(PROMPT_STASH_STORAGE_KEY)` or `localStorage.clear()`, this tab does not clear its in-memory queues: `readPersistedQueues()` returns `null`, and `syncQueuesFromStorage` treats `null` as "nothing to sync" and skips the `setState` call. This tab's stale queues remain in memory. The next mutation then falls back to those stale `localQueues` inside `commitQueues` (because disk is empty) and writes every cleared entry back to storage, resurrecting the stash another tab just deleted. The `storage` listener already handles `event.key === null`, so a cleared key should produce an empty in-memory state, not a no-op. Consider having `syncQueuesFromStorage` set `queuesByScopeKey` to `{}` when `readPersistedQueues()` returns `null` (and likewise having `commitQueues` treat a `null` disk read as `{}` rather than falling back to `localQueues`).
    10. Cursor Bugbot has reviewed your changes using high effort and found 5 potential issues.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f0abec9cf634b56c8b4d0926dbbdea44da59bea5. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -0,0 +311,21 @@
      311+ },
      312+ finalizeEntryImages: (scopeKey, entryId, images) => {
      313+ const { next, result, durable } = commitQueues(get().queuesByScopeKey, (queues) => {
      314+ const queue = readQueue(queues, scopeKey);
      315+ const index = queue.findIndex((candidate) => candidate.id === entryId);
      316+ const existing = index === -1 ? undefined : queue[index];
      317+ // Restored or deleted mid-encode: nothing to attach to.
      318+ if (!existing) return { next: queues, result: false };
      319+ const nextQueue = [...queue];
      320+ nextQueue[index] = {
      321+ ...existing,
      322+ attachments: images.attachments,
      323+ droppedImageNames: images.droppedImageNames,
      324+ unreadableImageNames: images.unreadableImageNames,
      325+ pendingImageCount: 0,
      326+ };
      327+ return { next: { ...queues, [scopeKey]: nextQueue }, result: true };
      328+ });
      329+ set(() => ({ queuesByScopeKey: next }));
      330+ return { attached: result, durable };
      331+ },
      cursor[bot](GitHub profile, opens in a new tab)commented

      Failed finalize images wiped later

      High Severity

      The takeEntry and finalizeEntryImages actions update the in-memory stash state even when persistence to disk fails. Unlike stashEntry, these in-memory changes aren't rolled back. This means any subsequent operation that reads from disk will overwrite the in-memory state, causing entries to reappear or images to disappear unexpectedly, contradicting UI feedback.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f0abec9cf634b56c8b4d0926dbbdea44da59bea5. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -0,0 +333,21 @@
      333+
      334+/**
      335+ * Refreshes the in-memory queues from disk. Mutations already read-modify-write
      336+ * synchronously, so this only matters for picking up another tab's changes.
      337+ */
      338+function syncQueuesFromStorage(): void {
      339+ const persisted = readPersistedQueues();
      340+ if (persisted) {
      341+ usePromptStashStore.setState({ queuesByScopeKey: persisted });
      342+ }
      343+}
      344+
      345+if (typeof window !== "undefined" && typeof window.addEventListener === "function") {
      346+ // Hydrate once at startup, then follow other tabs. `storage` fires only in
      347+ // *other* tabs, which is exactly the case this tab cannot observe itself.
      348+ syncQueuesFromStorage();
      349+ window.addEventListener("storage", (event) => {
      350+ if (event.key === null || event.key === PROMPT_STASH_STORAGE_KEY) {
      351+ syncQueuesFromStorage();
      352+ }
      353+ });
      cursor[bot](GitHub profile, opens in a new tab)commented

      Storage clear leaves ghost queues

      Medium Severity

      syncQueuesFromStorage only updates state when readPersistedQueues() returns a truthy object. If another tab clears site data (storage event with key === null) or the stash key is empty/missing, the read returns null and this tab keeps its old queuesByScopeKey. The next local mutation can then write those ghost entries back to disk.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f0abec9cf634b56c8b4d0926dbbdea44da59bea5. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -1863,0 +1935,21 @@
      1935+ setStashPulse((current) => ({ ...current, active: false }));
      1936+ }, 1200);
      1937+ }, []);
      1938+
      1939+ const restoreStashEntry = useCallback(
      1940+ (entry: PromptStashEntry) => {
      1941+ // Remove first so a double activation (click + Enter) can't restore twice.
      1942+ const { entry: taken, durable } = takeStashEntry(
      1943+ promptStashScopeKey(entry.providerInstanceId),
      1944+ entry.id,
      1945+ );
      1946+ if (!taken) return;
      1947+ if (!durable) {
      1948+ toastManager.add({
      1949+ type: "warning",
      1950+ title: "Restored prompt may reappear in the stash",
      1951+ description:
      1952+ "Browser storage rejected the update, so this entry could still be there after a reload.",
      1953+ data: { hideCopyButton: true },
      1954+ });
      1955+ }
      cursor[bot](GitHub profile, opens in a new tab)commented

      Restore ignores fresher taken entry

      High Severity

      The restoreStashEntry function incorrectly rehydrates the composer from its entry argument, which can be stale. It should instead use the up-to-date taken entry returned by takeStashEntry, otherwise attachments (like images finalized to disk) might be missing from the restored prompt.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f0abec9cf634b56c8b4d0926dbbdea44da59bea5. Configure [here](https://www.cursor.com/dashboard/bugbot).
    11. Pushed 69fcdddfe — removed the cross-tab handling entirely.

      Stepping back: no other persisted store in this app does cross-tab merging or storage-event syncing. composerDraftStore (which persists live drafts and the same base64 images to the same origin), rightPanelStore, uiStateStore, terminalUiStateStore, diffPanelStore — all plain last-write-wins. The stash had accumulated bespoke cross-tab machinery through successive review rounds, and that machinery caused more real bugs than the edge case it guarded (two tabs stashing prompts simultaneously, which the rest of the app tolerates everywhere). Cross-tab consistency is explicitly out of scope for this store now, matching the app's conventions.

      What remains is the simple shape: mutate in-memory state, persist it synchronously, hydrate once at startup. Kept from the review rounds, because they fix real single-tab bugs: immediate (non-debounced) writes so the composer only clears when the write actually landed, durability reporting (including the non-durable in-memory fallback), rollback of a rejected stash write, and settling stale pendingImageCount on hydration.

      Net for the store rounds: promptStashStore.ts is now ~140 lines smaller than at its peak. Future cross-tab review findings on this store are working-as-intended per app convention.

      Web typecheck clean, 1539 unit tests passing, lint clean.

Sign in to join this conversation.