PROPOSED 7 Nov 2026 · options mockup for decision #182 / #220 (owner-priority 2) · LensMemory + LensAnchor (16 Aug 2026) and the report-pref mirror R89 (d867c255a, 23 Oct 2026) are built; only the remainder is designed here. Not implemented.
Mac app · relaunch · decision #182

What should the Mac app remember about each lens when it relaunches?

artefact — what would ship commentary — why, cost, risk

The question

The owner asked for “state for these and more, e.g. scroll depth, on all lenses” to be normal on relaunch. Zoom, quote grouping and panel sizes already are (R89). What is left is how fine a place each lens comes back to, and whether anything beyond the place — filters, search, the selected quote, open disclosures — comes back with it. The Mac norm is the place you were, not the filters (Finder restores a folder’s view and scroll; Mail clears search). This page lays out three widths of answer and what each costs when the content changed, when two windows show one study, in the HTML export, and in where the state has to live.

What is already true at HEAD (verified 7 Nov 2026)

Restores todayMechanismWhere it lives
The window set, and each window’s study and lensWindowGroup(id:"main", for: WindowSeed.self); macOS restores the seeds. A window with a place arrives there once, then forgets it.macOS window restoration
The lens a study was left onLensMemory.restore from Project.lastLens; written on every route-change.projects.json → last_lens (machine-local, outside the study folder)
A coarse place in the lensLensAnchor: Quotes → group heading id (theme-…/section-…), Codebook → framework section id, Sessions → session id (navigate, from SessionsRouteMemory). Signals, Project, Discussion, Screens → top, decided 16 Aug.projects.json → last_anchor
Zoom, panels open/width, display layout/density/breaks, focus mode, quote grouping, subtitle prefsR89 report-pref mirror: 16 keys + 1 prefix, seeded into each new web view before the SPA reads. App-wide, last write wins.UserDefaults reportPrefs
Projects sidebar column widthAppKit NSSplitView autosave (measured 25 Sep).UserDefaults (AppKit’s own key)
Deliberately not restoredSearch and filter — “a query restored days later shows 6 of 312 quotes and reads as data loss” (LensMemory.swift; Mail precedent). Carve-out standing, ruling 12.
Not restored, undecidedThe offset inside a long group; the place in a transcript (session is kept, the moment is not); the Signals row you were on; a Codebook code rather than its framework; the Discussion question; the selected quote; moderator-question pins (bristlenose-mod-questions); transcript timeline on/lanes (bn-transcript-timeline); inspector source (bn-inspector-source); signal working panel (bn-signal-working-open) — the last four are written to localStorage, which the Mac discards, and are not in the R89 list.

The scene both days share

Tuesday 17:40. One window on Quotes: tags sidebar open at 260 px, zoom 110 %, search tutorial, tag filter onboarding, reading the second quote under Onboarding gaps. A second window on Sessions, in s1’s transcript at 1:06. Quit. Wednesday 09:10, launch. Every option below keeps what R89 keeps (panels, zoom, grouping); they differ in where each window lands and what else is on screen.

Tue 17:40 · before Quit · Quotes window
Projects
Smoke test4 sessions
Project
Sessions
Quotes
Codebook
Signals
⌕ tutorialonboarding ×1 of 4 quotes
Sections
Dashboard
Search
Onboarding gaps
Onboarding gaps
p101:06frustration
I think the onboarding could be better. When I first signed up I had no idea what to do. A quick tutorial or walkthrough would have helped a lot.
onboarding
Tags
onboarding 1 navigation 2 search 1
Commentary
What is written to disk at this moment, today: last_lens: "quotes", last_anchor: "theme-onboarding-gaps" (the heading above the card, reported on scroll-settle), and in UserDefaults bn-tags-open: "true", bn-tags-width: "260", bristlenose-zoom: "1.1". The search, the filter, the focused card and the scroll offset are in the web view’s .nonPersistent() storage and in React state; both are gone at Quit. The Sessions window writes last_anchor: "s1" — the same field, last writer wins, which is the first consequence to keep in view.
Option A

Nothing more: the lens and the heading you were under

Ship as is. Each window comes back on its lens; Quotes and Codebook scroll to the group heading you were under; Sessions reopens the transcript at the top; Signals, Project, Discussion and Screens open at the top. Search and filter cleared.

Wed 09:10 · Quotes window · option A
Projects
Smoke test4 sessions
Project
Sessions
Quotes
Codebook
Signals
⌕ Search quotes4 quotes
Sections
Dashboard
Search
Onboarding gaps
Onboarding gaps 1 quote
p101:06frustration
I think the onboarding could be better. When I first signed up I had no idea what to do. A quick tutorial or walkthrough would have helped a lot.
onboarding
Tags
onboarding 1 navigation 2 search 1
Wed 09:10 · Sessions window · option A
Projects
Smoke test4 sessions
Project
Sessions
Quotes
Codebook
Signals
All Sessions › s18 min
Topics
Dashboard
Search
Onboarding
00:00m1 Thanks for joining. Shall we start with the dashboard?
00:10p1 I found the dashboard pretty confusing at first. I couldn’t figure out where my settings were.
00:26p1 The navigation was hidden behind a hamburger menu. I kept looking for a sidebar but there wasn’t one.
Commentary · what changes · consequences

S · 0 nothing to build. Layers touched: none. Sibling: this is the shipped sibling.

  • What the researcher sees: the Quotes window lands with the heading at the top (one group above where they were, since the heading is the anchor). A 40-quote theme means scrolling back down to find the quote. The Sessions window lands at 00:00 of an 8-minute transcript; a 90-minute one is the cost case.
  • Content changed overnight: a theme renamed changes its heading id → falls to the top, honestly. A re-analysis that renumbers sessions is already handled: SessionsRouteMemory is cleared on run completion so a stale s3 cannot open the wrong participant.
  • Two windows on one study: last_anchor is per study, not per window. Two Quotes windows on one study both land at the same heading. Tolerable at heading granularity.
  • Export HTML: no bridge, nothing applies; the browser does its own thing. Same under every option.
  • Rules out: nothing; A is the floor every other option stands on.
Option B

The place, finer: the quote, the moment, the row — and the four view toggles that went missing

Two small moves on shipped seams. B1: LensAnchor’s table and useAnchorReporter’s selectors get one finer entry per lens, still an element id and never a pixel offset. B2: the view toggles that are preferences rather than filters join the R89 list. Search and filter stay cleared; the selected quote is not restored.

Wed 09:10 · Quotes window · option B
Projects
Smoke test4 sessions
Project
Sessions
Quotes
Codebook
Signals
⌕ Search quotes4 quotes
Sections
Dashboard
Search
Onboarding gaps
Onboarding gaps
p101:06frustration
I think the onboarding could be better. When I first signed up I had no idea what to do. A quick tutorial or walkthrough would have helped a lot.
onboarding
Tags
onboarding 1 navigation 2 search 1
Wed 09:10 · Sessions window · option B
Projects
Smoke test4 sessions
Project
Sessions
Quotes
Codebook
Signals
All Sessions › s18 min
Topics
Dashboard
Search
Onboarding
00:58m1 Anything else before we finish?
01:06p1 I think the onboarding could be better. When I first signed up I had no idea what to do. A quick tutorial or walkthrough would have helped a lot.
01:18m1 Thank you, that’s really useful.
// projects.json — the shipped fields, finer values (B1) { "last_lens": "quotes", "last_anchor": "q-p1-66" } // was "theme-onboarding-gaps" { "last_lens": "sessions", "last_anchor": "s1/01:06" } // was "s1" — session + the moment; exact shape to settle { "last_lens": "codebook", "last_anchor": "code-…" } // the code row, not its framework header { "last_lens": "signals", "last_anchor": "signal-row-…" } // the section row; was "top" by decision { "last_lens": "discussion", "last_anchor": "question-…" } // the question; was "top" // Project dashboard and Screens board: still the top (no stable structural position). // tests/fixtures/report-prefs-contract.json — three keys join the R89 list (B2) "keys": [ …, "bn-transcript-timeline", "bn-inspector-source", "bn-signal-working-open" ] // bristlenose-mod-questions stays out: a JSON array of quote ids, per study, over the 32-char value cap — it is content state, not a preference.
Commentary · what changes · consequences

S B2: six lines across two lists and the contract JSON, both sides already asserted. M B1: one selector per lens in ANCHOR_SELECTORS, one arm per lens in LensAnchor.action, and a new .session(id, moment) apply path (navigate, then scroll — WindowPlace already carries path + anchor, so the shape exists). Layers: frontend/src/hooks/useAnchorReporter.ts, LensAnchor.swift, ContentView.restoreAnchor, their tests. No new message, no new store, no new key in projects.json.

  • Nearest siblings: LensAnchor/useAnchorReporter (16 Aug), which already say “an id either resolves or falls back honestly”; the report’s Open … in New Window, which already lands a window on a transcript at a moment through WindowPlace. B1 reuses that arrival for a restore. B2’s sibling is R89 itself. Everything here follows; nothing invents.
  • Content changed overnight: a quote id q-p1-66 survives edits, stars, tags and renames. A hidden quote is out of the DOM → scrollToAnchor retries, gives up at the top. A re-analysis can renumber participants, so q-p1-66 could resolve to a different quote that looks right — the exact objection SessionsRouteMemory answers by clearing on run completion. Rule to carry over: clear last_anchor when a run completes, for every lens, as the route memory already does for Sessions. One line, and it is the thing that makes finer anchors safe.
  • Two windows on one study: still per study. Two Quotes windows land on the same quote; at quote granularity that is more visible than at heading granularity, but it is a tie, not an error. Per-window needs C’s store.
  • Export HTML: unchanged. The anchor reporter runs only when embedded; a browser keeps its own localStorage, so B2’s three toggles already persist there.
  • Risk: B1’s Signals and Discussion entries reverse a 16 Aug “top” decision. Signals rows are regenerated by elaboration; if their ids are not stable the restore falls to the top, which is where it is today. Low.
  • Rules out: nothing later. C is B plus a store.
Option C

The whole view: place plus search, filter, selection and disclosures, per window

Everything in B, and the window comes back with its search, tag filter, focused quote and pinned moderator questions as they were — per window, not per study, so two windows on one study each return to their own view.

Wed 09:10 · Quotes window · option C · nothing changed overnight
Projects
Smoke test4 sessions
Project
Sessions
Quotes
Codebook
Signals
⌕ tutorialonboarding ×1 of 4 quotes
Sections
Dashboard
Search
Onboarding gaps
Onboarding gaps
p101:06frustration
I think the onboarding could be better. When I first signed up I had no idea what to do. A quick tutorial or walkthrough would have helped a lot.
onboarding
Tags
onboarding 1 navigation 2 search 1
Wed 09:10 · Quotes window · option C · re-analysed overnight, tag renamed
Projects
Smoke test5 sessions
Project
Sessions
Quotes
Codebook
Signals
⌕ tutorialonboarding ×0 of 312 quotes
Sections
Dashboard
Search
First-run setup
No quotes match.
Tags
first-run 9 navigation 41 search 17
// Where it has to live: per WINDOW, so not projects.json (per study) and not UserDefaults (app-wide). // The native primitive is @SceneStorage, which macOS saves with the window — the one store this app does not use yet (100days row, 12 Sep). @SceneStorage("viewState") var viewState: String // JSON: {lens, anchor, search, tagFilter, focusedQuoteId, pins:[…]} // A new inbound message, every time any of those change (debounced), and a new seed the SPA reads before QuotesContext/Toolbar mount: { type: "view-state", lens, anchor, search, tagFilter: {…}, focusedQuoteId, pins: [...] }
Commentary · what changes · consequences

L A new bridge message both ways, a per-window store, and the SPA accepting initial search/filter/selection state at mount in QuotesContext, Toolbar and QuoteGroup (today they start empty by construction). Per-window selection is not even per-window in the SPA yet. Layers: Swift (@SceneStorage, BridgeHandler, ContentView), TypeScript (four stores and a seed), both test suites, and the LensMemory doc comment, which has to be rewritten because it argues the opposite.

  • Nearest sibling: none for the filter half — the shipped position is the carve-out. For the store half, WindowSeed is the per-window value macOS restores, but it is identity, not state; @SceneStorage is the right primitive and is unused. Departs from LensMemory’s stated rule; the departure clause would have to be “a filter restored is a filter the researcher set yesterday, so it is theirs” — which the right-hand frame answers.
  • Content changed overnight (right frame): the search and the filter return over re-analysed content: 0 of 312, a chip naming a tag that no longer exists, an empty centre. Nothing is lost, and it reads as if everything is. Mail clears search for this reason; so did we.
  • Two windows on one study: solved — each window carries its own view. This is the one thing only C buys, and only because the store moves per window; B1’s anchor could ride the same store without the filters.
  • Export HTML: unchanged (no bridge). The browser keeps search in React state only; a reload clears it there too, so the export and the Mac would now disagree about what a reopen does.
  • Rules out: the simple sentence “it opens where you were; what you were looking for is yours to type again”. Once filters restore, every later filter (the parked Quotes filter menu) inherits the question of whether it survives a relaunch.

Consequences side by side

A · lens + heading (today)B · finer place + the four togglesC · whole view, per window
Where the Quotes window landstop of the group you were inthe quote you were readingthe quote, with your search and filter back
Where the transcript lands00:00 of the right sessionthe moment you were atthe moment; plus timeline state (B2 gives that too)
Signals · Codebook · Discussiontop · framework header · topthe row · the code · the questionas B, plus the inspector’s selection
Study re-analysed overnightfalls to the top honestlyfalls to the top honestly if last_anchor is cleared on run completion (carry the Sessions rule)“0 of 312”, a dead tag chip, an empty page
A quote hidden or deletedunaffectedretry, then the topselection points at nothing; filter may now match nothing
Two windows on one studysame heading (per study)same quote (per study; a tie)each its own view
HTML exportunchanged under every option: no bridge, so no restore; the browser’s own storage keeps the R89 keys as it always did
Where the state livesprojects.json + UserDefaultsthe same two files, finer values and three more keysa new per-window @SceneStorage blob, plus a new bridge message
Keyslast_lens, last_anchor, reportPrefs[16+1]as A; reportPrefs[19+1]as B; viewState per scene
Build costS · 0S B2 · M B1L
Reverses a written decisionno“Signals/Discussion restore to the top” (16 Aug) — a table entry eachthe search/filter carve-out (LensMemory, ruling 12)
Is it Bristlenoseyit is the siblingfollows (anchor table, R89 list, WindowPlace arrival)departs, unjustified on the filter half; new store on the other

The researcher’s path, option B

Tuesday, readingscroll settles · SPA posts anchor-change {lens:"quotes", anchor:"q-p1-66"} · Swift writes last_anchor only on change
→
QuitmacOS keeps the window seeds · web storage discarded · projects.json and UserDefaults already current
→
Wednesday, launchseeds restore windows · ready → LensMemory.restore → activateLens → restoreAnchor: scroll to q-p1-66; retry, then top
→
If a run completed meanwhilelast_anchor cleared at run completion (new, mirrors SessionsRouteMemory) → lands at the lens top, never on a lookalike

Recommendation

Option B, in two commits: B2 first (three keys into the R89 contract — an afternoon), then B1 (finer anchors through the shipped LensAnchor table), with one rule carried over from Sessions: clear last_anchor when a run completes. Keep the search/filter carve-out exactly as written.

Why. The owner’s phrase is “scroll depth”, and the honest unit of scroll depth in this product is an element, not a pixel: the quote, the turn, the row. B gives the place at that unit on every lens that has one, through seams that already exist and are already tested on both sides, and it never restores anything that could make yesterday’s content look lost. C’s only unique gain is per-window views; the right-hand frame of C shows what its filter half costs, and the only researcher who meets the two-windows case gets a tie, not an error. A is what ships today and the owner has already said it is not enough.

Sequence. B2 → B1 (Quotes quote id, Sessions moment, Codebook code) → the Signals and Discussion entries once their row ids are confirmed stable across elaboration. Per-window state waits for a case that needs it; if one comes, the anchor moves into @SceneStorage without changing anything the SPA reports.

What the owner still has to settle

Is this Bristlenosey

PartProposal (B)SiblingVerdict
Surfaceno new UI; the window lands somewhereLensMemory / LensAnchorfollows
Data pathanchor-change inbound, scrollToAnchor / navigate outboundthe same messages, 16 Aug; WindowPlace arrival for path + anchorfollows
Storeprojects.json last_anchor; UserDefaults reportPrefsthe same fields and dictionaryfollows
Vocabularyelement ids per lens, listed in one table on each sideANCHOR_SELECTORS ↔ LensAnchor.actionfollows
Content safetyclear on run completionSessionsRouteMemory.clear() at run completionfollows
Precedencea seed’s place still wins over the remembered oneplaceArrival ordering in ContentViewfollows
Stringsnone——
Signals / Discussion anchorsa place where the table said topdecision 16 Augdeparts: “a row is a stable structural position once ids are stable” — verify, else keep top

Sources read: LensMemory.swift · LensAnchor.swift · useAnchorReporter.ts · nativePrefs.ts · BridgeHandler.swift (report-pref, anchor-change) · ContentView.swift (restoreAnchor, placeArrival) · WindowSeed.swift · ContextPlace.swift · SessionsRouteMemory.swift · tests/fixtures/report-prefs-contract.json · docs/design-workspace.md §P3a/P3b · 100days rows “Scene-level state restoration” and “A per-study, per-lens scroll position survives a relaunch”