feat(annotate): minimal-by-default HTML sessions with stale-preference decay - #1260
Merged
Conversation
…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.
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.
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.
preferenceTtl.tsholds the 7-day staleness window shared by both records.{ 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.HtmlChromeStategainspanelOpen(default false); the HTML-surface restore effect applies it and the save effect persists it.handleAddAnnotationre-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.