Repository navigation
Preserve cleared offline Journal entries and speed up large-history writing - #207
Merged
Merged
Conversation
callumalpass
enabled auto-merge (squash)
November 28, 2026 12:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Journal now reopens a deliberately cleared entry under its original record ID. The date picker and day arrows can resume a locally held page while the collection listing is unavailable. A refused session update keeps its status message, and the outside-edit banner follows actual conflict evidence.
The history picker reuses its sorted saved entries and visible buttons when possible. The writer uses intrinsic textarea sizing where supported, avoids building a second copy of a long page to position an end caret, and counts words once per changed body.
Chromium timings
One warm-up plus nine measured samples per revision and size. Baseline and candidate alternate order in the same Chromium 149.0.7827.55 process, each sample in a fresh browser context. Values are milliseconds. The reported p95 is nearest-rank, the slowest of nine samples.
At 10,000 entries median input dropped from 114.0 to 39.7 ms. The startup and date-filter p95s increased on this shared host. The input p95 remained near 180 ms.
Startup measures Journal mount through the first history scan after fixture setup. Picker open includes a refresh through 500-record in-memory SDK pages. Pagination and exact-date input are synchronous UI timings. Typing appends one character to a 55,296-character entry. Autosave measures the same input through confirmed SDK fixture readback, including the 1,200 ms idle delay. Network transit, native replica indexing, and external font downloads are outside these timings. Journal's shipped history search is its date filter. There is no full-text search, tag filter, or journal-wide backup/export view in this revision.
Recovery and accessibility
3b3bcdd. They cover editing two dates offline, switching away and back after a clear, restoring the cleared page on reload, confirming both original record bodies after reconnect, opening a local date after a refused listing, and showing an ordinary storage refusal without a conflict banner.Reproduce
Run from the PR checkout with Node 22 and npm. The baseline argument points to a checkout with its own dependencies. The harness reads the same fixture against each checkout's application source and bundled styles.
npm ci npm ci --prefix tools/smoke npm exec --prefix tools/smoke -- playwright install chromium git worktree add --detach ../journal-bench-base 3b3bcddf819bd2c1b0c263d710d3d1f6241199ab npm ci --prefix ../journal-bench-base node benchmarks/browser-journal.mjs bench ../journal-bench-base node benchmarks/browser-journal.mjs axe npm run verify