Skip to content

Commit bd9728f

Browse files
adhorodyskiclaude
andcommitted
Fix preserved-keys allowlist count in SEQUENTIAL_QUEUE.md
The QueuedOnyxUpdates not-signed-in filter preserves 15 keys, not 14. Also name the focus-mode NVP and the three RAM-only flags explicitly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9867563 commit bd9728f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

contributingGuides/SEQUENTIAL_QUEUE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ These are **two distinct deferral mechanisms** that are easy to confuse.
264264

265265
**Problem `QueuedOnyxUpdates` solves.** Prevent UI flicker: if each WRITE's response Onyx updates were applied immediately as the queue drained, the UI would replay intermediate states. Instead, WRITE responses are buffered and applied **after the whole queue drains**.
266266

267-
**How `QueuedOnyxUpdates` works.** It is a module-level **in-memory** buffer. `queueOnyxUpdates` appends and resolves immediately; `flushQueue` snapshots-and-clears (to avoid races) then applies via `Onyx.update`. The WRITE-vs-READ routing decision lives **upstream** in `OnyxUpdates.applyHTTPSOnyxUpdates`: WRITE-type responses (`onyxData`, then `successData`/`failureData`/`finallyData`) route through `queueOnyxUpdates`; READ-type responses apply via `Onyx.update` immediately. When not signed in, `flushQueue` filters the snapshot to a 14-key preserved allowlist (`SESSION`, `NETWORK`, `IS_LOADING_APP`, `HAS_LOADED_APP`, `CREDENTIALS`, `ACCOUNT`, `MODAL`, `PRESERVED_USER_SESSION`, theme/locale/try-new-dot NVPs, and RAM-only loading flags); the filter is skipped entirely under `CONFIG.IS_TEST_ENV`. The pause early-return lives in `SequentialQueue.flushOnyxUpdatesQueue` (returns early when `isQueuePaused`). It is invoked at the end of a full drain — and from two other entry points: `flush()`'s all-empty guard counts a non-empty buffer as pending work (a flush with zero requests proceeds purely to drain the buffer), and `unpause()` calls it directly when the queue is already empty.
267+
**How `QueuedOnyxUpdates` works.** It is a module-level **in-memory** buffer. `queueOnyxUpdates` appends and resolves immediately; `flushQueue` snapshots-and-clears (to avoid races) then applies via `Onyx.update`. The WRITE-vs-READ routing decision lives **upstream** in `OnyxUpdates.applyHTTPSOnyxUpdates`: WRITE-type responses (`onyxData`, then `successData`/`failureData`/`finallyData`) route through `queueOnyxUpdates`; READ-type responses apply via `Onyx.update` immediately. When not signed in, `flushQueue` filters the snapshot to a 15-key preserved allowlist (`SESSION`, `NETWORK`, `IS_LOADING_APP`, `HAS_LOADED_APP`, `CREDENTIALS`, `ACCOUNT`, `MODAL`, `PRESERVED_USER_SESSION`, the theme/locale/try-new-dot/focus-mode NVPs, and the three RAM-only loading flags); the filter is skipped entirely under `CONFIG.IS_TEST_ENV`. The pause early-return lives in `SequentialQueue.flushOnyxUpdatesQueue` (returns early when `isQueuePaused`). It is invoked at the end of a full drain — and from two other entry points: `flush()`'s all-empty guard counts a non-empty buffer as pending work (a flush with zero requests proceeds purely to drain the buffer), and `unpause()` calls it directly when the queue is already empty.
268268

269269
**Problem `queueFlushedData` solves.** Apply a small piece of data **only after a full drain** — specifically, mark the app as loaded only once the queue has actually emptied (not mid-drain).
270270

0 commit comments

Comments
 (0)