Skip to content

detail: trailer UX — full-screen mode, transport, seek, and a left column with a spacing grammar - #117

Merged
GLinnik21 merged 19 commits into
mainfrom
int/trailer-ux
Sep 18, 2026
Merged

GLinnik21 merged 19 commits into
mainfrom
int/trailer-ux

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

The Detail page's trailer now behaves like a thing you can watch and drive, and the
left column's vertical rhythm was rebuilt on meaning rather than on an even ladder.

Trailer

UP from the hero promotes the background trailer to full screen. The mode has its own
transport, factored out of the player HUD rather than reinvented — the same pieces,
one owner — and LEFT/RIGHT scrub with a real commit on key-up, routed through
ContentReq::PreviewSeek so a preview never touches watch state. A hint on the header
line says how to get there, and the whole action row fades as one object instead of
four pills cutting out. Identity and ratings recede behind a playing trailer; the facts
row, the people column and the below-hero flow stay, because they are what tells you
what you are looking at.

Spacing

The hero column was 16 between every pair of rows with a 24 before the action row,
which reads as a grid rather than as groups. It is now stated in named rungs whose
WIDTH carries the meaning — inside one group, at a change of information kind, from
information to action, from the hero to the next region — and every row hangs off the
previous row's measured bottom rather than a coordinate plus a number. The action
row takes one rung more than the arithmetic asks for, and that judgement is written
down where the constant is: a filled capsule under a caption reads as closer at an
equal gap, so equal-by-eye is one rung wider.

Below the hero the shelves were double-spaced: a shelf already carries its own label
band, so what followed it was that band plus a full region gap — 42px looser here than
the same two objects anywhere else in the app. Related and Extras also take the shared
band collapse now; Cast is deliberately exempt, since it prints a name under every
headshot. All three moved from a local heading pitch of 46 to the shared one.

The pinned wordmark no longer clips the flow scrolling under it — it fades out as the
first block below the hero begins to travel.

Mechanism

testlock::serial() panics on a re-entrant take instead of deadlocking. Two tests on
this branch took the guard and then called a helper that takes it again; a plain mutex,
so the thread blocked forever holding the one lock the whole suite queues on — no
output, no failure, no notification, for over an hour. A deadlock and a panic are the
same bug; only one of them names itself.

Verification

  • make check green (3731 host tests, lint, dep/static gates, C and harness suites).
  • cargo check --lib --no-default-features green — the shipping feature set.
  • Shown on the television and approved by the owner before the gates were run; the
    compact-logo behaviour was checked at both ends (logo present and clear, then gone
    with the content flowing past uncut).

🤖 Generated with Claude Code

GLinnik21 and others added 18 commits September 17, 2026 23:25
The HUD's scrim, its kicker+title line and its scrubber were one 300-line
`draw_hud` body, so any second surface that wanted a transport had to redraw
them by hand -- which is how two screens end up with two scrubbers that drift.
Split the three out as `draw_scrim`, `draw_title` and `draw_playbar` over a
`Playbar` value (`Kicker`, `Knob`, `TransportMark`), and let `draw_hud` compose
them; `Playbar::live` keeps the player's own call a one-liner. The HUD's linger
deadline becomes `player_hud::LINGER_MS`, with `screens::player::input`'s
`HUD_LINGER_MS` now an alias of it, so a second surface cannot pick a second
auto-hide delay.

No visual change: `draw_hud` draws the same objects in the same order.

Co-Authored-By: Claude Opus 5 <[email protected]>
…s there

Full-trailer mode used to keep the Play/Resume pill and its scrims on screen,
which meant the one state whose whole point is "watch the trailer" still had
page furniture in it, and nothing on the page ever said UP was the way in.

Both halves now:

- UP on the hero while a trailer's picture is up takes the WHOLE page off --
  logo, synopsis, meta, the action row and both scrims (`preview_field` eases to
  0.0, so `landing_hero::PROMOTED_FIELD` is deleted) -- and draws a trailer
  transport over the video: the `Trailer` kicker and the extra's title, the
  play/pause state glyph, and the scrubber with elapsed and remaining. No
  quality, subtitle, audio or info control; a trailer is one stream and a
  chooser over one choice is furniture. The visuals are the player HUD's own
  `draw_scrim`/`draw_title`/`draw_playbar`, not a second set.
- Background autoplay (picture up, not promoted, focus on the hero) draws
  `Press [^] for full screen` under the action row, fading in with the picture
  and out the moment the page is promoted or collapsed.

OK / PLAY / PAUSE pause and resume the preview through a new
`ContentReq::PreviewTransport`, which the app performs with
`player::preview::transport` -- the one content request that deliberately does
NOT halt the preview. `app::lifecycle::transport_target` is now the single place
the remote's three keys turn into a wanted pause state, shared with
`PlayerReq::Transport`.

LEFT and RIGHT do NOT seek, and the omission is deliberate: every non-in-place
seek path falls back to `engine::reload_at`, a fresh Starfish `Load` that
`preview::Machine` never admitted against `CYCLE_BUDGET`, and a reload that
fails is charged to the process-wide preview breaker -- one missed seek would
cost trailer autoplay for the rest of the session. They reveal the controls
instead. `preview.rs`'s module doc carries the argument.

The controls auto-hide on the HUD's own linger and come back on any key while
the page stays hidden; a pause holds them up rather than spending the linger.
BACK and DOWN still leave through the one `collapse_full_trailer` body, which
now also resumes a trailer paused on the way out. Play stays focusABLE as the
hero group's anchor but is never drawn -- full-trailer mode answers every key
before the press machine sees it.

Host tests cover the key ladder, the hint predicate, the show/hide predicate,
the fade, the auto-hide and its idle-gate silence, the pause not spending the
linger, the resume mark, and the three transport requests the screen emits.

Co-Authored-By: Claude Opus 5 <[email protected]>
record_stops still built a Stop (Hover::Focus + Activate::Press) for every
hero control, Play included, even while full_trailer() had faded the whole
row to alpha 0. valid()/hero::focusable() keep Play "valid" so the engine
has a legitimate keyboard anchor to stand on, but that legitimacy leaked
into the pointer path: a magic-remote click on the old pill position still
resolved and activated it, starting the feature from a screen showing only
a trailer.

Skip the whole hero group in record_stops while full_trailer() is true,
rather than filtering per-control by valid()/focusable() — hover and click
both go away together. Added a test-only player::preview::force_playing_for_test()
seam (full_trailer() reads that live singleton) and a regression test that
fails red without the fix.
draw_buttons enumerated the row through hero::visible_ctls(set, full_trailer()),
which narrows to [Play] the instant full_trailer() flips — so Restart/Trailer/
Alt/the watch toggle vanished in one frame while only Play rode preview_chrome's
fade, contradicting both the introducing commit message and
docs/trailer-ux-plan.md's "the row fades out with the rest of the chrome".

draw_buttons now iterates hero::hero_ctls(set) unconditionally: what's drawn no
longer narrows with full-trailer mode, only what's FOCUSABLE/pointer-reachable
does (hero::focusable/visible_ctls, valid(), and now record_stops, unchanged).
Updated hero.rs's and full_trailer()'s doc comments, which had documented the
hard-cut as intentional, to match. Reworked
full_trailer_mode_always_collapses_to_play_only into
full_trailer_mode_collapses_focus_to_play_only_but_leaves_drawing_alone to pin
that hero_ctls (drawn) and visible_ctls(_, true) (focusable) now genuinely
diverge.
…tra's

Transport::draw only ever received the item's own title, but request_preview
already resolves the trailer Extra (self.preview_extra()) and PMS commonly
titles that extra literally "Trailer" — pairing it with the "Trailer" kicker
duplicates the word. Pass both film_title and extra_title through and add
trailer::transport_title, which shows the film/show title by default and only
switches to the extra's own title when it differs meaningfully (trimmed,
case-insensitive) from the kicker, so a distinctively-named extra ("Teaser 2",
"International Trailer") still gets shown.

Unit-tested both branches. Updated trailer.rs's module doc and
docs/trailer-ux-plan.md, which described the old item-title-only pairing.
Press [^] for full screen -> [^] Full screen: glyph first, no Press/for
filler. Same predicate (hint_shown) and same placement (draw_hint's x/cy
call site in mod.rs is unchanged) — just the words. Updated the two docs
that quoted the old wording (ui/CLAUDE.md, docs/trailer-ux-plan.md).
transport()'s doc claims a press racing the machine's own stop (an
in-flight fetch, an admitted-but-unbound Load, an abandoned one) must be
refused, but it gated on occupies() (phase != Idle), which is true for
Fetching/Loading/Abandoning/Stopping too -- exactly the races the doc says
to refuse. Chose to fix the code, not the doc: none of those phases has a
bound engine for a pause/resume to reach, so passing them through cannot do
anything useful and can only race the teardown the doc warns about.

Added bound_or_playing() (Binding | Playing) and its pure phase_bound_or_playing
helper, gated transport() on it instead, and unit-tested that every phase
occupies() would have let through is refused. Generalized the earlier
force_playing_for_test() into set_phase_for_test(phase) so both this and
full_trailer()'s test seam share one mechanism.
… Down

The input arm's own comment claims it answers a key it owns on every edge
before any other arm, but only acts on the Down edge. Nothing exercised
that claim: the existing trailer_act helper drives the per-key effect
directly, bypassing the input arm and its guard entirely.

Pin it with a LEFT-key probe (mapped to Reveal, an effect ordinary LEFT
navigation cannot produce): Up must be swallowed with no reveal, Down must
be swallowed and reveal. Needs the live player::preview singleton to be
non-Idle, so it uses the force_playing_for_test/reset_for_test seam added
for the item 1 and item 5 fixes.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
The only existing collapse test asserts the empty case (nothing paused,
nothing to resume) — the branch that asks for a resume when
preview::paused() was true on the way out was never exercised.

Drive it with the same force_playing_for_test seam as the input-arm test,
plus TX.commit_paused(true)/TX.reset(), the same production seam
player::mod's own tests already use to set the transport's pause bit.
Confirmed red (assertion failure, no PreviewTransport(Some(true)) effect)
against a locally neutered branch before restoring it.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Every existing run() call in trailer::tests passes hint=false, so nothing
ever moved Transport::hint at all — a field that never changed would have
passed just as well as a real fade. Drive it through hint=true then
hint=false and assert it actually eases in and back out, in the
background-autoplay context (full_trailer=false) the hint appears in.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
The transport-factoring refactor (f4824c13) swapped the episode branch's
title CString handling from `if let Ok(cs)` to `.unwrap_or_default()`
while merging the kicker+title p.text calls into one draw_title call.
That refactor was supposed to be visual-no-op, but the swap means a title
with an interior NUL byte (the one case CString::new can fail on) now
draws an empty title line instead of skipping it.

Restore the skip: gate the combined draw_title call on the title's
CString succeeding. This also skips the kicker in that same rare case,
since draw_title now draws both together, but nothing is a closer match
to the pre-refactor behavior than an empty line is.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
… on trailer

Item 1: the "UP -> full screen" trailer hint no longer sits under the
action row. It draws centred on the screen and vertically centred on
the same row the preview-shrunk logo occupies, so it reads as a third
element on the header's own line rather than page furniture growing
down over the video. It still shows on the existing predicate
(trailer::hint_shown), now eases from a peak alpha (SCRIM_TEXT_A) down
to a dimmer resting alpha after one HUD linger (LINGER_MS), and stops
reporting motion once settled — reusing the shared linger idiom rather
than inventing a second timing constant.

Item 2: everything below the hero (Cast & Crew, Extras, Related,
About, season/episodes) now fades with the rest of the chrome in full
full-trailer mode, through the same preview_chrome scalar that already
drives every other chrome element, instead of special-casing any one
section.

Knock-on from moving the hint off the hero's own stack: hero_chain
(ui/detail_layout.rs) is rewritten from absolute mock-derived offsets
(+30/+50/+54) to the systematic idiom its facts_y line already used —
each row's own measured bounding-box height (via the Measure seam, or
widgets::BADGE_H/RATING_MARK_D where a badge or rating mark is taller
than its caption) plus one named theme::space rung. This also gives
the chain the "no reflow" property the trailer preview needs: it is a
pure function of content (does the item HAVE ratings, how tall is its
synopsis), never of a label's current fade alpha, so the hero's
geometry is provably identical whether or not a preview is playing —
pinned by
screens::detail::tests::the_hero_chain_is_identical_whether_or_not_the_trailer_preview_has_faded_its_prose.

Tests: trailer.rs gains hint anchor/dim/motion-reporting coverage;
detail_layout.rs's own suite now asserts each rung as a gap between
measured boxes instead of pinning the old absolute pixel positions;
screens/detail/tests.rs adds the preview_chrome below-hero coverage
and the preview-on/off chain-stability pin. widgets::RATING_MARK_D is
promoted to pub(crate) so the chain can read it; the hero-contrast
audit (ui/widgets_hero_scrim_tests.rs) is updated to thread a
FixtureMeasure through the new hero_chain signature and continues to
pass at the tightened facts-row position.

make check and `cargo +nightly check --lib --no-default-features` are
both green.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…ler autoplay

draw_hero gated the identity/meta line, ratings row, facts row and people
column on chrome * preview_prose. preview_prose tracks
player::preview::View::prose, which drops to 0 the instant any picture is
up — including background autoplay, not just full-trailer mode — so those
rows faded out and back on every autoplay start/stop even though the owner
only wants full-trailer mode to hide them.

Switch those four draw calls to preview_chrome directly, the same value
already driving the buttons and the below-hero sections: it only reaches 0
in full_trailer() (promoted && picture), staying full through background
autoplay.

Pinned by background_autoplay_keeps_the_rows_below_the_synopsis_full_while_full_trailer_still_hides_them.
…-hero flow

While a trailer preview shrinks the hero logo into its pinned top-left spot,
its only visibility gate was the caller's own hero_alpha fade (400px of
scroll). content_top(measure) — where the below-hero sections start — is
under a screen height away, so a section (Extras, depending on order) could
already have scrolled up under the still-fading, still-pinned mark.

Add preview_logo_scroll_alpha(scroll_pos, hero_extent, t): a pure, eased
multiplier onto preview_chrome, using the same "how far into the below-hero
flow" fraction draw_backdrop's own `sf` already computes. At t=0 (no
preview) it is the identity — a normal hero is untouched — and it only
takes effect proportionally to how far the logo has shrunk into its corner,
fully hidden by the time the flow starts and back the instant scroll
returns to 0.

Pinned by preview_logo_scroll_alpha_only_fades_the_shrunk_logo_past_the_hero.
The trailer HUD drew a scrubber that nothing could move: the preview machine
exposed no seek intent, so LEFT/RIGHT fell through to the page. Give the
preview transport the same scrub ladder the player HUD has — a held direction
accumulates, release commits the target — and route it through the engine the
preview already owns.

Co-Authored-By: Claude Opus 5 <[email protected]>
… facts row stay

The previous commit moved four rows onto `chrome` at once, which was one gate
too coarse. The identity line and the rating marks are how a viewer decides
whether to watch; once the trailer is answering that question on the same
screen they are in the way, so they go back on `prose`, which drops the moment
a picture is up. The facts row and the people column keep `chrome`: those are
read WHILE the trailer plays, and they were the rows whose disappearing and
reappearing the owner objected to.

Both pairs still leave in full-trailer mode — `prose` is multiplied by `chrome`.

Co-Authored-By: Claude Opus 5 <[email protected]>
…logo leave with the flow

The hero column was an even ladder — 16 between every pair of rows, 24 before the
action row — which reads as a grid rather than as groups: at an equal gap the eye
stops being told which rows belong together. The ladder is now stated in named
rungs whose WIDTH carries the meaning. SM inside one group (identity, ratings,
synopsis are one object), MD at a change of information kind (prose to the facts
line), LG from information to action, XL from the hero to the next region. Each
row hangs off the previous row's MEASURED bottom rather than a coordinate plus a
number, so a row that grows pushes what follows it instead of overlapping it.

The one judgement in that chain is written down as one: the Play pill is a ~72px
filled capsule under an ~18px caption, and at an equal mathematical gap the
heavier object reads as closer, because its mass crowds the air above it. It
takes a rung more. That is an optical correction, not an exception to the system.

Below the hero the shelves were double-spaced. A shelf already carries its own
label band, so what follows it is the shared UNDER_LABEL_AIR the rest of the app
puts between two rows — not that band plus a full region gap, which was 42px
looser here than the same two objects anywhere else. Related and Extras also take
the shared band collapse, so a shelf holding no focus gives its label room back;
Cast is deliberately exempt, because it prints a name under every headshot and
the room is occupied on every frame. All three now use the shared
TITLE_DY + CARD_DY heading pitch instead of a local 46.

The pinned wordmark no longer clips the flow. It used to scissor whatever
travelled under it; it now fades out as the first block below the hero begins to
move, so the content reads uncut and the logo is gone before anything reaches it.

testlock::serial() panics on a re-entrant take instead of deadlocking. Two tests
here took the guard and then called install(), which takes it again — a plain
mutex, so the thread blocked forever while holding the one lock the whole suite
queues on. The run produced no output, no failure and no notification for over an
hour, and looked exactly like a slow build from the outside. A deadlock and a
panic are the same bug; only one of them names itself.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 18, 2026 02:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new trailer transport draw loop allocates CStrings per frame and uses unwrap_or_default() for titles, which is avoidable overhead and changes failure behavior.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR upgrades the Detail page’s trailer experience into a full-screen, controllable “full-trailer mode” (transport UI, pause/resume, scrub/commit), while also rebuilding Detail’s left-column vertical spacing into named semantic rungs and tightening below-hero section spacing via shared shelf-band collapse. It also hardens the test suite by making testlock::serial() fail fast on re-entrant use.

Changes:

  • Adds full-trailer mode transport + hint, with preview-safe pause/resume and scrub committed via ContentReq::PreviewSeek (no watch-state writes).
  • Refactors shared transport rendering/scrub tuning into ui::player_hud and threads measured layout into detail_layout::hero_chain.
  • Collapses shelf label-band spacing below the hero and updates docs/tests to match the new behavior.
File summaries
File Description
rust-modules/src/ui/widgets.rs Adds glyph-cap support for KeyHint and exposes rating mark size for measured hero layout.
rust-modules/src/ui/widgets_hero_scrim_tests.rs Updates hero scrim assertions for new facts-row ink and measurement threading.
rust-modules/src/ui/player_hud.rs Extracts shared transport pieces (scrim/title/playbar) and centralizes scrub tuning/clamp.
rust-modules/src/ui/landing_hero.rs Removes PROMOTED_FIELD scrim residual constant (full-trailer now eases to 0).
rust-modules/src/ui/detail_layout.rs Reworks hero vertical chain to be “measured bottom + named rung” (needs Measure).
rust-modules/src/ui/CLAUDE.md Documents the new KeyHint::glyph/glyph-cap use and revised section-gap model.
rust-modules/src/screens/registry.rs Adds ContentReq::PreviewTransport and ContentReq::PreviewSeek for trailer controls.
rust-modules/src/screens/player/input.rs Re-exports scrub constants and delegates clamp logic to ui::player_hud.
rust-modules/src/screens/detail/trailer.rs New: full-trailer mode transport state, key policy, hint logic, and unit tests.
rust-modules/src/screens/detail/tests.rs Adds regression tests for full-trailer hit-testing, chrome fade behavior, and scrub wiring.
rust-modules/src/screens/detail/section.rs Removes compact-title “hide anchors”; asserts hero slot invariants.
rust-modules/src/screens/detail/related.rs Switches related shelf to shared heading pitch and band-collapse-aware block_h(band).
rust-modules/src/screens/detail/mod.rs Integrates trailer transport, preview seek commits, band-lifted section flow, and compact title fade.
rust-modules/src/screens/detail/identity_tests.rs Updates fixtures for new trailer_ctl field.
rust-modules/src/screens/detail/hero.rs Clarifies full-trailer “focus anchor” vs “drawn” behavior; updates facts ink to FACTS_INK.
rust-modules/src/screens/detail/geometry_tests.rs Updates fixtures for new trailer_ctl field.
rust-modules/src/screens/detail/extras.rs Makes Extras shelf band-collapse-aware (block_h(band)) and aligns heading pitch.
rust-modules/src/screens/detail/cast.rs Aligns heading pitch, refactors under-band math, and documents why Cast doesn’t collapse.
rust-modules/src/screens/detail/about.rs Refactors Languages layout constants and fixes MORE mark placement within the plate.
rust-modules/src/player/preview.rs Adds preview transport + admitted seek path with budget/breaker safety and new tests.
rust-modules/src/lib.rs Makes testlock::serial() panic on re-entrant take; adds regression test.
rust-modules/src/app/playback.rs Uses shared transport_target for player transport handling.
rust-modules/src/app/lifecycle.rs Adds transport_target(play, paused) helper + tests.
rust-modules/src/app/content.rs Handles new preview transport + preview seek content requests.
docs/ui-system-migration.md Updates Detail flow documentation for the new multi-gap model.
docs/trailer-ux-plan.md Marks older plan sections as superseded; documents new transport + behavior.
docs/TODOS.md Removes obsolete PROMOTED_FIELD follow-up and updates trailer legibility TODO context.
docs/DESIGN.md Updates shelf heading pitch guidance to the shared TITLE_DY + CARD_DY sum.
Review details
  • Files reviewed: 28/28 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +458 to +465
let kicker = CString::new(crate::metadata::TRAILER_CONTEXT).unwrap_or_default();
let title = CString::new(transport_title(film_title, extra_title)).unwrap_or_default();
crate::ui::player_hud::draw_scrim(p);
crate::ui::player_hud::draw_title(
p,
crate::ui::player_hud::Kicker::Context(kicker.as_ptr()),
title.as_ptr(),
);
…ps allocating

The transport drew its "Trailer" kicker through a fresh CString every frame and
built the title with unwrap_or_default(), so an interior-NUL title drew an empty
line under the kicker instead of skipping the block — the exact regression
5a221a5 already reverted in the player HUD this transport was factored from.

The kicker is now a static C string, with TRAILER_CONTEXT derived from it at
compile time so the two spellings cannot drift; the title takes the HUD's
`if let Ok` rule.

Co-Authored-By: Claude Opus 5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 1aadf30 into main Sep 18, 2026
5 checks passed
@GLinnik21
GLinnik21 deleted the int/trailer-ux branch September 18, 2026 02:35
GLinnik21 added a commit that referenced this pull request Sep 18, 2026
* stores/metadata stage A: owner handles over existing statics

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* stores/metadata stage A2: production reads go through the owner view

Routes production reads through MetadataView (`bridge.metadata_view()` /
`H::metadata(cx)`) the same way Person already does, instead of calling
`crate::metadata::<state fn>()` directly:

- ViewState's D6.5 fifth-owner-callback threading (viewstate.rs,
  stores/viewstate.rs, stores/mod.rs) so `SetWatchedLocal` lands through
  the owner rather than the free `apply`.
- app/playback.rs, app/run.rs (Frame::begin now samples the HUD control
  slot through the owner), app/input.rs, dev/scenarios.rs, app/bridge.rs's
  page_probe.
- A new `MetadataLike` trait (screens/registry.rs, mirroring `PersonLike`)
  plus its `AppHost` impl, for screens generic over `H` where
  `H::Views<'a>` is opaque: tracks_panel.rs, item_menu.rs (added
  `MetadataView::alt_copies`-style forwarding), alt_sources.rs (added
  `MetadataView::alt_copies`/`alt_available`), screens/player/overlay.rs
  and ui/info_panel.rs's Info card (now threaded a `MetadataView`
  parameter into `on_ok`/`draw`).
- Removed the now-satisfied `#[allow(dead_code)]` on `MetadataView`'s
  `now_playing`/`playing`/`active_marker`/`synthesized_tail_marker`, on
  `AppViews.metadata` and on `Bridge::metadata_view`.

Left reading the static directly, because no accessible `Cx`/owner reaches
them without a much larger refactor of their own private call graphs:
screens/detail/mod.rs and detail/episodes.rs (a ~30-site `self.detail()`
fan-out with no H in scope), ui/track_menu.rs's `TrackMenuState` (11 sites
through a cx-less `tracks()` helper, cx-less at construction), and
ui/info_panel.rs's `is_episode()`/`actions()` (called from cx-less
methods). These stay `&'static` reads exactly as before (Stage A/D4's
behaviour-preserving leak) and are Stage B/follow-up work, not invented
here.

Gates green: cargo +nightly check --lib (default and
--no-default-features), make check (both feature passes + lint),
ci/check-deps.sh.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* stores/metadata stage A3: detail, track menu and info panel read through the owner view

Routes the last cx-less production readers of the metadata statics through
MetadataView, closing the gap A2 left open:

- screens/detail/mod.rs's detail() and episodes.rs (the ~30-51-site
  self.detail() fan-out) already converged on a single choke point per
  static call, so no per-call-site threading was needed — each bare
  crate::metadata::{current,season_loading,detail_loading,
  detail_request_status,alt_available}() call became
  crate::metadata::MetadataView::new().<method>() at its existing choke
  point (detail(), or the bare call itself where there was no wrapper).
  Approach chosen: capture at the existing single choke point, not thread
  cx through dozens of cx-less helper signatures — matches Stage A's own
  module doc, which already sanctions MetadataView::new() as the
  zero-argument, forward-compatible construction (stores/metadata.rs's
  MetadataStore::view, item_menu.rs/tracks_panel.rs/alt_sources.rs test call
  sites already do this).
- ui/track_menu.rs's tracks() (11 downstream call sites) — same
  choke-point rewrite.
- ui/info_panel.rs's is_episode() (2 sites) — same choke-point rewrite,
  now reading both now_playing() and current() off one MetadataView value.
- metadata.rs: dropped the now-stale #[allow(dead_code)] on
  season_loading/detail_loading/detail_request_status/alt_available, which
  A3 makes reachable through MetadataView.

Statics stay in place; behaviour-preserving. One known-scope residual:
ui/player_hud.rs:1326 still reads crate::metadata::now_playing()
directly — not in this stage's listed scope (draw_hud has no cx/H and no
MetadataView parameter today; D2's plan for it is later work).

Gates green: cargo +nightly check --lib (default and
--no-default-features), make check, ci/check-deps.sh.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* stores/metadata stage A4: a MetadataView comes only from an owner

MetadataView<'a> now borrows its owner's MetadataStore instead of being
constructible from nothing: MetadataView::new(&'a MetadataStore) -> Self is
the only constructor, and MetadataStore::view(&self) -> MetadataView<'_> is
the accessor. Every production reader gets a view through H::metadata(cx)
(the MetadataLike trait, reachable) or by threading an explicit
meta: MetadataView<'_> parameter down from the nearest caller that has one
(not reachable). Test code constructs a fresh owner
(MetadataStore::default().view(), or a static MetadataStore for a fixture
Host's MetadataLike impl) exactly as Person's tests already do.

screens/detail/mod.rs's memory_at has no cx/H in reach at all (it's called
through dyn Screen<H> from ui/dispatch.rs and app/bridge.rs, a signature
shared verbatim by every other screen) so it constructs its own owner
locally rather than widening that trait, which is out of this layer's scope.

Behaviour is unchanged; the statics MetadataView still reads stay until
Stage B deletes them.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

* stores/metadata stage B: Metadata state and adapter belong to one owner

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

* Fix D7: Detail's memory_at reads cached SpotFacts, not a throwaway store

Stage B deleted the metadata statics, so MetadataStore::default() in
memory_at (and the now-false "until Stage B deletes them" comment above
it) answered from a permanently empty store: locate/hero_set/detail all
blank, collapsing season/section/col memory to (0, 0, None) on every
BACK.

Per Opus decision D7: memory_at now reads a cached SpotFacts { detail,
tracks, hero, season }, refreshed only where a real MetadataView is in
hand (tick, draw, end of sync_keys). spot() loses its meta parameter
and takes SpotFacts instead; locate() is now a one-line wrapper over
the new locate_with(elem, detail, tracks) which needs no view at all.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Add MetadataStore test seams, port screens/detail/tests.rs off the deleted metadata shims

MetadataStore::state_mut() (test-only, mirrors HubsStore::state_mut) and
split_for_test() (state_mut + adapter_ref borrowed together, for
_for_test helpers that take both) are the only new owner-accessor
surface; every rewritten call site still goes through
run()/state_mut()/adapter_ref()/view(), never a second mechanism.

screens/detail/tests.rs drove one screen per test through free helper
fns (install/step/apply_metadata/...) written for the old global
CURRENT static and the deleted stores::metadata::apply shim. Since the
file calls MetadataStore::default().view() (and the old free-function
reads) at ~90 individual call sites rather than through a handful of
helpers, threading an owned store through every call site the way
stores/person.rs's tests do would have rewritten most of the file.
Instead the owner now lives in a thread-confined cell (`test_store()`),
reset per test the same way the old global was, and a mechanical
perl rewrite retargeted every call site at once; a handful of
signature changes (pump_restore now taking fx, land_detail_for_test
taking state+adapter, spot() taking SpotFacts) were fixed by hand.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Port geometry_tests.rs, item_menu.rs, tracks_panel.rs, overlay_tests.rs test fixtures

Same TEST_METADATA_STORE-as-unit-struct pattern as screens/detail/tests.rs,
fixed the same way: a thread-confined MetadataStore behind test_store(),
reached only through run()/state_mut()/view().

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Fix metadata.rs's own test module and stores/mod.rs's dead generic-apply tests

metadata.rs: land_detail_for_test forwarded a plain &MetadataAdapter into
pump_detail -> install_landed_detail -> request_alt_sources, which clones
the Arc to spawn a resolve worker — a real Stage B signature bug, not a
test-only mismatch. Fixed by taking &Arc<MetadataAdapter> throughout (and
MetadataStore::split_for_test to match); the module's own
trailer_now_playing_keeps_the_parent_and_the_extra_duration test now
owns a local MetadataState instead of calling the deleted 1-arg
set_current_for_test/free trailer_now_playing.

stores/mod.rs: deleted a_command_raises_one_notice_and_a_steady_store_none
and generic_dispatch_rejects_all_physically_owned_stores — both graded the
free apply()/take_notices()/gen() dispatcher, which no longer exists
anywhere in production code now that every store (Metadata included)
dispatches through its own owner.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Rewrite metadata_test_support.rs's fixtures onto a thread-confined MetadataState/Arc<MetadataAdapter>

Same reasoning as screens/detail/tests.rs's TEST_METADATA: these fixtures
are called as free, argument-less functions from hundreds of call sites
in the three split metadata test modules, a shape written for the old
CURRENT/SEASON_GEN statics. Threading an owner through every call site
would rewrite most of those files for no behavioural change, so the pair
now lives in a thread-confined cell here, reached only through the real
accessors (current, land_detail, MetadataState/MetadataAdapter's own
fields) — never a second mechanism.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Port app/content.rs off the deleted metadata shims

Same thread-confined MetadataStore pattern as screens/detail/tests.rs,
plus a local land_detail_for_test(sid, rk, gen, detail) wrapper matching
the pre-Stage-B 4-argument shape so the ~9 multi-line call sites below
needed no per-site rewrite.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Port screens/alt_sources_tests.rs off the deleted metadata shims

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Port remaining Stage C1 named test call sites to per-Bridge Metadata

Finishes the 8 files named in the Stage C1 map: app/detail_panel_tests.rs,
app/viewstate_directory_policy_tests.rs, screens/detail/hero.rs, and
ui/info_panel.rs now route through the real per-Bridge `rig.stores.metadata`
(where a Bridge is already in scope) or a thread-confined test store (where
it is not), instead of the deleted `crate::stores::metadata::apply` shim or a
throwaway `MetadataStore::default()` that silently read back nothing.

Also fixes the free `crate::stores::take_notices()`/`crate::stores::apply()`
callers left behind by the same cutover in app/bridge_test_support.rs,
app/surface_navigation_tests.rs, app/search_publication_tests.rs, and
screens/library/deferred_tests.rs (routed onto the real `Stores` aggregate
already in scope), and adds the missing `MetadataLike` test impls in
screens/about_panel.rs, screens/player/mod.rs, and ui/chapters_panel.rs.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Port viewstate.rs and focusprobe.rs tests off the deleted global Metadata dispatcher

viewstate.rs's optimistic-edit tests routed their MetadataCmd closure through a
fresh MetadataStore::default() per call (a throwaway store, so the following
crate::metadata::current()/take_notices() read-back saw nothing); each test now
owns one MetadataStore for its whole body and reads/writes through it directly.

focusprobe.rs's fingerprint() gained a MetadataView parameter in the Stage B/C1
cutover; every call site (and the one closure wrapping it) now threads a
thread-confined test store's view through, mirroring the pattern already used
in screens/detail/tests.rs and friends.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Port screens/detail/identity_tests.rs off the deleted Metadata statics/apply

Same shape as the earlier detail/tests.rs port: swaps the dead unit-struct
static MetadataStore for a thread-confined store, adds the missing
spot_facts field to the DetailScreen test fixture, and threads state/adapter
through set_current_for_test/land_detail_for_test/begin_detail_for_test/
detail_request_status wherever the old free-function shape called for it.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Port metadata_detail_mailbox_tests.rs to per-owner state/adapter (one script)

This submodule of metadata.rs read the pre-Stage-B crate-global detail/alt
mailbox statics (DETAIL_LANDING, DETAIL_GEN, DETAIL_DONE, ALT_GEN,
ALT_ROSTER_GEN, ALT_SLOT) and called free functions (clear, land_detail,
pump_detail, current, detail_loading, alt_install, alt_available,
pump_alt_sources, request_detail_with_spawn, finish_detail_fetch,
detail_request_status, begin_detail_for_test) at their old, state-less
arities. One perl script threads metadata_test_support's test_state()/
test_adapter() through every call site and rewrites the deleted statics to
the equivalent MetadataAdapter fields (this file is a descendant module of
metadata.rs, so it can see them) — no per-site hand edits.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Finish porting metadata's mailbox/watch-state/record test submodules

metadata_season_mailbox_tests.rs and metadata_watch_state_tests.rs: same
mechanical test_state()/test_adapter() threading as the detail mailbox file,
one perl script each.

metadata/record.rs's replay-recorder tests (p2_* cancellation/replay tests,
the malformed-batch and float-bits round-trip tests) needed the same
threading plus one real gap: the old crate-global `reset(bool)` free function
that rearmed the shared TRACKER has no Stage B equivalent, since the tracker
is now owned per-adapter with no reset seam (production never resets one
after boot). Added a local test-only `reset(bool)` that overwrites the
owned Tracker directly through the already-private `tracker(adapter)`
accessor (this file is a descendant of crate::metadata, so it can reach it)
rather than inventing a second mechanism.

This closes out Stage C1's test-compilation debt: `cargo +nightly check
--lib --tests` is clean.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Reconnect library_publication_tests to the real Bridge's MetadataStore

The prior mechanical port had routed this module's metadata calls through
the thread-confined test_store() double instead of rig.stores.metadata --
the same store the module's real, mounted DetailScreen actually reads via
bridge::frame(). That disconnection made 7 of 10 tests fail at runtime
(the mounted screen's `current`/`detail_request_status` never reflected
what the test wrote).

Fix: shadow land_detail_for_test/drain_detail_workers inside this module to
take `rig: &mut bridge::Bridge` and route through `rig.metadata_mut()`, and
give the two Tap<AppHost> structs (SettleDetailBeforeRestoredEnter,
AtomicStart) a `*mut MetadataStore` captured from `rig.metadata_mut()`
just before the frame_with_tap call that invokes them, since Tap::effect
has no rig parameter by design.

8/10 tests now pass. The remaining 2 failures
(a_covered_detail_refresh_waits_until_its_page_owns_metadata_again,
visible_refresh_starts_before_queued_tick_or_store_change_can_consume_it)
now exercise the REAL DetailScreen's behavior for the first time and
disagree with their pinned generation-count/status expectations -- this
looks like the reconnection surfacing a real behavioral difference, not a
wiring bug, and needs domain review rather than a mechanical fix.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Update pump_wiring_tests's text-pin for Stage C1's Bridge-owned pump names

The route-unconditional per-frame pump text-pin still checked for the old
free-function call shape (crate::stores::metadata::pump_detail()/
pump_season()), but Stage B moved the real call site in app/run.rs to the
per-Bridge owned methods (app.bridge.metadata_pump_detail()/
metadata_pump_season()). The pin never updated, so it always panicked.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Fix alt_sources_tests's disconnected-store panel/refresh views

Three call sites built a fresh, empty MetadataStore::default().view() to
seed/refresh AltSourcesScreen's materialized table, instead of the same
thread-confined test_store() the test's alt_install/alt_restamp_owners
calls actually write to -- the same disconnected-throwaway-store bug as
D7, just in a different file. MetadataStore::default() is a genuinely new
owner post-Stage-B, not an alias for a shared global, so the panel always
saw an empty store.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Apply Unmount's own Metadata::Clear effect before its own next press

an_open_request_does_not_outlive_its_page discarded the effects Unmount
returned instead of applying them, so `test_store()` still held the
Detail this page had just unmounted from -- the page's next press still
resolved the same Related row and pushed again, when the whole point of
the test is that it should not. A real Bridge applies AppFx::Store effects
on its next dispatch turn; this file drives no dispatcher, so it has to do
that itself. Added apply_metadata_effects() for it.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Drive Mount+Enter before asserting the async detail fetch started

DetailScreen::new() never touches the metadata adapter -- the fetch starts
on the mounted page's first Enter (ScreenEvent::Enter pushes
MetadataCmd::RequestDetail as an effect, admitted in the same step that
publishes Requested, per T2). This test asserted detail_loading() right
after construction, which only worked before this event moved fetch-start
off construction and onto Enter. Drive Mount then Enter and apply the
resulting effect before checking.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Apply Enter's own RequestDetail effect before reading its generation

Both request paths Enter can take (the direct RequestDetail push and
start_reconciliation's own) only enqueue the command for a real Bridge's
next dispatch turn; this truth-table test drives no dispatcher and was
reading detail_generation_for_test() right after step() without ever
applying the effect it returned, so the very first combination (cached=
false, phase=None, status=None) already failed. Same missing-effect-
application gap as the two fixes just before this one.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Give sibling metadata test files a way to arm this adapter's Tracker

controlled_cancelled_detail_ack_is_recorded_and_recovers_capacity expects
crate::app::bootstrap::stores to observe cancelled-completion recordings,
which only happens while this adapter's own Tracker.enabled is true. Before
Stage B, Tracker was one crate-global static, and record.rs's own mod
tests armed it once via a pub(crate) reset(bool) any test in the binary
could reach (and never explicitly disarmed) -- so this test worked only by
relying on some other test in the same binary having left the single
global Tracker enabled. Post Stage B each MetadataStore owns its own
Tracker starting disabled, so that implicit cross-test leakage is gone (as
it should be) and this test never enables it at all.

Added record::reset_tracker_for_test (pub(super), reachable from every
metadata_*_tests.rs sibling, not just record.rs's own mod tests) and had
this test call it. This gets the test substantially further (the "results
recorded" assertions this note names now pass); a further mismatch inside
the REPLAY phase's publish_replies/pump_detail interaction (`replay grades
the ACK it actually applied` at line ~562, left:[] right: one dropped-
terminal record) remains and needs a domain-level read of record.rs's
replay path, not a mechanical fix -- left red and documented for review.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Port app/input.rs's hostsim-gated test off the deleted Metadata shims

Missed by the earlier mechanical sweep because this module (activate_card_
tests) only compiles under --features hostsim, which the default `cargo
test --lib` run never exercises -- ci/check-deps.sh's metadata-owner gate
caught the leftover crate::stores::metadata::apply(...)/free-function
detail_loading() call sites. Routed both through the real, already-
constructed bridge (bridge.metadata_mut()) instead of adding a disconnected
test double, since this test already drives one.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* stores/metadata: the three red tests after the owner port

Only one of the three is landed here. `controlled_cancelled_detail_ack_is_
recorded_and_recovers_capacity` was a fixture gap, not a product defect: before
Stage B, `bootstrap::stores::init` ended with
`crate::metadata::record::reset(initial.content.is_some())`, so re-entering the
controlled domain for the replay run rewound the one crate-global TRACKER. Stage B
deleted that line along with the static, and `init` cannot reach a per-owner
adapter, so the replay phase inherited the recording phase's seq=8 and
`publish_replies` rejected the first supplied batch (seq=1) as "incoherent detail
reply sequence" — `take_results()` answered `[]`. The fixture now does the rewind
itself; every assertion is unchanged.

The other two are one product regression and are NOT fixed here: Stage A/B moved
Metadata's screen-issued commands from a synchronous `apply` onto the deferred
`AppFx::Store` queue, and three properties depended on that synchrony. See the
handback for the evidence and the decision that is needed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

* stores/metadata: publish Requested only after the owning store admits the request

Metadata was the one owned store without the synchronous same-turn boundary its
siblings have at `app/bridge.rs` (`browse_run`, `person_run`, `viewstate_run`).
Stage A/B left that gap, and `app::content::refresh_content` fell back to the
deferred `AppFx::Store` queue for the one call that cannot tolerate deferral: the
visible reconciliation start, whose `DetailRefreshPhase::Requested` becomes
observable two queue hops before the store admits the request. A `Tick` or
`StoreChanged` landing in that window reads the PREVIOUS reconciliation's
terminal `Some(false)` and `pump_restore` drops the server obligation outright
(trap T2, pinned by
`visible_refresh_starts_before_queued_tick_or_store_change_can_consume_it`).

- `Bridge::metadata_run` — the missing sibling, delegating to the `Stores`
  method that already existed.
- `refresh_content` takes the `Bridge` and runs `RequestDetail` through it in the
  same synchronous step that emits `DetailRestore`. Covered entries still arm
  `Deferred` and start nothing, so a covered page cannot supersede the visible
  one's in-flight request. Screen-issued Metadata commands that are not same-turn
  boundaries stay on `AppFx::Store`.
- `DetailScreen`'s `DetailRestore` arm records `Requested` instead of starting a
  second, non-idempotent request against an address the caller already admitted.
- `teardown_cleared` latch: §3.4's `pop_sequence` delivers `WillLeave(ForGood)`
  AND `Unmount`, and with the store owned per `Bridge` the first `Clear` is still
  queued when the second event reads the guard, so one teardown emitted two
  `Clear`s and two `supersede_detail` generations.
- `DetailScreen::reconcile` weighs the page's own undischarged `refresh`
  obligation beside the store's answer. The `Enter(Restored)` promotion of a
  covered page's obligation is screen-issued and cannot be made same-turn — `Cx`
  publishes stores as views — and the engine's `after_step` reconcile runs before
  the drain reaches that effect, so reading the store alone dropped the restored
  episode key to the hero fallback for one frame, after which it is unrecoverable.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

* stores/metadata: pin the T2 Enter-promotion window with a red, ignored test

start_reconciliation (Enter(Restored)'s promotion of a Deferred obligation to
Requested) pushes RequestDetail onto the deferred AppFx::Store queue and flips
self.refresh synchronously in the same step, but the store only admits that
command on a later drain iteration. A StoreChanged/Tick landing in that window
still sees the stale terminal from the PREVIOUS reconciliation at that
address, and pump_restore's (Requested, Some(false)) arm silently retires the
freshly promoted obligation.

Confirmed as a real defect (test goes red against unmodified code), but
closing it needs Cx/Rig widened so a screen can write a store synchronously
from step, the way app::content::refresh_content does at the Bridge level for
the sibling DetailRestore path. That is an architecture change, not a
Metadata-layer fix, so the test is left #[ignore]d and documented rather than
fixed or weakened.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

* stores/metadata: two-owner regression test (contract Required 3)

Two independently-owned MetadataStores must share no request, landing or
notice generation. Mirrors HubsStore's own two-owner test shape. Checked by
hand (not left in the tree) that routing one owner's begin_detail_for_test
through the OTHER owner's adapter_ref() — the shape a shared/global adapter
would have produced before this layer's ownership port — makes the first
cross-owner assertion go red, so this is not an assertion that would also
pass against the broken shape.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

* stores/metadata: label the existing T1 pin, verified by mutation

cancelled_focus_restoration_still_terminates_reconciliation_on_success_or_failure
(screens/detail/tests.rs, landed with ViewState's refactor at 4b390cd)
already exercises T1 exactly: directional input cancels restore_intent, the
refresh obligation must survive that cancellation, and the store's own
terminal landing (not the cancellation) is what retires it. Confirmed
meaningful by mutation — folding self.refresh into the same directional-input
cancellation guard the intent uses turns this test red — then reverted the
mutation (no diff) rather than leaving it in the tree. Doc comment now names
it as the contract's T1 pin so it is not lost again.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

* stores/metadata: arm the production record::Tracker again (Stage B regression)

bootstrap::stores::init ended with crate::metadata::record::reset(initial
.content.is_some()) at d067a79; Stage B (0d46652) deleted that call along
with the crate-global TRACKER static it reset, and nothing armed the
per-owner replacement in production. Bridge::controlled_home built its
MetadataStore with Tracker::new(false) permanently, so every controlled-
content detail landing produced no recorded terminal at all while the tape
was active, and the device-side validator rejected the resulting {"data":[]}
as "noncanonical detail replies" — recording of detail terminals was dead.

Adds crate::metadata::record::arm (production, not #[cfg(test)]) and
MetadataStore::arm_detail_tracker, called once from Bridge::controlled_home
right after Stores::default() with initial.content.is_some(), exactly the
decision record::reset used to make. Pinned by
app::bootstrap::tests::controlled_home_arms_the_detail_tracker_when_content_initial_is_present,
which lands a detail terminal through the Bridge's own owned store and checks
bootstrap::stores::take_results() is non-empty; confirmed load-bearing by
removing the wiring call and observing the dead-code deny fail the build.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

* docs: Metadata completed its ownership port, all six stores now owned

stores/mod.rs's module doc (:4-6, :14-15) still said Metadata/Search/Hubs
"retain the compatibility global + mailbox shape" and that apply(cmd)
"rejects Browse, Person and ViewState commands" -- both false now (the
generic apply(cmd) dispatcher is gone entirely; grepped for stores::apply
and fn apply( across stores/ to confirm). docs/stores-as-machines.md and
ui/CLAUDE.md's phase-4 paragraph carried the same claim about Metadata's
mailboxes/adapter still being process-wide compatibility state. Corrected
the false clauses in place; left the surrounding historical/dated narrative
alone (docs the layer makes false are in scope, not a rewrite).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

* stores/metadata: close T2 by generation identity, not synchrony

`pump_restore`'s (Requested, Some(false)) arm retired the reconciliation
obligation on a bare terminal bool with no identity, so a stale terminal
left by an OLDER request at the same (sid, rk) — reachable whenever
Enter(Restored) promotes Deferred->Requested and the queued RequestDetail
has not yet been admitted to the store — could drop a freshly promoted
obligation. The previous stage's #[ignore]d test proved this is real.

Fix: MetadataView::detail_generation() exposes the adapter's detail_gen
counter (mirrors the generation check completions already use for T3).
DetailScreen now records self.refresh_gen — the generation that existed
just BEFORE this promotion's own request is admitted — at both places
refresh becomes Requested (start_reconciliation's queued path, and the
DetailRestore arm's already-admitted synchronous path). pump_restore only
retires the obligation once the store's current generation is strictly
newer than that recorded value, so a stale terminal from before admission
can no longer be mistaken for this request's own terminal.

Un-ignores enter_restored_promotion_survives_a_stale_terminal_before_admission_t2;
verified red again with only the pump_restore generation check reverted.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

* stores/metadata: thread the owner view through #117's remaining call sites

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

* stores/metadata: reset and fence the owner when the server or profile changes

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Em5yYDNi5A2peYR6oPMXwD

---------

Co-authored-by: Claude Sonnet 5 <[email protected]>
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.

2 participants