Skip to content

feat(annotate): minimal-by-default HTML sessions with stale-preference decay - #1260

Merged
backnotprop merged 2 commits into
mainfrom
feat/html-annotate-minimal-defaults
Aug 10, 2026
Merged

feat(annotate): minimal-by-default HTML sessions with stale-preference decay#1260
backnotprop merged 2 commits into
mainfrom
feat/html-annotate-minimal-defaults

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

TLDR: Raw-HTML annotate sessions now open minimal by default: Pinpoint input, tools hidden, left sidebar closed, and the right annotations drawer closed (new: the drawer joins the persisted HTML chrome state instead of always opening on desktop). Explicit choices still persist between HTML sessions, but they now expire after 7 days without a refresh, so lapsed users come back to the defaults. Explicit changes and annotation activity both re-stamp the records, so active users keep their setup.

Label: AI-assisted. Requested by the maintainer during v0.26.8 manual QA.

  • New preferenceTtl.ts holds the 7-day staleness window shared by both records.
  • The HTML input-method cookie is now JSON { m, savedAt }; a legacy plain-string value has unknowable age and is treated as expired (one-time reset to Pinpoint). The markdown surface keeps its own preference with no TTL, unchanged.
  • HtmlChromeState gains panelOpen (default false); the HTML-surface restore effect applies it and the save effect persists it.
  • handleAddAnnotation re-stamps both records on HTML-surface annotation activity.

Validation: 21 preference tests (TTL boundaries, legacy expiry, drawer default, round trips), mutation-verified (disabling the TTL fails 4); html-viewer + utils DOM suites 624 pass; typecheck clean.

…e decay

Raw-HTML annotate sessions now open minimal by default: Pinpoint input, tools
hidden, left sidebar closed, and the right annotations drawer closed (the
drawer joins the persisted HTML chrome state, previously it always opened on
desktop). Explicit user choices still persist between HTML sessions, but the
records now carry a timestamp and expire after 7 days without a refresh, so
users who have not changed anything or annotated HTML in a while come back to
the product defaults. Explicit changes and annotation activity both re-stamp
the records, so active users keep their setup. Legacy untimestamped cookies
are treated as expired (a one-time reset to the new defaults). The markdown
surface keeps its own preference with no TTL, unchanged.

Mutation-verified: disabling the TTL fails 4 tests.
The App-level chrome suite seeded legacy untimestamped cookies, which the
stale-preference decay now treats as expired by design, and one assertion
compared cookie bytes that re-stamping legitimately changes. Seeds carry a
fresh savedAt and the write-integrity assertion compares the chrome fields.
@backnotprop
backnotprop merged commit 7d7654f into main Aug 10, 2026
16 checks passed
@backnotprop
backnotprop deleted the feat/html-annotate-minimal-defaults branch August 10, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant