Repository navigation
Conversation
…dy carries the facts Deliverable E of the Shared Sources design. On a friend's item the detail hero's date/runtime line reads "13 Jun 2024 · 1 hr 57 min · Shared by bamx23" — one more run on a line that is already there, rather than a chip, a band or a line of its own. WHERE, AND WHY NOWHERE ELSE. An item's source is stated where the item is, and the badges row above cannot be it: those chips say what the item IS — 4K, CC — and where a copy came from is not a media property. Its own line would be a fifth line in the one column already fighting for height, for a fact you read once; a kicker above the title is where an episode's show name goes. So it joins the FACTS line, last, after the facts about the item, because it is a fact about where the item came from. It takes that line's own rung and ink (CAPTION, tertiary, regular) after the same .45 middot every separator there uses: it is dim because the line is dim, and the line is the lowest rung in the ladder — under it is the couch legibility floor. ON YOUR OWN SERVER THERE IS NO RUN AT ALL, not an empty one and not a dangling dot. `Detail::source` is the owner's HANDLE and is empty for our own machine, and empty means the flow emits nothing — no separator, no run, no draw call — so the 90% of installs with one server pay nothing for the feature. The host suite's first assertion is exactly that: the borrowed row's event list is the own-server row's with the credit appended, prefix-identical. The person, never the machine. "bamx23" is the same string the shelf headings say; "bx23-ldn" stays in the Sources list and the failure read-out, because "whose copy is this" is answered by a person and "what could not be reached" by a machine. THE ROW BECAME A FLOW, which is the part worth reading. It was a `dotted_run` + `dotted_run_w` pair — a paint expression and a width expression that had to be kept agreeing — plus a yield ladder written in terms of the second. `home::heading_flow`'s doc names that exact pair as the pattern to stop repeating, so this row now has ONE expression: `facts_flow` hands each run to a closure that paints in the product and measures in the tests, and `facts_fit` takes a measure rather than owning one, so the row that is graded is the row that is drawn. `dotted_run_w` is gone; `dotted_run` stays, still the identity line's join, which is a join and not a tail-with-a-fragment-in- the-middle. The ladder is unchanged for an item with no source, and the tests prove it across every budget rather than at a corner: the extent goes entirely, then a date that cannot fit alone is elided. The credit slots in AHEAD of both — the trailing credit yields first, as the design calls it, because the item's own facts outrank the attribution; and monotonically, so a row that had to drop its extent can never win the credit back. One behaviour changed for items with no source, and it is a fix: the fragment's leading separator is now decided by whether anything was actually emitted before it, not by whether the item HAD a date or an extent. An item whose extent was dropped by the ladder while its date was empty used to open its facts line with an orphan dot. `Detail::source` is "" at its one construction site, so nothing new is reachable in the product until the multi-server layer can say which server a fetch was made against (docs/shared-servers.md step 2 threads `ServerId` through this struct; the roster field behind it is `Resource::source_title`, already parsed). It is captured at FETCH time rather than read at paint time because the page outlives the fetch and the current server can move under it. Host 418 -> 422 + lint, `make` (ARM) green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
A ratingKey names an item on ONE server. So does a Part.id, a Stream.id, a
playQueueID, and the resume point. Every PMS call on the playback path used to
find its server implicitly — `plex::client_opt()`, evaluated at the instant of
the call, which means "whichever server the user happens to be browsing right
now". With one server that is always the right answer. With a friend's share
merged into Home it is right only by luck, and the resolve worker alone asked
the question four independent times, so a switch landing mid-resolve could split
one playback across two servers.
The server is now captured ONCE, on the main thread, at `request_play` — the
same instant and under the same discipline as every other `ResolveEnv` field —
and carried by value from there: ResolveEnv → Plan → CUR_SID, installed beside
CUR_RK by `apply_plan`, which is the sole writer of the route statics. The
resolve's client bind, the PlayQueue, /decision, the stream-selection PUT, the
transcode seek, the retranscode and the final scrobble all take
`client_for(sid)`. None of them asks what is current any more.
`plex::client_opt()` deserves naming as the hazard it is. It is not a static a
worker could be caught reading — it is a function call, so `Send` cannot see it,
and a worker that resolves its own server compiles clean and passes every test
we have. That is why `build_stream`'s doc now says so in as many words.
The one that had to land in THIS commit rather than a follow-up is the
`/:/timeline` reporter. It runs on a worker every ten seconds for the whole of a
playback and had no capture at all — it re-read the current server on each tick.
Split from `CUR_SID`, the app would resolve correctly, play correctly, and
quietly write the resume point of a borrowed film onto your own server every ten
seconds for as long as it played. Nothing would show it: the POST is
fire-and-forget, the host suite has no runtime, and the device harness grades
progress from the app's own heartbeat rather than from the server the report
reached. So `report_timeline` takes the id as an argument and `engine.rs`
captures it at the spawn site, beside the `rk` it already captured.
Two smaller things fall out of the same rule.
The `/identity` machine id cache is now keyed to the server that taught it. It
feeds `uri=server://{machineIdentifier}/…` on the PlayQueue POST, so one cached
globally is server A's fingerprint sent to B, naming a machine B has never heard
of — on a POST that is best-effort and therefore fails silently. The registry's
own per-server id outranks the cache entirely, so a server registered with one
skips that round trip.
And the Up Next still-warm moves out of `apply_plan` into `pump_play`, its only
caller. That function's contract is to be the sole writer of the route statics;
a texture prefetch is not one of them. Keeping them apart is also what lets the
host suite reach the install at all — `warm_tex` drags in the poster cache and,
through it, a GL call the dev Mac cannot link.
`metadata::cached_playing` / `fetch_playing_item` take the id for the same
reason. The fetch uses it now; the cache HIT still tests the rk alone, because
`Detail` does not yet carry the server it was loaded from — that gap is written
up at the call site as the one hole left in the capture, with what it will cost
and the one-line shape of the fix.
Three host tests, plus one fixture repair. `Plan`/`ResolveEnv` round-tripping
the sid is graded on the resolve that FAILS, which is the exit `build_stream`
takes before any network. The machine-id cache is graded from both sides. And
the timeline routing is graded against two real loopback servers: the item plays
from B, the user switches to A, the POST must land on B — with a closing report
to A as the control, so "A heard nothing" is a fact about routing and not about
a listener that never worked. That test needed `plex`'s registry test seams
widened to `pub(crate)`: the public `register` resolves the device id through
`session::load`, which mints and PERSISTS a uuid, and a host test must not write
one; `reset_for_test` is what hands the table back empty afterwards.
The fixture repair is `ui::detail`'s test `mount`, which reset the filmstrip's
sub-row and the season capsules as retained state but not `saved_col`, the
per-section column memory `move_focus` seeds from when it enters a strip. So a
test that walked one strip decided where the next test's first DOWN landed.
Order-dependent and therefore invisible until the set of tests changes, which is
exactly what a route case holding `testlock` across real socket I/O did.
Device: ./tests/run.py 21/21. Host: make check green, 12 consecutive runs at
--test-threads=16.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
Plex's relay is the last connection a server offers and the only one with a ceiling: a tunnel to a Plex relay host, conventionally :8443, capped at 2 Mbps with the server transcoding down to fit. probe.rs already ranks it last. What was missing is what playback should DO when it wins, and the answer is a branch rather than a parameter, because there is no parameter to reach for: TranscodeSpec has no bitrate field, maxVideoBitrate is a literal on the re-encode branch alone, and on direct play — this client's default and its whole point — a cap means nothing, since no encoder is running to obey it. So plex::link_policy denies TWO things over a relay, and the second is the one a "force a transcode" instinct leaves behind. Direct play is obvious: the share measured this week is 31 Mbit/s, and 31 down a 2 arrives as a stall two minutes in with the AU queue draining and nothing on any surface saying why. But a container REMUX is no better — it copies the codecs and deliberately sends no cap, because a cap is exactly what would force the re-encode it is avoiding. Same bytes, same rate, one layer down. Denying both leaves the re-encode, which is the only flavor whose whole point is that the server picks the rate; the server is on the other end of the tunnel and is the only party that knows its real ceiling. The tier itself is now a property of the SERVER, not of a request: Client::set_link/link(), lock-free, LINK_UNKNOWN until something says otherwise. route::build_stream reads it off the client it already holds — no new global for the resolve worker to consult — and one derived `remux` local keeps the payload guess, the stored flavor a seek rebuilds from, and the /decision query from disagreeing. Nothing calls set_link yet, so link() is None everywhere and UNRESTRICTED is what every play gets: byte-identical behaviour, which is also why "unknown" is deliberately permissive rather than defensive. Assuming relay would downgrade every direct play on earth to a server-side encode to prevent a stall on a connection this codebase has never made. NO RELAY CONNECTION HAS EVER BEEN OBSERVED HERE. includeRelay=1 has been on the query since the first login and every relay connection was then discarded unconditionally. The 2 Mbps and the :8443 are Plex's documentation, not our measurement, and this account's share advertises no relay at all — so it is not merely untested, it is untestable from here. The policy doc says so, at the policy. A REGRESSION THIS WORK CAUSED, found by review. Adding includeIPv6=1 to the roster query means plex.tv now offers v6 connections, and the live sign-in chooser takes the FIRST `local` match and PERSISTS it. stream.rs parses a dotted quad by hand (AF_INET, no DNS), so a v6 literal is not slower, it is undialable: a server listing its LAN v6 first would have signed in "successfully" to an empty Home and written that address to the session file, so every later boot started there too. The chooser is extracted as auth::choose_local_connection — the rule was not gradeable at all before — guarded on both the flag and a colon in the address, since a null flag must not be believed, and it has the two tests that would have caught it. DOCS. plex/CLAUDE.md gains the registry section it never had: why the table is atomic pointers (client() is called three times per key, per visible tile, per frame), why each Client is leaked (a re-point costs a worker one request to where that server used to be, never a dangling pointer), why token generations are globally unique (the poster memo compares ONE number, so equal generations would serve server B its cards from A's memoised token-bearing paths), and the three states the whole feature rests on: granted, pinned, reachable. The Makefile said FFmpeg is unlinked because "SONAMEs move between releases, 55->57->58->59->60" a hundred lines above the rules that build and stage a bundled, PINNED copy. Both halves are in the same file and they contradict each other. The real reason is different in kind: those .so files land beside the binary, on no library search path and with no rpath, so a DT_NEEDED entry would resolve at exec() against the system path and either find nothing (dead before main) or find the TELEVISION's FFmpeg, which is the wrong one. Left alone, the old wording is how "just use the TV's libavformat for https" keeps coming back — when what we ship is --disable-network and cannot open a URL. docs/shared-servers.md is brought level: §3 separates what was fixed from what is still live (the 8-second trap is still exactly as live as it was), §5 marks each step's status, §6 defers to the design canvas and names the two things its own earlier draft got wrong, §7 retires the harness question and records that relay is unverifiable from this account, §8 shows all four corrections landed, and §9 covers all seven units. Host 418 -> 424 + lint (x3), `make` (ARM) green. No device run: the docs half cannot be observed on a television and the relay half cannot be reached. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
…only observable on the TV `/tmp/plxnative-shared=<handle>` stamps that handle onto every item the session loads, which is what a fully-borrowed library looks like from the detail page. It exists because there is no host runtime: nothing in the suite draws a pixel, so the only place the hero's "Shared by bamx23" run can be JUDGED — its weight against the runs either side of it, whether it reads as the same voice as the date, what a long handle does to the line — is a real panel. And until the multi-server layer lands, `Detail::source` is "" on every path, so there is no item on this server that can put that run on screen at all. Without the trigger the feature is unreviewable by anyone, including the owner. It goes through `dev::read` like every other trigger, so `RELEASE=1` compiles it out with the rest of the `/tmp` surface, and it is deliberately NOT in `DIAG`: it changes what the app draws, so it should suppress the who's-watching picker exactly as `plxnative-detail` does. Host 422, `make` (ARM) green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
Measured against the real share this evening, from the dev Mac:
GET /photo/:/transcode?width=250&height=375&minSize=1&url=/library/metadata/1/thumb/1778526065
-> our server: Frozen's poster 25658 B sha a211b9ac5a
-> the shared one: Призраки в Венеции's 11707 B sha 59928cd5b1
One request path, two different films. That is not a corner case: rating keys
are server-local integers from 1 on every Plex server, and the thumb path's
trailing timestamp is a cache-buster the other server ignores, so the paths
COLLIDE by construction rather than by coincidence.
THE POSTER STORE. The key was the request path and nothing else, so those two
posters were one slot: whichever landed first was drawn for both, and the tile
that missed showed a film from a library it had never asked about. The fetch
made it worse in the other direction — every worker read `plex::client()`, the
CURRENT server, whatever item the slot belonged to, so with a merged Home half
the requests went to the wrong host carrying the wrong grant.
So a ServerId rides every entry point, sits in the slot as the other half of
its identity, and is what the worker dials. It is a FIELD, not a key prefix:
keys already run ~135 bytes into a fixed 256-byte array, and `slot_matches`
compares the u16 first, which is the half that can reject without touching the
array — this runs for every slot of every probe of every visible tile.
Capture-at-the-spawn-site is honoured by the store itself: `lookup` writes the
slot's server on the main thread when it claims it, and the worker resolves
`client_for(that id)`. It never asks what the current server is, which is the
question that has no correct answer on a worker.
THE KEY MEMO had neither host nor token in its key and one token generation for
the whole map. Both halves are now per entry: the server is part of the key, so
server B's card can never be built from A's memoised token-bearing path (a
request to B carrying A's grant is a 401), and each entry remembers the
generation it was built at, because with a table of servers there is no single
"the token" to compare against any more.
LAYERING. The store fetched through `crate::stream` directly, behind the back of
the layer whose module doc says it is the only code that touches the socket. It
now goes through `Client::fetch_built` — deliberately NOT `get_bytes`, which
would append a second `X-Plex-Token`: the poster path IS the store key and
already ends in one.
SERVER FACTS. `serverinfo` kept one version, one subscription and one in-flight
latch for the whole app, justified in its own doc by "host/port fix at the first
install (a later install is only a token swap)". The registry retired that
premise. All three are now per server, indexed by the registry's own slot number
(and by its ceiling, so a second constant cannot drift out of agreement with it).
The LATCH mattered as much as the values: a global one silently skips the second
server's fetch while the first is in flight, and the answer it never fetched is
then read as fact. An id that names nothing reads Unknown — never a neighbouring
server's answer, and never a panic.
`register` now does the refresh, not `install`: install only ever reached the
current server, so a shared server registered beside it would have stayed
permanently Unknown — and `player::error_shape` blames a missing Plex Pass on a
known-free server, which is exactly the sentence you do not want aimed at the
wrong owner. The log line names the slot, because the machineIdentifier that
really identifies a server is a household fingerprint.
The three UI resolvers keep their signatures and gain `_on(ServerId, …)` twins;
the bare form is exactly `_on(current_server(), …)`, so a one-server install is
byte-identical and the item-server plumbing has a door to walk through. One
behaviour change falls out for free: a poster resolve before `plex::install`
used to panic through `client()` and now degrades to no artwork.
Host suite 421 (three new: the slot identity rule, the memo's two scopes, and
one server's Plex Pass never being read as another's), `make` ARM green.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
Deliverable E of the Shared Sources design. When a second pinned source also holds the item on screen, the actions row grows an "Also available" pill with a trailing chevron, and it opens the app's usual Popover + TableView listing the copies: the library on each source, whose it is and how long it runs, and the resolution class as a badge. The reason it is a CONTROL and not a section of the page is that an item on several servers is a rare fact — a permanent band would spend a whole row on nothing on every other page in the library. So it is drawn only when a second source actually holds the film, and `is_available` counts distinct SOURCES rather than copies: two copies in two libraries of one server is not "also available elsewhere", and the row naming the second one would lead back to the machine you are already on. OK NAVIGATES. It opens that server's own page for the film rather than swapping the copy under you, which is also what settles the per-server progress problem: watch state does not travel between servers, so a design that switched the copy in place would have had to explain a resume position that jumped. Navigating makes it self-evident — you are on a different page, and it says where you are in that copy. Ordering is the copy that PLAYS first, then what a viewer would prefer: higher quality, and at equal quality yours before a friend's, because yours cannot go offline mid-film. The design's own example is the case that separates the first two clauses — a 1080p copy you are standing on outranks a friend's 4K one — and it is what the host tests pin, along with the gate and the rule that exactly one row is ever ticked (marked on the first copy matching the page's own (server, ratingKey), so a duplicated input cannot say "you are here" twice). Copies are keyed by the item's GUID and never by its ratingKey: every item-shaped integer in Plex is server-local and starts at 1, so both servers in this household have a ratingKey 4. `install()` is the seam the multi-server data layer feeds; it is empty until that lands, which is what makes the whole feature cost a one-server library nothing — no query, no control, no layout. Three things this needed elsewhere, each smaller than it sounds: `Button` gains a TRAILING accessory slot, because the leading `icon` is part of the label's own statement (the Play triangle IS "play") while a chevron is a disclosure mark about what the control does. `pill_w` grows a `pill_w_full` twin rather than a second sizing path, since sizing the pill without the chevron and then drawing one pushes the label off-centre. The hero row's focus now follows its CONTROL through an index change by name (`HeroCtl`/`hero_set`), not by a `+= 1` around one insertion point. That was sound while the restart disc was the only conditional control; with a second one, two controls can appear in the same frame and which of them moved the focus depends on where it was sitting. The geometry walk is one accumulation for the same reason — the alt pill is a variable-width control in the MIDDLE of a row that was otherwise a pill followed by fixed-width discs. And the source switch itself is performed by app.rs, not by the screen. Re-pointing `plex::client()` invalidates every store keyed to the server that was current when it was filled — the hub catalog, the browse grid, an open person page — and none of them carries a server in its keys, so a screen doing the switch itself would leave server A's ratingKeys being fetched from server B with only the page in front of you correct. `install_pms`'s wipe is now `activate_server`, shared by the profile switch and this one, and the BACK trail is truncated to its root because `Node::Detail` carries a ratingKey and no server (step 2 of docs/shared-servers.md). Host 418 -> 430 + lint, `make` and `make RELEASE=1` both green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
`/tmp/plxnative-shared=<handle>` already means "pretend this item came from <handle>" — it is how the hero's own "Shared by …" run is judged on a panel, because with `Detail::source` empty at every construction site there is no item in the product that can put a borrowed-item surface on screen. A second copy of that film on <handle>'s source is the other half of the same pretence, so this reuses that trigger rather than adding a second one for one deliverable. What it stands in for, precisely, because a stand-in that lies is worse than none. YOUR copy is real: the page's own ratingKey, on the current server, with the loaded item's runtime and resolution class and the library the browse store says you are in — which is what makes the tick meaningful. THEIR copy is that same film on a second registry SLOT, and the slot is real: a genuinely different server when one is registered, otherwise the current server registered again under a synthetic machine id. From everything this feature does — counting sources, resolving a client, switching, refetching — that is a second source, and because it is the same machine the ratingKey it carries is honestly the same film. So OK performs the real switch and opens a real page, which is the one behaviour of this panel that cannot be judged from a still. The single invention is that their copy is one resolution class better than yours, and it earns its place: the ordering rule is otherwise unobservable. The design's own example is a 1080p copy you are standing on sorting ABOVE a friend's 4K one — the case that separates "the copy that plays" from "the best copy" — and with two equal badges a capture cannot show the rule was applied at all. `one_class_better` promotes nothing past the top of the ladder and leaves an unrecognised class exactly as the server spelled it. It is built by a `pump` on the detail page's frame, not by the store's `reset`, because a mount deliberately clears `metadata::current()` for the whole 2-5 round-trip fetch: at reset time there is no runtime, no class and no title to copy. Two string compares in the ordinary case, and `dev_stand_in` is `None` at COMPILE time under `cfg(test)` so the host suite can never depend on what this Mac happens to have under /tmp. Host 430 + lint, `make` (ARM) green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
`pump` returned early only on SUCCESS, so the ordinary case — the trigger not armed, which is every real boot — re-opened `/tmp/plxnative-shared` on every frame of every detail page. It now marks the attempt whatever the outcome, and takes the "has the item landed" gate BEFORE marking, so waiting out the mount's 2-5 round trips does not spend the one chance the page gets. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
The trigger swap replaced the parser but left its doc — a JSON schema for a `/tmp/plxnative-altsources` file that no longer exists, which would have sent the next reader to write one. What survives from it is the sentence that has to: the trigger literal, spelled in a comment so the catalog grep in the root CLAUDE.md still finds this surface. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
Deliverable C of the Shared Sources design ruled the conditional in its own
list: "if the hero ever becomes independent of a shelf, it needs E's dim run
and the preference comes back." In this app the hero IS independent. It is a
rotating billboard built per fetch from Continue Watching plus every recent
hub, deduped and capped at 8, turning over on its own 8-second timer — so it
is nobody's focused tile, the shelf heading beneath it is attributing
something else entirely, and with a merged pool the front door could open on a
stranger's film with nothing on the screen saying so.
So the run comes back, on the hero's own meta line, as its last run:
Movie · 2024 · 18 · Shared by bamx23
S1 E4 · Episode title · Shared by bamx23
IT KEEPS THAT LINE'S RUNG AND TAKES ONE STEP OF INK. BODY, not the detail
page's CAPTION — a rung is a role, and the hero line is BODY because it is
read from across the room while E's is CAPTION because it sits under a page of
copy. What travels between the two screens is the ink step, secondary →
tertiary, after a middot at the separator token's own .45. The host tests
assert the rung explicitly, because "match E literally" is the plausible wrong
answer and it is invisible in a diff.
THE LINE NOW HAS A WIDTH BUDGET, WHICH IT NEVER HAD. This is copy over a
photograph, legible only inside the hero's corner wedge — which is gone by
four fifths of the frame and leaves the last fifth, the side the composition
is usually about, completely alone. HERO_META_R ends the line at three fifths,
a whole fifth of the panel short of that edge, and every run in the flow is
handed a budget running to it. So an over-long handle ELIDES where a wrapped
block would have spilled: there is no wrap in this flow to reach, only a bound
to truncate against, and the line can never become two. The facts ahead of the
run keep the hero column exactly as they always have — the handle is the last
thing on the line and a fact about where the item came from, so it is the
right thing to lose first.
OWN-ITEMS-FIRST IS AN ORDERING, NOT A FILTER. `own_items_first` promotes the
first owned page to the front and moves nothing else, so [B,B,O,O,B] becomes
[O,B,B,O,B]: the door opens on your own library and a friend's film arrives
one flip in, attributed. Filtering instead would leave a borrowed-only account
with no billboard at all and would overrule a pin the user made — which is why
a pool with nothing of ours in it is left exactly as it is. It needs no switch
of its own either: the pool is built from included sources only, so a borrowed
hero is always the consequence of a pin.
The pool's entries stop being bare catalog indices and become HeroSlot — index
plus the handle of the shelf's server. It is carried rather than looked up
because this is the one place in the app that lifts items OUT of their shelf
order, so an entry that knew only its index would have to scan its way back to
a hub to answer "whose is this", for a fact the build already had in hand.
With one source none of this exists: `HubRow::source` is "" everywhere, so the
flow returns before its first run — no pad, no dot, no draw call — and
own_items_first returns on its first line. Absence, not an empty annotation.
Two things the flow forced, both real:
* hero_content's off-screen cull was measured on the text column, and the
run is the one thing that draws outside it. Left alone, a flip would take
the whole column away while ~400px of that line was still on the panel,
and the tail of the meta line would blink out ahead of the item it
belongs to.
* meta_drawn_w clamps to the column. `TextView::truncates` answers "were
WORDS left unplaced", and a single token too wide for the column leaves
none — it is ellipsized by a separate safety pass — so the measured string
can be wider than anything drawn. Unclamped the run would start in mid-air
past the ellipsis, and an absurd one could hand the flow a negative
budget, which text::elide reads as "no bound at all".
SOURCE_PAD is now one constant for both places this screen states a source.
The heading and the hero line are one annotation in two positions, not two
spacings.
/tmp/plxnative-shared — the detail page's own trigger, reused rather than
twinned — stands in for a source where the real answer is empty. The visible
half of this work is unreachable in the product until the multi-server layer
lands, and the two things the design states about this run (that it sits
inside the wedge, and that it ends well short of the last fifth) are things
only a panel can settle. One file arms both surfaces, which is the only way to
see the hero's run and the detail page's agree. Both hero accessors go through
it, or the run would pop into existence halfway through a flip.
Host 427 (+9: 4 for the ordering, 5 for the line) + lint, `make` (ARM) green.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
…ed-servers-integration
…' into shared-servers-integration # Conflicts: # rust-modules/src/route.rs
…' into shared-servers-integration
…' into shared-servers-integration
…' into shared-servers-integration
…that looks local Sign-in kept exactly one server and threw the rest of the account away. Both of its passes filtered on `c.local && !c.relay`, and against a real share that is worse than useless: `Connection.local` means "this address is RFC1918", not "you are on that LAN", so for a friend's server it selected the OWNER's 172.20.x.x — eight seconds of timeout from here, and the worse outcome is that it SUCCEEDS, against whatever else happens to sit at that address on our own LAN. So discovery now works the way every Plex client with a connection story works. Each resource that provides a server — ours and every share alike — is turned into ranked candidates by `plex::probe` (which is what drops that address), and they are dialled in order until one answers. `/identity` is the probe, chosen because it is unauthenticated: it answers 200 to anybody, which makes it useless as a token test and perfect as a reachability one. The token is deliberately not sent, because a probe can land on a machine that is not the one we asked for, and that machine must never be handed a live credential. Which is the same reason the answer is VERIFIED: a candidate that answered is not yet a server, so its machineIdentifier must equal the resource's clientIdentifier before the connection is accepted. Anything else is discarded and the next address tried. A 401 is its own state and not "unreachable" — every other address of that server answers a token problem identically, and reporting "can't reach bx23-ldn" for one sends the user to look at their friend's router. Note what that does NOT cover, spelled out where the probe path is defined: an accessToken revoked since the resources fetch still probes as reachable, and surfaces on the first authenticated request instead. Everything that answers is registered with the server registry under its real machine id and its OWN per-(user, server) token, and persisted as a roster in the session beside the primary ServerRef, which is written exactly as before — a single-server account produces the session file it always did, plus a one-entry roster. Our own server stays current: a share is browsable, never the default. Three things fall out of the rewrite that are worth naming. The failure copy was one line, "No local Plex server found on this network.", for every outcome. That sentence was the policy talking — a server reached over the internet was a failure by construction, so the message named the LAN. It is now three, and none of them sends the user to the wrong place. A profile switch re-keys the WHOLE roster from the /resources response it already fetches, because accessToken is per (user, server): a share left on the previous profile's token answers 401 to everything. It is computed before the switch is known to have worked and applied only on success — persisting a roster re-keyed for a profile we did not switch to would delete the user's shares from disk. And `choose_local_connection`'s IPv6 guard is now structural rather than a filter that can be forgotten. Nothing but a dialable candidate — plain HTTP to four decimal octets, which is all `stream.rs` can build a sockaddr from — is ever dialled, and only a candidate that ANSWERED becomes a stored source. An address can therefore only be persisted after it has been connected to, which is the property the v6 fix was protecting: `includeIPv6=1` made plex.tv offer v6 connections, and writing one to disk broke every later boot, not just that one. `probe.rs` gains the fourth ranking axis that makes the same point about names: a numeric address outranks a HOSTNAME inside its tier. The transport has no resolver at all, and this account's share lists an internal name that does not resolve ahead of the public address that answers in 115 ms. Ranked, not dropped — a name is the only thing TLS can ever validate. The session file's structs are hardened while they are open: every one of them takes `#[serde(default)]` on the container, and the three list fields decode element by element. `#[serde(default)]` covers a field that is ABSENT, not one that is present and the wrong shape, and for this file the cost of the difference is not an empty roster — it is a Session that will not parse, which is a silent sign-out and a QR code to scan on every boot. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
…ing from 1 is the normal case
A Plex ratingKey — and a librarySectionID, a personId, a Part.key, a Stream.id — is a
server-local integer dense from 1. With one server that is a distinction without a
difference, and the app has always leaned on it: five places identify an item by a bare
rk. With a share registered it is not a distinction the app can skip, and it is not an
edge case either. It is the measured default: docs/shared-servers.md §2 records the
friend's server answering with section key 1, exactly like our own Movies, its
ratingKeys starting at 1 alongside ours.
So a key alone now names an item on neither machine, and each of the five sites turns
into a confident answer about the wrong one:
* `pms::index_of_rk` scanned `m.rk == rk` over one flat catalog and returned whichever
row came first. Its callers are the item menu's Play from Start — long-press a
friend's episode on a merged Continue Watching shelf and OUR film with that number
plays, with the friend's title still in the HUD — and `detail::mount_rk`, which
mounts the wrong backdrop, blur envelope and selection.
* `metadata::cached_playing` is the worst of them, because it is silent and it feeds
playback. It is the fast path that SKIPS the PMS fetch, so a false hit substitutes
the loaded page's whole `PlayingItem`: its audio and subtitle `Stream.id`s (which are
then PUT to the other server), its frame size (so the direct-play gate reasons about
the wrong resolution), its fps, its chapters, its markers.
* `metadata::pump_season`'s `d.rk != r.rk` ownership test. Hop from A's show page to
B's with the same rk while a `/children` is in flight and A's episodes install onto
B's page. Nothing else can see it — the hop bumps no generation that separates them.
* `plex::queue_index_of`'s rating-key FALLBACK. The primary key, `playQueueItemID`, is
minted by the queue and needs no scoping; the fallback compares a key the caller
supplied, which can come from anywhere.
* `trail::Node::Detail{rk}` and `Node::Person{key}`. The trail stores identity
precisely because indices go stale, and then stored an identity that had gone
ambiguous: browse the share, open an item, go deeper, press BACK, land on a page the
user has never seen.
The rule lives in one place, `plex::same_item((sid, key), (sid, key))`, so the five sites
cannot drift and one host test grades the rule itself. UNSET matches only UNSET — that is
the pre-registry state (and every row a host test builds by literal), not a wildcard, so
the single-server app is unchanged and a "server unknown" row never answers for a named
machine. Every miss degrades safely where it lands: a catalog miss opens the page
off-catalog, a playing-item miss costs one round trip, a season miss leaves the page it
found alone.
`PmsMovie`, `Detail`, `PlayingItem`, `QueueRow` and `person::Person` gain the server they
came from, stamped where they are parsed — and the server is PASSED IN, never looked up.
`parse_item` runs on the hub, page and person workers, `fetch_full` on the detail worker,
and the house rule (browse.rs's spawn site states it outright) is that a worker reads no
statics. It is also the only correct answer: the current server can move while a fetch is
in flight, and the rows in hand belong to the machine that was asked. So the fetches now
take a `ServerId` and dial `client_for(sid)` rather than `client()`, which is what makes a
row's stamp provable rather than incidental.
`Node::Person` prefers the plex.tv `tagKey` whenever both sides have one, because that id
is GLOBAL — one guid is one person however each machine numbers them — and falls back to
the server-scoped local pair only when a credit row carried none. Comparing a present guid
against a missing one would make every guid-less row the same person as every other.
`Trail::reset`'s doc calls a truncation the profile-switch guard, and a server switch has
the same shape. It does not get the same remedy: a source change does not revoke access to
what is behind you, and the trail's other rule is that a cycle is a HISTORY. A per-node
sid keeps that history walkable and still lands every pop on the page it names.
Two dropped-write paths in the item menu now say so. `client_for(sid)` can return None
where `client()` used to panic, and the repaint below ran either way — so a scrobble or a
deck removal that never reached a server is a log line rather than the one PMS write with
no trace at all.
Not in this change, deliberately: `route.rs` still resolves the STREAM against the current
server (`ResolveEnv::snapshot`). That is the sibling unit's seam, and its comment says so
rather than implying the play path is finished.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
… its Source chip Deliverable A of the Shared Sources design. The Library's section table described one server — a bare `key` with no server on it, a flat `SECTIONS`, and an `ensure_sections` that fetched from whatever `client()` happened to be. Measured against the real share on 2026-08-11, both servers have a section `1` and they are different libraries, so a bare key names two things. The table is now addressed by (SOURCE, section), and every fetch is issued through `client_for(sid)` CAPTURED AT THE SPAWN SITE — the rule this file already stated for its page worker and did not keep. IT GROWS BY APPEND AND NEVER BY REBUILD, and that is the soundness argument, not a detail. A page landing is blamed on a section INDEX, so a table that reshuffled under an in-flight fetch would splice one library's items into another's store. `ensure_sections`'s early-return was the only thing preventing that; appending replaces it and holds for every source, not only for the second call. Two generations now, each with one job: SECTIONS_GEN (shape — moves on an append, what the label caches key on) and EPOCH (identity — moves on `reset` alone, what index-blamed landings gate on), because one source's append must not discard another source's answer. ONLY THE CURRENT SERVER IS DISCOVERED ON THE MAIN THREAD. `ensure_sections` runs at boot and on every Library entry, so fanning out there would park the SDL loop for one connect(2) per unreachable share — seconds of frozen boot because a friend switched their server off. Every other source is discovered by a worker off `pump`: sections, then the server's own friendlyName (`GET /`, so a roster that never reached plex.tv can still head its group with a machine name), then a size=0 count probe per library. Ten-second per-source backoff. A dead share arrives as `reachable: false` and costs the main thread nothing. THE SOURCE CHIP, first in the toolbar: `Library · LDN Films bamx23 ▾`, the handle a MICRO run at 62% of the label's own ink and ABSENT ENTIRELY on your own libraries — absence, not an empty run. With one source the chip is not drawn at all and the list does not exist. Its panel is 640 wide because the rows are two-line, with two levels swapped by pills at the panel top: Browse, a picker with one tick and no words, and On Home, switches whose word is the only mark. The levels never mirror each other's marks — a mark says where you are, a word says what is set. A server is a group whose header is the MACHINE and whose accessory is the PERSON; the last pinned library dims its VALUE and states the rule on its sub-line while its label keeps live ink; an unreachable server's group dims whole at one alpha and still reads On, because nothing was unpinned. The toolbar is a TYPED chip list now, and that is a fix rather than a tidy-up: `on_ok` matched on the chip's INDEX with a `_` catch-all, so inserting Source at 0 would have made it open the Sort menu while Sort and Filter both opened Filter — silently, since every index still resolved to something. `open_chip_menu` is the one chip → action map, exhaustive so a new chip is a compile error, and the pointer path calls it directly instead of deferring to `on_ok` (which reads the FOCUSED chip, so the two agreed by side effect rather than by construction). The test asserts chip → menu by IDENTITY and the row's contents by order, and pins position nowhere. THE TAB STRIP DELIBERATELY DOES NOT CHANGE (deliverable B, "answered by subtraction"). `browse::tab_*` projects the table to one pill per TYPE — your own sections, plus any type only a friend has — so the strip is the same width at one friend or at ten, and a borrowed library's selection capsule rests on its type's pill. With one source it is the identity map, so a single-server install draws exactly the strip it always did. `/tmp/plxnative-library=N` therefore names a PILL now; the comment says so. PICKING A LIBRARY ON ANOTHER SERVER MOVES THE APP'S CURRENT SERVER, which is `docs/shared-servers.md` §5's named cheap variant and is here because without it this panel is a trap. `PmsMovie` carries no ServerId, so a borrowed card's poster is fetched from `client()` and its ratingKey resolved through `client()` — and ratingKeys are server-local, so OK on a friend's card would quietly open, and play, a different title of yours with the same number. Moving `current` makes them agree. The cost is stated rather than hidden: Home's catalog belongs to the server it came from, so it is dropped and re-armed asynchronously, and `route`'s cached machineIdentifier is forgotten so the next PlayQueue names the right machine. Threading ServerId through the stored structs retires the seam. Two things `TableView` was missing for the panel, both now in the shared component rather than drawn in the screen: `Section::accessory` was declared and NEVER PAINTED, and `Section::dim` is one alpha over header, accessory, rows and the selection pill — not `Row::dim` per row, because the state is a fact about the GROUP and a dimmed row's own "On" must stay legible as itself. Four latching bugs the review caught, all the same shape as the single-flight one this module already had: an empty count landing no longer latches the probe off; `reachable` is now written by every page fetch, in both directions, so a server that goes offline after discovery can still dim; "Check for new shares" re-asks EVERY source rather than only the ones already known to be down, and a library created since is appended; and the Source chip reads the QUEUED section's owner, so the handle does not pop in 70 ms after the name it belongs to. Host 419 -> 431 (`make check` green three times), `make` and `make RELEASE=1` both link. NOT VERIFIED ON DEVICE — the television was unavailable for the whole of this work; the PR carries the recipe. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
…it down
Home was one `?` chain over one server: `home_hubs()?` then `continue_watching()?`,
and a single failure anywhere in it committed nothing at all. That is defensible with
one server — there is nothing else to show — and it becomes a lie with two. Extended
naively over N sources, a friend's machine being asleep aborted the whole build, so on
a cold boot the user got the whole-screen "Can't reach your Plex server" read-out about
their own library, which was answering perfectly well the entire time.
So a verdict now belongs to a SOURCE, not to Home. Each one has its own single-flight
latch, its own place on the retry ladder, and its own last good projection; the merge
runs over whatever has answered so far. Every piece of that used to be process-global,
and each of the three was its own failure with a second server: one latch meant a share
that takes eight seconds to time out held the owned server's retry behind it; one
backoff meant the 30 s rung a dead share had climbed to was the rung everybody then
waited on; one `?` chain meant it blanked their shelves as well. `hub_state` folds the
per-source verdicts for the read-out, and the fold reserves the total-failure caption
for a total failure — any source answering makes Home answered.
What the merge draws, per the design canvas (deliverable C):
* Continue Watching is ONE shelf across every source, ordered by `lastViewedAt`, so a
borrowed item legitimately holds first position. It therefore carries no annotation
at all — a shelf drawn from three servers cannot be named by one of them.
* Every other shelf keeps its source: the owner's handle for a borrowed server, empty
for our own. Ours come first, then each share whole, because adjacency is the
grouping device and interleaving would destroy it.
* A source that has never answered contributes NOTHING — no heading, no empty shelf,
no spinner row. A spinner would also hold the panel presenting for something that
is not coming, which is the 39.6% → 1.67% idle saving spent on an apology. One that
HAS answered and has since failed keeps what it last had: a transient failure must
not reflow the shelves under the focus ring, and what removes a source for good is
it leaving the ROSTER, which is a fact about the grant rather than about one fetch.
Two caps had to move here from `ui::home`, because a cap the data layer has never heard
of is a cap that truncates a whole source away. Shelves and rows are now divided by
water-filling (`allot`): the smallest demand is served first and what it does not use
is re-divided, so a modest source costs nobody anything and two greedy ones split the
rest evenly. Handing the budget out first-come — which is what a single running total
does, and what this module did while there was only ever one server — means the first
source spends it: `/hubs` promotes several rows per library, so one four-library server
already overruns the sixteen shelves the grid can address. The per-shelf cap is the
other half: three sources' decks merge to 36 cards, and past 24 the focus ring and the
OK dispatch clamp differently, so the ring sits on one card while the press opens
another.
Boot stays synchronous for the owned server alone. A share that has gone away costs a
full connect timeout, and serialising those on the SDL thread would freeze the app for
as long as the friend's router stays quiet.
The open seam is named at the line that will close it: `PmsMovie` still carries no
`ServerId`, so a merged row's server is forgotten the moment it leaves `merge`, and
posters, the detail page and the scrobble paths all resolve a server-local ratingKey
against whichever server is current. That is steps 2 and 3 of `docs/shared-servers.md`,
and until they land a second source can only ever arrive through `/tmp/plxnative-servers`
— dev-only, and compiled out of a release build.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
`candidates()` sorted on (location, scheme, ipv6) and stopped. Two candidates tying on those three fell through to plex.tv's listing order — so whether the app reached a server depended on the order a remote service happened to return its connections in, which is reproducible for one account and not another. `stream.rs` takes a numeric address and speaks cleartext: it has no resolver at all. A hostname is therefore not merely slower here, it is undialable, exactly as an https origin is — and the existing `shared_server()` fixture already carried the bug. Its custom hostname is listed BEFORE the public IPv4, so the top-ranked candidate was an address the media transport cannot open, while the one connection measured as reachable from the TV sat second. The old test asserted that address was *present*, which it was. Ranked, not filtered: the curl control plane does resolve names, so a hostname-only server stays reachable once TLS lands — it just must never outrank an address the byte path can open. Found by unit 12's code review, in code from the shared-servers foundation. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
…' into shared-servers-integration # Conflicts: # rust-modules/src/auth.rs # rust-modules/src/plex/probe.rs
…' into shared-servers-integration # Conflicts: # rust-modules/src/route.rs
Deliverable D of the Shared Sources design. The base branch stopped the grid spinning on a failed page; what it left was the read-out itself, and the layer above it. THE COMPONENT. `StatusOverlay` grows a reason line and an action, so it can say three things instead of one: the verdict (what happened), the reason (why, and what is NOT broken), the action (the one thing to press). Its caption is a borrowed `&CStr` rather than a `&'static` one, because a section read-out interpolates a machine name and no `c"…"` literal can carry that; every existing caller passes a `&'static` and is unchanged. The action pill is the COMPONENT's now. Home hand-built its Retry — a `Button::pill_w` and a y measured off the panel centre — under a caption that came from the shared read-out, so one block was laid out by two pieces of code and agreed only by inspection. The Library's read-out would have been a third copy. `action_frame` is the one geometry the draw and the screen's hit test both read, and Home's pill moves 7px up onto the shared `space::LG` rung as a result. Everything hangs off ONE anchor — the caption band, exactly where it was — so a read-out carrying neither optional block is laid out as before. THE READ-OUT. The verdict names the MACHINE, the reason names the PERSON and rules out the worry that everything is down, and there is one action. Focus starts on it, because a server that did not answer often answers a second later. It is anchored in the CONTENT REGION rather than at the read-out's canonical full-screen position: the chrome above it is still live, and that is the whole difference between a section failing and the app failing. Nothing else is drawn beside it — no Sort, no Filter, no count, no A–Z rail (all four act on a grid with no items), no alert glyph (that mark is the player's) and no BACK hint (BACK is universal, and the chip and tabs above are the visible way out). `toolbar_n` and `rail_drawn` are the ONE predicate each behind a control's draw, its pointer hit test and the focus walk, so neither can be invisible-and-clickable nor drawn-and-unreachable — and when the Source chip lands, UP from the read-out reaches it with no change here. Two identifying strings, and the list is CLOSED: the machine's own name and the owner's handle. No address, no path, no URL, no machineIdentifier. That is `ui::stats`' redaction rule and it applies for its reason — a read-out is what a user PHOTOGRAPHS for a bug report, and on a borrowed source the machine is not even theirs to publish. The session name is the only source for it; the address that sits right there in the client is deliberately NOT a fallback, and "this server" is the answer when there is no name. The owner is `None` at its one seam today and the reason line is therefore ABSENT, not empty — the same shape `HubRow::source` took for the shelf heading. Nothing maps a section to the source it came from yet; when that lands, one line of `dead_strs` learns about it. AND THE LAYER ABOVE. `ensure_sections` swallowed every failure into `unwrap_or_default`, so a server that could not be reached at all was indistinguishable from a table nobody had asked for yet: no section, no state, `fetch_state()` answering `Loading` out of its `unwrap_or`, and the grid spinning for the rest of the session — the same bug the base branch fixed one layer down. `SECTIONS_FETCH` is that state and `fetch_table` is the one place "the server answered" and "the request failed" are told apart. `readout_of` is where the whole decision lives now, as one pure function over both fetch states and the store — four answers that were four `else if`s in the middle of `draw`, none of which a host could reach. Catching only the FAILED table was not enough: a server that answers with nothing we browse (a music-only account) is Ready with no sections and falls into the same two `unwrap_or` defaults, which is the eternal spinner one case over. That one is Empty, because it answered. Its read-out was then drawn at alpha 0 — the grid's `Xfade` asks "did a section answer" to decide it has content, and with no section that is false forever — so `ready` now asks `readout()`, which is the question with the right shape. `browse::failed_initial` is gone: it was exactly one arm of `readout_of`, and one rule in two places is what this file keeps being wrong about. `/tmp/plxnative-libfail` forces one read-out state (`dead` / `own` / `table` / `empty`). This screen's failure is the one state in the app that cannot be reached on purpose — it needs a server that refuses — and the honest way there is three moving parts, each of which fails looking exactly like "the app is fine". It forces the PROJECTION only; `browse` keeps whatever state it really has, and it is compiled out of a `RELEASE=1` build with every other trigger (verified: the string is absent from the release binary). Deliberately not the player's `failtest`, which already owns that name and a different vocabulary. Host 418 -> 430, `make check` green three times; `make` and `make RELEASE=1` both link. NOT VERIFIED ON DEVICE — the television was held for the whole of this work and the coordinator has taken the fleet's device pass; the PR body carries the recipe. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
…' into shared-servers-integration # Conflicts: # rust-modules/src/metadata.rs # rust-modules/src/plex/mod.rs # rust-modules/src/pms.rs # rust-modules/src/route.rs
…is public 139 sites across 12 files carried a real third party's plex.tv handle, machine name, library name, port and LAN address: test fixtures, doc comments, the shared-servers note, and the harness README. They came in through the foundation commits and then spread, because each unit copied the shape of the fixture next to it. None of it is ours to publish. github.com/GLinnik21/plx-native is PUBLIC — a fact this codebase had recorded as "private" for about a month — and the person who shared their server is not a party to this project. Replaced throughout with stand-ins, several chosen at the SAME character length because ui/home.rs asserts text widths against them: handle bamx23 -> friend machine bx23-ldn -> nas-home library LDN Films -> Film Club port (real) -> 31234 LAN address 172.20.x -> 10.9.9.x (still RFC1918, as the real one is) machine id (real 40h) -> aaaabbbb... run docs/shared-servers.md already carried a paragraph promising exactly this redaction while violating it, so that paragraph now states the convention as a table, and says plainly that it was not followed. Stating a rule is not applying it. 479 tests green; the length-matched stand-ins keep every width assertion. Not fixed here, and both need a decision rather than an edit: the same values are in the history of origin/shared-servers-base (commits 4b8a103, 9c7d676), and one orphaned pre-force-push commit remains reachable by SHA on GitHub. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
…no pill Builds on #31's projection rather than replacing it: the strip stays "your own libraries, plus a type only a friend has", and this makes that second half work. `is_show: bool` has two values, so "does an owned library have this KIND" — the test that decides whether a borrowed library gets its own pill — answers YES for a friend's MUSIC library on the strength of your films. It would fold onto your Movies pill, and everything in it would be unreachable from the strip. The other half of the same gap was one layer up: `project_sections` dropped `artist` and `photo` at discovery, so those types could never reach the projection to be missing from it. A type dropped at the door cannot be the growth case. So `SecKind` (Movie/Show/Music/Photo) replaces the boolean, discovery keeps every type this product has a level for, and the projection compares by type. A music library browses like any other section — the listing, its server-driven sorts and the A-Z rail are all type-agnostic, and this account's own /hubs already put a Recently Added Music shelf on Home, so the content was at the top level before it had a tab. What is still missing is the level BELOW the grid: an artist opens the movie detail page, which has nothing to play. That belongs to whoever builds the music level; the strip's job is to say the type exists. Two more things the multi-source table made true and one bug of my own: - The label + width cache moves off the section table's generation onto the STRIP's (`browse::tabs_gen`), bumped only when the projected pill list actually changes. The table's generation now moves once per source as libraries land, and most of those fold onto pills already drawn — so the row was re-measuring every pill, several times a boot, on Home's hot path, for a strip that had not moved. - `Nav::Library` carries a TAB and `pill = section + 1` is not true any more. Three comments still said "the first section" where they meant "the first tab" (the navosc scene, `select_pill`, the FPS manifest) and `nav.rs`'s TAB doc said the pill was a section index plus one. Wording only — #31 wired the arithmetic correctly; a doc that lies about an index space is how the next edit gets it wrong. - `tabs()` compared the old and new projection with `addr_of!(TABS).read()`, which copies the Vec BITWISE and then drops the copy — freeing the buffer the static still points at. A double free that aborts the process, found by the new invariance test rather than by review. It borrows now. The deliverable is host-provable, which matters because there is no host runtime: `the_strip_is_the_same_row_at_one_friend_and_at_three` grows the roster to eleven libraries across four sources and asserts the pill list never moves — the width follows, since every pill's width is a pure function of its label. Fixture names use the canonical stand-ins (`friend`, `nas-home`, `Film Club`), which are also character-length-preserving for the width assertions in home.rs.
…sure Two bugs of mine, both found by review with probe tests rather than by reading. **A profile switch kept the previous account's pills.** Moving the label/width cache onto the strip's own generation made `reset()` stop invalidating it: `reset` CLEARED the projection's memo, so the next derivation compared `[]` against `[]`, saw no change, and never bumped. `draw_tab_row` iterates the cache rather than the live table, so after a re-login the strip went on drawing — and hit-testing — libraries the new user cannot open, until some later landing happened to change the row. The memo is now invalidated rather than emptied, so the comparison that decides everything is made against what was actually on screen. That is also the shape of the rule: a memo nobody clears early cannot lie about what changed. **The row grew by PEOPLE for an un-owned type.** `owned || !owned_kinds.contains` admits one pill per borrowed LIBRARY of a missing type, so two friends who both share Music are two identically-titled Music pills with nothing to tell them apart — the exact property the projection exists to prevent, and the one the invariance test claimed to hold, which it could not see because its fixtures were all types we own. A missing type earns one pill now; the rest of that type are reachable through the toolbar's Source chip, exactly as a borrowed library of a type you DO own already is. Newly reachable because this branch admits `artist`/`photo` at all. Both are now regression tests, and the invariance test grew the half that would have caught the second: three friends sharing music are one Music pill. Also from the same review, smaller: - The unwatched filter is a movie/show question and only those two types answer it, so the query no longer sends `unwatched=1` to a music or photo listing — and the Filter menu no longer offers the switch there, because a control that visibly changes nothing is a worse answer than one that is not offered. The menu's row indices go through `filter_rows` rather than literals, since the switch's absence shifts Genre up. - `Nav::Library`'s own doc still said "section" where the arithmetic already meant "tab", and `docs/pms-api.md` still told the next reader to filter sections down to movie/show — the filter this branch removed on purpose.
…' into shared-servers-integration # Conflicts: # docs/shared-servers.md # rust-modules/src/app.rs # rust-modules/src/browse.rs # rust-modules/src/plex/mod.rs # rust-modules/src/plex/servers.rs
…' into shared-servers-integration
Units 7 and 8 branched before the scrub landed, so merging them reintroduced the handle, machine name and library name into dev.rs (the DevServer.handle doc), plex/models.rs and ui/library.rs's Source-panel fixtures. This is the shape to expect for every remaining merge: a scrub is a property of a TREE, and any branch cut before it carries the old values forward. Re-scan after each one — `grep -rlE` over rust-modules/src, docs and tests with the six values, which is what caught these. Stand-ins per the table at the top of docs/shared-servers.md. 497 tests green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
The owner ran the twelve-unit integration on the television and reported Home
as "a mess — if I click the friend's server in the library, the whole Home page
is replaced by their content. But it should merge." The coordinator fixed the
half that re-pointed `plex::current_server()` from a browse. This is the other
half: Home is assembled from EVERY source that feeds it, not from whichever
server happens to be current.
The owner's screenshots of the official client settle the shape, and it is the
one this unit already built: Continue Watching is ONE row whose items interleave
by `lastViewedAt`, so the friend's films sit BETWEEN the owner's rather than
after them; every other shelf keeps its own heading annotation; and a shared
server being additionally its own destination in the sidebar never replaces
Home, which stays merged.
Three architectures met in `pms.rs` and all three had to survive:
* Unit 3 stamps every row with the server it was parsed from and compares
items as `(sid, rk)`. Kept whole — and it is what lets the merged catalog
hold two different films both numbered 1 without either aliasing the other.
`project` now takes the `sid` the spawning frame captured, exactly as
`build_hubs` did.
* Unit 12's `HeroSlot` + `own_items_first` carry the hero pool's ordering.
Kept whole, with one correction the merge forces: a slot's handle is taken
from the ROW's source, not from its shelf's. The merged deck's own `source`
is empty by design, so a slot reading its shelf would attribute every
borrowed film in Continue Watching to nobody — and `own_items_first` would
conclude one of ours had already opened the door.
* This unit's per-source fetch, single-flight latch, retry ladder and verdict.
A dead share contributes nothing and backs off alone; the total-failure
read-out is reserved for the case where every source failed.
The roster is no longer this unit's own list. The registry IS the granted roster
and now carries the handle (`ServerFacts`), so `Source`/`set_sources` are gone
and with them the app.rs registration this unit had added — integration's
`install_pms` already registers and describes every injected server, and doing
it twice would have been two models of the same fact. `feeds_home` is the seam
the pin store fills, reading `browse::pinned_libraries`, and its one subtlety is
written as a test: an EMPTY pinned set means "no section has been discovered
yet", never "nothing is pinned", because `/library/sections` lands after
`pms_fetch_hubs` and `is_last_pinned` forbids emptying the set. Read the other
way, Home would have no sources at all on the frame it boots.
526 host tests green three times over, ARM links.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
Multi-source Home lands with it, and this is the one product call it left open. The pin defaulted to `handle.is_empty()` — your own libraries on, a friend's off — which is the design's FIRST-RUN state and the right default only once the first-run screen exists to ask (deliverable F, not merged). Without that screen a share is granted, discovered, browsable, and silently absent from Home with no control anywhere to turn it on. That is the owner's reported symptom: Home not merging. The reference settles it. In the official client (owner's own capture) a shared library's films sit in the main Home's Continue Watching interleaved with the account's own, nothing pinned by hand — sharing IS the opt-in, and the per-source controls remove content afterwards rather than adding it. Home there is also a DESTINATION beside the share, never replaced by it, which is the other half and landed in the previous commit. The pin stays a real, persisted, per-library decision; it is defaulted on, not removed. `pin::resolve` already prefers a recorded answer to the ownership default, so when the first-run screen lands it asks before this is ever read and neither the screen nor `feeds_home` changes. Unit 5's merge also corrected a bug the merge itself created: a hero slot took its handle from its SHELF, but the merged Continue Watching deck has no single source, so every borrowed film in it would have been attributed to nobody — and `own_items_first` would have concluded one of ours had opened the door. Per-item now. 526 tests green ×3; ARM links. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
Design-system change (owner: "I made section titles capitalized"), components/panels/TableView.prompt.md: "Section headers are SET IN CAPS at --size-caption, REGULAR weight in --text-tertiary, one size in both size classes — the caps are what make it read as a label rather than a row, so it never ties with the rows it heads." Ours drew CAPTION when `compact` and HEADLINE otherwise, mixed case. The size class was the bug the contract names: the Sources panel is a two-line picker, so it is NOT compact, so its headers drew at HEADLINE — putting the machine names on screen larger than the libraries they name, which is exactly a header tying with its own rows. `to_uppercase`, not `to_ascii_uppercase`: a header is a machine or library name and can be any script — the share this was developed against is Cyrillic. Uppercased at DRAW time, so the row model keeps the original string: the casing is presentation, and `source_sections`' host tests still assert the real names. `HDR_H` stays 58px in both classes, so no size change can reflow a panel. NOT done, and it needs a text-renderer change rather than a token: the contract also asks for `--track-caps` tracking, and `text::draw_text` has no letter-spacing parameter at all. Caps at CAPTION without tracking still reads as a label; adding tracking means a new advance path and a glyph-cache key that includes it. 526 tests green. Appearance is only observable on the television, which the owner currently has — not visually verified. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
…nt one
Found by a 13-agent comparison against the decompiled official webOS client.
This is a data-damage bug, not a cosmetic gap.
`ui/detail.rs` posted /:/scrobble and /:/unscrobble through `plex::client()` —
the CURRENT server — carrying the open item's ratingKey. It became live the
moment browsing a shared library stopped re-pointing `current` (the previous
commit, which was itself a fix): open a borrowed film from a merged Home shelf
and press Watched, and its ratingKey goes to OUR server. Both servers number
from 1, so that is not a harmless miss — the friend's film stays unwatched and
an unrelated film of ours is marked instead, and nothing surfaces it because
`refresh_view_state` then re-reads the page that did not change.
The official client resolves `findServer(item.metadataSourceUri)` and posts to
that server. `Detail` has carried its own `sid` since item identity became a
(server, key) pair; this now uses it. `client_for` also returns None where
`client()` panics, and a watch-state write is exactly the operation to skip and
log rather than send to the wrong machine.
Also: `excludeContinueWatching` is NOT a no-op. The call and its comment had
asserted that since they were written ("D-4: drop the no-op"). Measured against
this server, twice, independently of the agent that reported it:
/hubs?count=12 returns 10 hubs; &excludeContinueWatching=1 returns 8, dropping
home.continue and home.ondeck — precisely the two the dedicated
/hubs/continueWatching endpoint fetches properly. We were parsing and discarding
them once per source per fetch.
526 tests green x3; ARM links.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
…lows its item Five device-found defects from one session with the owner at the television. 1. A SHARE APPEARED ON HOME ONLY AFTER VISITING THE LIBRARY. `feeds_home` read "this server has no pinned library" as "the user turned it off". But section discovery for a source other than the current one runs on a worker off `browse::pump`, which only runs while the LIBRARY screen is up — so a booted app knows the roster and none of its shares' libraries. A server whose libraries have not been enumerated is UNDECIDED, not unpinned; you cannot have decided against a library nobody has discovered. 2. …and nothing re-merged when that changed. `pump` re-merged only on a build landing, so a late section discovery (or a pin toggled by hand, which bumped no generation at all) never reached Home. Both move `SECTIONS_GEN` now, and the merge re-runs on it — it is pure over builds each source already answered with. 3. ART RESOLVED AGAINST THE CURRENT SERVER, not the item's. A thumb path embeds a server-local ratingKey, so a friend's library drew grey skeletons for most tiles and OUR films for the keys that collide — both servers number from 1, so collisions are the normal case. Only invisible while browsing a share also re-pointed `current`; removing that (correctly) exposed it. Threaded through every art path: `Art::Poster` via the row's `sid`, `Art::Thumb`/`Art::Person` which carried no server at all, both heroes, the clearLogo (`HeroLogo` gained a `sid`; the logo API already took one and both call sites passed `current_server()`), Related, cast headshots, episode stills, chapters, Up Next and the info panel. 4. TWO THINGS WORE FOCUS AT ONCE in the Sources panel: the level pills took the accent capsule while the table went on painting its selected row, which a table always did. `TableView::list_focused` is the "nothing selected" mode it lacked — the row is remembered, simply not drawn as focused while the pills have it. (First attempt made the pills unfocusable instead, which the owner corrected: they want the rows deselected, not the tabs unreachable.) 5. Per-source landing now logs on SUCCESS, not only on failure. "hubs: source 1 fetching" with nothing after it said only that a worker had started, which is what made 1 and 2 hard to see. Device-verified: source 0 → 4 shelves, source 1 → 1 shelf and 2 in CW, commit goes 40 items/5 shelves → 54/6. Home's Continue Watching interleaves both servers exactly as the official client's does, borrowed artwork included. 526 tests green. NB one SIGABRT at process exit on a single `make check` run, not reproduced in four since — flagged, not fixed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
All owner-found at the television, in one sitting. **Unpinning a library did nothing.** `/hubs` is a whole-SERVER request that answers with rows from every library on it, so the finest gate we had was "does this server feed Home at all" — turning off one library of a two-library server changed nothing on screen. Every row carries `librarySectionID`; that is the join. `item_pinned` gates the merged deck AND every other shelf, before the row budget is spent, so an emptied shelf contributes no heading rather than an empty one. Unknown passes both ways (no id sent; library not yet enumerated), because hiding what cannot be classified empties Home on the frame it boots. Measured while sizing it: `/hubs?contentDirectoryID=N` does NOT scope (still returns every library's hubs) — `/hubs/promoted?contentDirectoryID=…& pinnedContentDirectoryID=…` is the endpoint that does, returning per-library `movie.recentlyadded.<id>`. Switching to it is the better fix and is now a sized, evidenced follow-up rather than a guess. **"Also available" replaced the whole tab strip.** It still did the `set_current` + `activate_server` re-point I had removed from browsing, so one press wiped the section table and re-discovered only the newly-current server: `altsources: source switched to slot 1` then `nsections=1`, and the top row became Home | <the friend's one library>. Opening the other copy is a NAVIGATION — `to_detail` carries the pair and every surface resolves its own server from the item. The trail survives too, since its nodes carry a ServerId. **Black row text.** Suppressing the selection pill when focus moves to the level tabs left the row's ink flipped to near-black, which is only legible ON that pill. Ink and pill now read from one flag. **No tick in "Also available".** The tick was matched against `plex::current_server()`, which stopped being the page's server the moment browsing stopped re-pointing. It asks the page. **No quality badge.** The badge was computed but always None: `/library/all?guid=` returns no `Media[]` at all. Measured — `&type=1` is what makes it return `4k 3840x2160`. The type comes off the guid (`plex://movie/…`); an unrecognised kind sends none rather than guessing, since a wrong type answers size 0 and would read as "that server does not have it". **The level tabs did not animate** — the one tab row in the app that didn't. They were standalone `segment` pills painting their own fills; they use the shared `TabStrip` now, stepped in the update pass, so both capsules travel. **Tab-to-list seam.** 16 + the list's own 20 = 36px, which is not a rung. The band subtracts `TableView::TOP_PAD` so the seam is exactly `space::MD`, and stays right if either constant moves. 528 tests green; ARM links. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
Reuse / simplification / efficiency / altitude, run over the whole 50-commit range. Applied the findings the four agents converged on; the deeper structural ones are listed at the end, not done. **Hot path — the poster key memo allocated on every HIT.** `HashMap::entry` takes its key by value, so a flat `(u16, String, w, h, png)` key ran `path.to_owned()` whether or not the entry existed, on top of the `cstr` that had already built that string. `poster_key` runs once per visible tile per frame plus the hero art and logo, so at ~25-40 tiles x 60fps that was ~1,500-2,400 needless heap allocations a second on the A53 — putting back a sixth of the waste the memo was written to remove. Nesting the map (dims -> path -> entry) keeps the hit path allocation-free and pays for the owned key only on a miss. **`roster_key` allocated two Vecs per frame** to detect a change a u32 compare five lines away already saw: the pinned set is a projection of the section table, and `toggle_pin`/`append_sections`/`reset` all bump `SECTIONS_GEN`. Now two atomic loads, no allocation, on a path `pump` runs every loop iteration — including on a settled Home, which is the screen `ui::idle` was tuned down to ~1% of a core on. **The hero's source measure ran with no source to draw.** Rust evaluates the argument before the call can decide there is nothing to show, so a single-server install — documented as paying nothing for this feature — paid a `CString` + an uncached `TTF_SizeUTF8` over the whole meta line per hero frame, twice per frame through a slide. **Three roster projections became one.** `servers_with_known_sections` and `pinned_servers` were the same index->slot fold as `library_pins_by_server` with a different `browse` call feeding each, and each pulled its own `pub(crate)` out of `browse` — so a change to how a source index maps to a registry slot had to land in three places. Both are columns of the one table; `browse`'s `discovered_sources` and `pinned_libraries` went with them. **`alt_sources` asked "which copy am I on" two ways, and they disagreed.** `live_rows` read the loaded Detail; `on_ok` passed `plex::current_server()`. So the row that wore the tick and the row a press treated as "already here" could be different rows — and after browsing stopped re-pointing `current`, the second was a different MACHINE, not a synonym. One `here_sid()` via `detail::mounted_sid`, which is the app-wide answer. Both hand-rolled `(sid, rk)` comparisons in that file now go through `plex::same_item`, whose own doc claimed every stored-item lookup already did. **`shared_by` was written twice with two different empty-handle behaviours** and interpolated a third time inline. One guarded formatter in `ui::fmt`, returning `Option` — absence is what the design specifies for an owned item, and both call sites were hand-rolling that guard. **Dead code the branch's reversals left behind:** `route::forget_server_identity` (retired by scoping MACHINE_ID behind MACHINE_SID), `browse::section_src`, `browse::retry`, `pms::request_retry_source`, the unused `_sid` parameter on `request_alt_sources`, and the bare `resolve_tex_wh`/`warm_tex` — zero callers each, and the last two were the shorter names autocomplete offers for the case where getting it wrong is a blank billboard. I deleted `browse::loading_initial` too and put it back: rustc's dead-code warning does not count test callers, and three tests assert exactly the state/`total < 0` distinction it exists to make. Marked, so the next reader does not repeat that. **Skipped, deliberately.** The altitude review's central finding is that `(ServerId, key)` is a calling convention rather than a type — 35 signatures take the two as adjacent positional params, so a transposition compiles and returns a confidently wrong row. An `ItemRef` newtype is the fix and it is mechanical, but it is a few hundred lines across a dozen files: a refactor, not a cleanup. Same for making the ambient accessors demand `task::MainThread` (the `!Send` token this repo already ships) so a worker reading the current server is a compile error rather than eight paragraphs of doc. Also skipped: fanning out the serial guid resolve and roster probe (behaviour), wiring `Client::set_link` (adds behaviour to a currently-dead path), and deleting `ServerFacts::owned` — it has no readers, but the right move is to USE it, since two of its three writers currently fabricate it from the empty-handle test its own doc forbids. 528 tests green x3; ARM links. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
…vision The television is a mutex. One set, one app instance, and two `tests/run.py` jobs kill each other's app — so every UI change waits for every other one, and an agent with no TV can verify nothing. `make sim` builds the same app core with `--features hostsim`, linked against desktop SDL2 and desktop GL 4.1 core. It draws the real interface against a real PMS, boots to a screen with the same `plxnative-*` triggers, is driven by the same remote-FIFO tokens, and screenshots itself. Several run side by side, each pointed at its own instance root; unset `PLXNATIVE_RUNTIME_DIR` and everything resolves to `/tmp` exactly as before. The `ui-sim` skill is the loop. The whole TV seam is 29 symbols — 13 `sf_*`, 7 `acb_*`, 5 `vp_*`, wayland, glib, the LG cursor call — and `player/ffi.rs` already had the right shape for it, so the host arm is a `#[path]` swap of one private `sys` module. Nothing in `engine`/`pump`/`threads` branches. The stand-in reports the seam's own "no video path" failure rather than faking success, so Play lands on the app's real failure read-out: a state a television can genuinely be in (issue #22). Three bugs this found in code that ships to the device: - `text.rs` uploaded glyph surfaces assuming `w * 4` stride while SDL is free to pad rows. `surface_ink_v` two lines above had always read `pitch`; only the upload assumed they were equal. Repack rather than `GL_UNPACK_ROW_LENGTH`, which does not exist in GLES2 and would have fixed the host while silently doing nothing on the TV. - The runtime namespace was three `/tmp` literals (`dev`, `remote`, `log`), so N instances shared one trigger set, one FIFO and one log. - `env` overrides were gated on `devtriggers`, on in every dev TV build. Since `src/main.c` opens the event and crash logs by absolute literal before any Rust runs, a TV launched with `PLXNATIVE_RUNTIME_DIR` set would have written the two halves of one log to two places. `ENV_STEERABLE` makes that impossible at compile time. Guardrails, because the failure mode is an agent reporting a Mac number as a device result: every simulator heartbeat carries `sim=1`, the event log's first line says what wrote it, and `tests/run.py` now refuses to grade a log carrying the tag. `--fps`, text rasterization, video and the video plane stay device-only. Also fixed while here: `encode_key`/`decode_key` had no coupling and had already shipped disagreeing (every FIFO token silently swallowed) — now one pure encoder plus a round-trip test that passes in both layouts; each simulator gets its own session file instead of sharing `pkg/auth.json`, which held live tokens in the payload directory of a public repo; and `gl_is_es()` is one source of truth so the shader preamble and the core-profile VAO cannot disagree. Verified: `make check` 390 green, TV cross-build unchanged, sim rendered and driven end to end (boot -> keys -> detail page -> screenshot). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G
The pitch was `min(34, band / n)`, so how far apart the letters sat was a function of how many a section happens to have. Nine Latin letters drew at 34px; a mixed Cyrillic+Latin library's thirty collapsed to 27.5 against a CAPTION cap height of ~17 — under half a letter of air, which reads as a column of type rather than an index you can aim at. The pitch is a constant 34 now and the rail scrolls past what fits (24 slots), driven by rail focus while the rail has it and by the grid's current letter otherwise, so scrolling the grid carries the rail with it. One letter of clearance is kept at each end and the ends with more beyond them fade over one letter, so it reads as scrollable rather than cut. A section that fits is byte-identical to before: no scroll, same origin, same spacing. Two latent bugs fell out of the same read: - MAX_LETTERS was 34. `#` + Latin is 27 and Cyrillic adds 32 more, so a mixed library can want 59. At 35 the rail would have stopped mid-alphabet with every title past it unreachable by jump, and nothing on screen saying so. Now 64. - The hit rects were a fixed 38px against a 27.5px pitch, so they overlapped and `rail_at`'s first match won — the top of every letter clicked the one above it. The target is the slot now, and a scrolled-away letter keeps an empty rect so a click can only land on a letter you can actually see. `rail_geom` and `rail_scroll_target` are pure, so the window invariant is host- tested at every letter from three starting scrolls. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
The design system's TableView cell is four places in screen-x order — leading mark, label over its sub-line, trailing read-out, right-aligned badge. Ours drew the badge inline from the label's DRAWN right edge, so the chip landed at a different x on every row: a column of 1080p/4K, or the subtitle picker's FORCED/SDH, read as ragged text instead of a column you compare down. On a two-line row it was also centred on the title's cap band rather than the row box. Right-aligned and row-centred now, which forces a second fix that was harmless only while the chips sat on the title's line: the sub-line has to elide to the same right edge as the label, not to the bare row width. Two more places where the row diverged from the contract: - The badge ring is `theme::OVERLAY_BORDER`. That token's own doc has said "outlined-badge / meta-badge border" for as long as it has had zero consumers, while every chip off a focus pill outlined at full TEXT_PRIMARY. - The header accessory drops to MICRO; at CAPTION it tied with the header it qualifies. "Also available" then fills all four places — ✓ | Movies / This account | 1 hr 57 min | 1080p. The runtime was a dotted second half of the sub-line, which left the read-out empty and buried the one fact that lines up down the panel. Also removes a stray `mut` on a test closure left behind by the last simplify pass. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
… in parallel
Everything a Search unit needs to exist against, and nothing a unit should own.
The screen is reachable, wears the shared strip, and draws nothing yet.
The route. `Route::Search` is a PEER of Home and the Library, not a stacking
page: it is reached from the strip and BACK from it returns to Home, so it needs
no trail node — what it opens stacks, it does not. Two of its match sites are
exhaustive and would have failed the build; thirteen are `_` catch-alls that
would not, and three of those are why this landed as one commit rather than
per-unit: the draw dispatch ends `} else { home_draw() }`, so a missing arm
silently draws Home; the BACK arm ends `running = false`, so a missing arm quits
the app; and the heartbeat's route name ends `_ => "home"`, so every harness
scene grading `route=search` would have read Home and passed.
The pill goes LAST, and that is the whole reason it cost nothing. Prepending it
would have shifted every `pill - 1 -> section` conversion to `+2` at eight
sites; appending leaves `Home = 0, sections = 1..=n` exactly as written, and the
only new rule is `is_search_pill` — one test, in one place. It is the one pill
that is a mark instead of a word, inked through the same `TabPill::mixed_ink`
the labels use so it travels under the focus capsule with them instead of being
a separate colour story. Two host tests that encoded the pill count moved with
it; they were right, the row is genuinely one longer.
`Hub.directory`, because the DTO would have silently rendered three of the five
shelves as nothing. `/hubs/search` was probed live over six queries rather than
modelled from `plex-openapi.json`, whose own worked example disagrees with this
server: movies, shows and episodes arrive as `Metadata[]`, but **actors,
directors and collections arrive as `Directory[]`** — so Cast & Crew and
Collections both need it. Those entries are the SAME record the detail page's
cast row already parses, so `plex::Tag` grew the three fields only search sets
rather than gaining a near-identical twin; a search hit can now be handed
straight to the person page, and `Tag::is_person` matches one against a credit.
Two more measured facts are written down where they decide something: a
one-character query returns every hub empty (so `MIN_QUERY` is 2, and the first
keystroke of a search costs no round trip), and hub ORDER moves per query (so
the shelf order is fixed and ranking is honoured only inside a shelf —
reordering rows per keystroke would move the row under the user's focus while
they are still typing).
`/tmp/plxnative-search[=<query>]` seeds the field at boot. It is not a
convenience: `sim-shot` and the TV harness both run with no keyboard, so without
it every headless look at this screen is the empty state.
Verified: `make check` 535 green, sim boots and the pill draws (screenshot).
FFmpeg/ARM build unaffected — nothing here touches the seam.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
`ui/search/empty.rs` draws the screen when there are no shelves to draw. Four readings, decided from `search::state()` and never from emptiness alone — a `Ready` store with nothing in it and a `Failed` one with nothing in it are the same store and opposite meanings, which is the distinction `browse.rs` had to learn the hard way. - Idle, empty field: "You haven't searched yet". It exists because a screen with no words on it reads as a screen that failed to draw. - Idle, field holding something: "Keep typing — 2 letters or more". `set_query` maps anything under `MIN_QUERY` to Idle and clears the shelves, so backspacing a finished search down to one letter lands in the same state with the letters still on screen — the one place this file could state something the screen itself disproves. - Ready with nothing: `No results for "wallace"`, typographic quotes. The QUERY is elided, not the line, so the closing quote is never what gets cut. - Searching: nothing at all. A spinner belongs to whoever owns the fetch, and a second unowned clock on one screen is worse than a quiet beat. Both statements are a HEADLINE-bold line over a CAPTION/tertiary hint, cap-top anchored at `CONTENT_TOP` on the app's own side margin, so the copy sits where a first shelf's heading would. No alert mark, no danger tint, no Retry: nothing found is an answer the server gave, and dressing it as an error tells the user something untrue about their library. The hint names the scope, and gets two rungs the design did not specify. "Across both sources" is false at three and the registry holds sixteen slots, so >2 says "across all sources"; and a boot that never reached plex.tv can dial a server while knowing no name for it, where the honest answer is the sentence with no scope clause rather than an invented name. Deliberately NOT a `StatusOverlay`, though `StatusKind::Empty` is the right reading: that component is the app's CENTRED read-out, and bending it to a left-aligned HEADLINE-bold pair would mean adding an alignment axis, an anchor mode and two size overrides to the one thing whose job is holding the centre. The division earns its keep — a statement is page copy where the content would have been, a fault is the centred read-out, so the design's own point is made in geometry and not only in tint. `State::Failed` is drawn here only because the routing above sends it here: `mod.rs` hands this file every query whose shelf list is empty, and a failed request has an empty shelf list, so an early return would blank the panel under a field holding a query. It gets `StatusOverlay`/`Failed` and none of this screen's anatomy, with no action pill — a control has to be focusable to be a control, and no `Zone` can hold one yet. That arm is the thing to delete when the fault gets a real owner. Host tests cover the state table, the quoting, and the scope rungs including the nameless and >2 cases. Verified on the macOS simulator, not the television: all four states photographed at 1920x1080.
There was a problem hiding this comment.
Pull request overview
This PR introduces the Search screen’s “no shelves” copy states (as statements rather than errors) and, in the current diff, also includes a large set of additional changes spanning multi-server scoping fixes, a desktop UI simulator, and test-harness/documentation updates. As opened, the PR’s described scope (single commit / single file) does not match the actual diff, which makes the review surface significantly larger than stated.
Changes:
- Add Search UI scaffolding and copy for idle/sub-minimum/no-results/failed states (
ui/search/*,search.rsstubs). - Add/propagate server scoping (
ServerId) through multiple UI + Plex surfaces (art resolution, person page, item menu actions, timeline/playqueue identity). - Add a macOS/desktop UI simulator flow (
hostsimfeature,plxnative-sim, screenshots, runtime-dir isolation) and update test harness/docs accordingly.
Reviewed changes
Copilot reviewed 72 out of 76 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/run.py | Adds shared-server handle to injected server JSON; rejects simulator logs for fps/loop grading. |
| tests/README.md | Updates shared-server configuration examples and explanatory text. |
| tests/manifest.json | Clarifies nav-osc perf scene description (“tab” vs “section”). |
| rust-modules/src/ui/up_next.rs | Scopes still-card art resolution to the playing item’s server. |
| rust-modules/src/ui/search/results.rs | Adds stub module for typed result shelves + tile sizing. |
| rust-modules/src/ui/search/recents.rs | Adds stub module for recent-search rows and persistence notes. |
| rust-modules/src/ui/search/mod.rs | Adds Search screen state machine + layout constants and routing. |
| rust-modules/src/ui/search/field.rs | Adds stub module for query field design/behavior notes. |
| rust-modules/src/ui/profiles.rs | Scopes profile avatar thumbs to the current server. |
| rust-modules/src/ui/person.rs | Threads ServerId through person-page open/reopen and art resolution; adjusts tests. |
| rust-modules/src/ui/nav.rs | Documents tab-pill indexing now that tabs are projected from section table. |
| rust-modules/src/ui/mod.rs | Registers new UI modules (alt_sources, search). |
| rust-modules/src/ui/item_menu.rs | Captures server id at menu open; adds item_sid() and updates episode-menu entrypoint. |
| rust-modules/src/ui/info_panel.rs | Uses resolve_tex_on for item-scoped art; updates outlined badge style fields. |
| rust-modules/src/ui/icons.rs | Adds Search icon wiring and documentation; includes new SVG asset. |
| rust-modules/src/ui/hero_logo.rs | Threads ServerId so clearLogo requests go to the correct server. |
| rust-modules/src/ui/fmt.rs | Adds shared “Shared by ” formatter to unify attribution copy. |
| rust-modules/src/ui/consts.rs | Introduces WCODE_BACK constant; uses it in is_back. |
| rust-modules/src/ui/chapters_panel.rs | Scopes chapter-thumb card draws to the correct server. |
| rust-modules/src/ui/anim.rs | Writes anim log into runtime dir (instance-root aware), not hardcoded /tmp. |
| rust-modules/src/textinput.rs | Adds stub module for TV on-screen keyboard integration seam. |
| rust-modules/src/text.rs | Fixes SDL surface upload to honor pitch by repacking when needed (sim correctness). |
| rust-modules/src/system.rs | Gates wayland/glib symbols and unsafe wayland grab for hostsim; avoids host misalignment abort. |
| rust-modules/src/shot.rs | Adds simulator screenshot capture (glReadPixels → PNG) with on-demand token + auto frame capture. |
| rust-modules/src/search.rs | Adds search store types/state machine stubs and shelf typing/merge notes. |
| rust-modules/src/remote.rs | Routes remote FIFO path via runtime dir (instance-root safe); preserves exact bytes. |
| rust-modules/src/plex/transcoder.rs | Adds relay-aware link policy (deny direct play/remux on relay); adds tests. |
| rust-modules/src/plex/timeline.rs | Scopes playqueue rows by server id; avoids cross-server rk collisions in fallback match. |
| rust-modules/src/plex/probe.rs | Adds resolvability ranking (numeric IP before hostname); updates fixtures/docs. |
| rust-modules/src/plex/params.rs | Documents why capped links are addressed via flavor/policy, not a bitrate field. |
| rust-modules/src/plex/models.rs | Extends models for friendly server name + hubs Directory[] payload; adds guid/library fields. |
| rust-modules/src/plex/mod.rs | Re-exports new registry helpers and link_policy; exposes test-only registry helpers. |
| rust-modules/src/plex/library.rs | Adds server friendly-name fetch and find_by_guid helper + guid→type mapping. |
| rust-modules/src/plex/hubs.rs | Ensures excludeContinueWatching=1 is sent; documents why. |
| rust-modules/src/plex/client.rs | Adds atomic link tier storage, fetch_built, and related tests. |
| rust-modules/src/plex/CLAUDE.md | Updates plex-layer documentation for registry + shared-server semantics. |
| rust-modules/src/plex/account.rs | Updates docs/tests for shared-server handle naming examples. |
| rust-modules/src/player/threads.rs | Captures server id for timeline reporter thread; avoids reporting to “current server”. |
| rust-modules/src/player/ffi.rs | Switches Starfish seam module to hostsim stand-in via cfg. |
| rust-modules/src/player/ffi_host.rs | Adds hostsim Starfish/ACB seam that fails honestly (no video path). |
| rust-modules/src/player/engine.rs | Captures (sid, rk) for timeline thread at spawn time. |
| rust-modules/src/person.rs | Adds sid to Person identity; routes worker fetches through client_for(sid); updates split logic/tests. |
| rust-modules/src/paths.rs | Adds runtime-dir indirection + env steering for hostsim; adds session-candidate handling and tests. |
| rust-modules/src/lib.rs | Routes event logging through runtime dir; exposes sim helpers + re-exports for sim binary. |
| rust-modules/src/gfx.rs | Adds GLSL preamble selection for desktop core profile; adds core-profile VAO binding for hostsim. |
| rust-modules/src/dev.rs | Resolves triggers via runtime dir; adds handle field to injected server shape; updates tests. |
| rust-modules/src/bin/sim.rs | Adds plxnative-sim desktop simulator binary (runtime dir setup, log banner, argv/env config). |
| rust-modules/Cargo.toml | Adds rlib output + hostsim feature and simulator bin target. |
| rust-modules/build.rs | Adds hostsim-only link config (SDL2/ttf, OpenGL/GL) and builds src/svg.c for sim. |
| Makefile | Updates FFmpeg/curl/ACB commentary; adds make sim* targets and simulator env wiring. |
| docs/pms-api.md | Updates section-key guidance; clarifies why non-movie/show section types must be retained. |
| CLAUDE.md | Updates repo-level docs with simulator tier and plex-layer doc link. |
| assets/icons/search.svg | Adds Search icon asset. |
| .gitignore | Ignores sim build output and pkg/auth.json (host runs can write tokens there). |
| .claude/skills/ui-sim/SKILL.md | Documents simulator workflow and limitations (new skill). |
| .claude/skills/tv-session/SKILL.md | Adds cross-reference encouraging simulator-first for UI work. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| servers: #0 name="nas-home" 10.0.0.9:32400 mid=a348a464.. creds=ok | ||
| servers: 1 extra server(s) injected, 1 usable |
| //! search — the Search screen (`Search Screen.dc.html`). | ||
| //! | ||
| //! The last pill in the shared top strip, and the only one that is a mark instead of a word. Text | ||
| //! entry is the TELEVISION's own keyboard ([`crate::textinput`]), so this screen owns no keyboard | ||
| //! layout at all: it owns the field, the live result set behind the raised panel, and the handoff |
|
Superseded by #47, which is the integration branch this unit was built for and which now carries the whole feature. Closed rather than merged because #47 already contains this work — verified before closing, not assumed: every commit on this branch is either an ancestor of #47 or reached it through the The review record lives here; the code ships there. |
…had gone false (#55) * docs: the UX scenario LG's checklist defers to, and four claims that had gone false LG's App Self Checklist does not describe four of its own items — #2, #10, #42 and #45 defer to the UX scenario document, and #45 says so in as many words ("refer to UX scenario for movement details"). That makes the scenario the artefact QA grades the transport against, so `docs/ux-scenario.md` is written as a compliance document rather than a tour: every screen, how it is reached, every control on it, what each remote key does on each screen, the BACK trail, and the exit alert. Two of its sections carry the weight. **§6 — playback control.** There is no on-screen `<< || >>` transport row and there will not be one; transport is remote-driven and the HUD shows STATE, a mark beside the elapsed clock and nothing at all while playing steadily. That is stated as settled rather than apologised for, with the grounds: on-screen controls are Recommended rather than mandatory, the idiom already ships approved on these sets, and the half that must really work — the FF/REW/play/pause/stop keys — is bound and was settled 2026-08-22 against LG's own evdev table and 336 captured key lines. The section documents the transport as it IS: three focus bands, the 4.5 s linger, the 10 s preview-then-commit seek with its 450 ms tap accumulation, the six state marks and their precedence, and the control row's three mutually exclusive occupants (discs / Skip pill / Up Next). **§7 — sound.** There is no UI audio at all, and the item is therefore N/A on its own precondition. Checked five ways rather than asserted: SDL is initialised `SDL_INIT_VIDEO` alone, no SDL audio call exists, SDL_mixer is neither present nor linked, there are no audio assets, and no webOS sound service is called. Eleven figures, taken from the simulator at the authored 1920x1080 with the dev counter compiled out. The player HUD is the existing device capture, because the Starfish/ACB seam does not exist off-device — §9 lists the figures that still need a television and why the who's-watching picker is deliberately not among them (its roster is real people's names). One figure is edited and says so: the Search scope line named a real server, and is replaced by the app's own string for a server that reports no name. And four corrections, each verified against the tree first: - `docs/distribution.md` §2 no longer says native Store eligibility is unsettled. It rested on LG's `appinfo.json` reference ("Only `web` is allowed currently") — a `develop/*` WEB-RUNTIME page, which is not authority over a native SDL app. Seller Lounge parses this project's ipk as File Type: Native and asks for the native SDK version, chipset and resolution. What is open is the QA outcome, not the permission. The summary table's "No." row went with it. - `docs/pms-api.md` — the `X-Plex-*` list was the minimum PMS needs to attribute a session, read for years as the identity set. Recorded the full set the official webOS client sends, including `X-Plex-Platform-Version` (Plex gates on FIRMWARE, which `X-Plex-Platform` cannot express) and `X-Plex-Features`, whose exact effect this repo has not measured and which is graded as such. - `docs/shared-servers.md` — it called the `plex.direct` middle label "the certificate UUID, not the machineIdentifier" while `plex-openapi.json` calls the same label "The unique identifier of this particular PMS". Both are 32 hex characters, so no sample settles it. Recorded as a disagreement rather than resolved, with the rule that survives either answer: use the advertised `uri` verbatim, never construct the hostname. - `docs/search.md` — deleted the status blockquote. Its own staleness test had fired: it claimed `ui/search/`'s `draw` bodies are `{}` (mod.rs is ~2200 lines with `draw()` at :832), that `search::pump` lands nothing, and that `Client::search` has zero callers (`search.rs:797` calls it). `rust-modules/src/img.rs` is the only code touched, and only its comments: three said `requiredMemory: 60` against `pkg/appinfo.json`'s 160. make check: 976 passed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: two rendering/consistency fixes in the UX scenario `<Name>` in the PIN-pad description was raw in prose, so a markdown renderer swallows it as an HTML tag and the sentence reads "Enter 's PIN". Moved inside backticks. And the provenance note said "two figures are edited" in the same breath as naming one. There is one: the Search scope line. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: state Home's play-on-OK rule exactly, not approximately The scenario said "OK on a Continue Watching card resumes, OK anywhere else opens the detail page". Right about the deck, incomplete about the rest: `home_activate` plays on `hub_is_continue(row) || mm.kind == 3`, so an EPISODE card plays from any shelf. And a show/season card does not simply open its page — it opens it, waits for the load to land on the expected item, and only then fires Play, precisely so a failed fetch cannot play whatever page was open before. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: six claims the auditor refuted, five of them in the document written to be graded `doc-claim-auditor` over the new UX scenario and the four corrections. Six findings in files this unit owns; all six were confirmed against the code before being fixed. **The chevron is not a control.** The hero action-row table listed `›` under "what OK does". `home.rs:44-50` says the opposite in as many words — `HERO_NBTN` is 2, "the pager chevron beside them is an INDICATOR, not a third button: it is drawn, it is never focused and it has no hit rect". The hero pages by RIGHT past the info disc or LEFT off the pill (`home_hero_key`), plus an 8 s auto-flip. This is the row a QA reader would have tried first and failed, in the one document written for QA to read. **"No control anywhere can take focus and do nothing" had two counterexamples.** OK on Home's own tab pill standing on Home is a documented no-op (`app.rs:2126`), and the person page's header band holds focus but only acts when there is a biography long enough to expand (`person.rs:626`). Narrowed to what is true and still answers #10, with both stops named. **The synthesized tail can never raise a Skip pill.** The document said it "stands in" where the server has no credits detection, and two lines later that Skip Credits "remains for the last episode of a show". `synthesized_tail_marker` returns None unless `has_next` (`metadata.rs:674`) and every Credits marker with a successor resolves to Up Next (`player_hud.rs:401`), so the tail raises Up Next 100% of the time. Stated with its gate, plus the bench consequence: on a Pass-less server Skip Credits is unreachable. **The show/season sentence contradicted the one above it** — my own previous commit's doing. The open-resolve-then-Play arm is INSIDE `want_play` (`app.rs:2152`), so it is the deck rule, not the general one; elsewhere a show card is a bare `nav_open`. Folded into the deck paragraph. **`docs/pms-api.md` said "the five in bold" over six bolded rows**, and let the table be read as what this app sends. Dropped the count and split the two facts: `playback_identity` emits nine fields (`client.rs:152-162`) and none of the four capability/locale ones exist anywhere in the tree. The table is the target; the paragraph is the state. **And two smaller ones**: `assets/` was said to hold 24 SVG icons against a measured 28 — the number is decoration inside a five-way negative proof and is the only thing in that bullet that can rot, so it is gone; and the detail page's watched disc wears the face of the write it would perform (`detail.rs:1087`), so it is a ✓ on an unwatched item and a − on a watched one, not a fixed ✓. Two further findings are in files this unit does not own and are listed in the PR: CLAUDE.md:985 and docs/lg-self-checklist.md:17, both dangling references this branch created. make check: 976 passed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…lback Groundwork for glitch-free seeking (flush + setTimeToDecode + sendSegmentEvent, no reload/decoder re-init) per the verified decompile spec. Reaching the pipeline works: StarfishMediaAPIs::player (shared_ptr _M_ptr @ g_smp+0x4c) → AbstractPlayer ::pipeline (@ player+0x4) = CustomPipeline*, and sendSegmentEvent() fires on it (verified on-device: pipeline ptr non-NULL, sendSegment=1). BUT setTimeToDecode returns 0 on this webOS 4.5 (unsupported pre-webOS-11), so the pipeline holds at the seek point. The proper fix is the documented webOS<11 fallback (CustomPipeline::loadSpi_getInfo + setContentInfo with ptsToDecode) — deferred to task #42. Until then the in-place path is gated OFF (INPLACE_SEEK_OK=false) and seeks use the robust reload-per-seek (verified: seeks play straight through). - stub/starfish.c/.h: sf_set_time_to_decode, sf_send_segment (+ sf_pipeline peek at the verified offsets), mangled stubs for setTimeToDecode + CustomPipeline::sendSegmentEvent (real body from libpf-1.0.so.1, in scope via libplayerAPIs DT_NEEDED). - engine.rs: Engine.flushed latch; feed_stream fires the Kodi calls on the first post-flush keyframe (real PTS, no rebase) when flushed. - pump.rs: direct-play seek does in-place (flush + reopen + av_seek) when enabled, else reload_at. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_018QbpQTKYjwp6fDNLdXzGzr
Plan produced by the plan-kodi-parity-42 workflow (real xbmc + mariotaku/ss4s source diffed against our pipeline) and refined by on-device probes of the webOS 4.5 firmware libs. 8 of 9 steps stand; step 8 (setHdrInfo) dropped — the symbol is absent from every device lib. libpf-1.0.so was confirmed to parse esInfo dims/fps + ac3PlusInfo/aacInfo, so steps 6/7 have real upside. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Kcauj6zm932EtcdTTtW998
Split the single interleaved AuQueue into independent video (aq_video, ~8MB) and audio (aq_audio, ~1MB) lanes, each with its own byte cap, pending AU, and fed-pts high-water. The ff demuxer routes es=1 -> aq_video, es=2 -> aq_audio; feed_stream drives the video lane (owns the seek rebase / in-place-seek handshake / prime->Play), a new feed_audio_lane drives the audio lane. A BufferFull or over-budget now breaks only its own lane, so a full video lane can no longer stall the audio lane that drives the audioSync master clock — the coupling the old single-FIFO + single-break imposed. Mirrors Kodi's m_messageQueueVideo/Audio. The legacy mkv path stays single-queue (feeds its mixed es into aq_video, leaves aq_audio empty). Verified on-device (LG 49SM9000, webOS 4.5): on 4K HEVC HDR10 the video lane sits pinned at its cap while the audio lane keeps feeding and the timeline climbs — no Playing error, no type=18. Full 16-case regression suite green as Guest, before and after the cleanups below. Folds in the /simplify review (4 agents): always-allocate both queues (drops the null-queue plumbing), aq_new() constructor, video-lane-first feed order (audio sees a fresh pts_shift same-tick after a seek), hoisted per-iteration atomic loads out of feed_audio_lane, lane-iterating teardown, shared STALE_BACKJUMP_NS const. Deferred to step 2: a Lane struct unifying the two feed loops (natural when feeding moves onto per-lane threads). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Kcauj6zm932EtcdTTtW998
Step 5: sf_push_eos() (StarfishMediaAPIs::pushEOS, verified defined on webOS 4.5) is sent once when the video lane drains at genuine end-of-file, so the pipeline flushes its last frames instead of hanging. Keyed to the video-lane drain (Kodi VIDEO_DRAIN). The synchronous-Unload half of the plan was implemented then dropped: on 4.5 the unload event arrives as smp_cb type=23 with no detectable string, SAM force-kills the app during a real stop anyway, and reload (which reconstructs g_smp per seek) shows no race with immediate destroy across the full suite — a blocking wait would only add latency for a race that never manifests. Step 9: mirror the ACB PLAYSTATE (PAUSED=3 / PLAYING) on transport pause/resume via AcbAPI_setState (verified present), gated on ACB_OK and stage >= Bound so it can't perturb the bind ordering. 16/16 regression suite green as Guest. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Kcauj6zm932EtcdTTtW998
…ep 6) Step 3: after a seek the feed-ahead throttle compared the new fed pts against the STALE pre-seek presented position (pres_fed), which could briefly break feeding on a forward in-place seek. Set pres_fed to a PRES_NONE sentinel on seek; both lane throttles treat it as "no presented frame yet → feed freely" until the first post-seek frame presents and overwrites it with a real pts. Step 6: send the real source frame rate in the Load esInfo instead of the 60 sink-envelope default. Plex Stream.frameRate is captured into Detail.video_fps (parse_streams), surfaced via route::stream_fps() (direct-play only, rk-matched to the loaded Detail so the home play_movie path safely omits it), converted to the Kodi/ss4s rational (23.976 -> 24000/1001, 29.97 -> 30000/1001, ...), and injected as videoFpsValue/videoFpsScale + adaptiveResolution:true. libpf parses these (verified). Transcode omits fps (output rate unknown). Verified on-device: Morning Show (23.976) logs `esInfo: videoFps 24000/1001`, plays clean (webOS 4.5 accepts the keys); 16/16 suite green as Guest. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Kcauj6zm932EtcdTTtW998
…had gone false (#55) * docs: the UX scenario LG's checklist defers to, and four claims that had gone false LG's App Self Checklist does not describe four of its own items — #2, #10, #42 and #45 defer to the UX scenario document, and #45 says so in as many words ("refer to UX scenario for movement details"). That makes the scenario the artefact QA grades the transport against, so `docs/ux-scenario.md` is written as a compliance document rather than a tour: every screen, how it is reached, every control on it, what each remote key does on each screen, the BACK trail, and the exit alert. Two of its sections carry the weight. **§6 — playback control.** There is no on-screen `<< || >>` transport row and there will not be one; transport is remote-driven and the HUD shows STATE, a mark beside the elapsed clock and nothing at all while playing steadily. That is stated as settled rather than apologised for, with the grounds: on-screen controls are Recommended rather than mandatory, the idiom already ships approved on these sets, and the half that must really work — the FF/REW/play/pause/stop keys — is bound and was settled 2026-08-22 against LG's own evdev table and 336 captured key lines. The section documents the transport as it IS: three focus bands, the 4.5 s linger, the 10 s preview-then-commit seek with its 450 ms tap accumulation, the six state marks and their precedence, and the control row's three mutually exclusive occupants (discs / Skip pill / Up Next). **§7 — sound.** There is no UI audio at all, and the item is therefore N/A on its own precondition. Checked five ways rather than asserted: SDL is initialised `SDL_INIT_VIDEO` alone, no SDL audio call exists, SDL_mixer is neither present nor linked, there are no audio assets, and no webOS sound service is called. Eleven figures, taken from the simulator at the authored 1920x1080 with the dev counter compiled out. The player HUD is the existing device capture, because the Starfish/ACB seam does not exist off-device — §9 lists the figures that still need a television and why the who's-watching picker is deliberately not among them (its roster is real people's names). One figure is edited and says so: the Search scope line named a real server, and is replaced by the app's own string for a server that reports no name. And four corrections, each verified against the tree first: - `docs/distribution.md` §2 no longer says native Store eligibility is unsettled. It rested on LG's `appinfo.json` reference ("Only `web` is allowed currently") — a `develop/*` WEB-RUNTIME page, which is not authority over a native SDL app. Seller Lounge parses this project's ipk as File Type: Native and asks for the native SDK version, chipset and resolution. What is open is the QA outcome, not the permission. The summary table's "No." row went with it. - `docs/pms-api.md` — the `X-Plex-*` list was the minimum PMS needs to attribute a session, read for years as the identity set. Recorded the full set the official webOS client sends, including `X-Plex-Platform-Version` (Plex gates on FIRMWARE, which `X-Plex-Platform` cannot express) and `X-Plex-Features`, whose exact effect this repo has not measured and which is graded as such. - `docs/shared-servers.md` — it called the `plex.direct` middle label "the certificate UUID, not the machineIdentifier" while `plex-openapi.json` calls the same label "The unique identifier of this particular PMS". Both are 32 hex characters, so no sample settles it. Recorded as a disagreement rather than resolved, with the rule that survives either answer: use the advertised `uri` verbatim, never construct the hostname. - `docs/search.md` — deleted the status blockquote. Its own staleness test had fired: it claimed `ui/search/`'s `draw` bodies are `{}` (mod.rs is ~2200 lines with `draw()` at :832), that `search::pump` lands nothing, and that `Client::search` has zero callers (`search.rs:797` calls it). `rust-modules/src/img.rs` is the only code touched, and only its comments: three said `requiredMemory: 60` against `pkg/appinfo.json`'s 160. make check: 976 passed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: two rendering/consistency fixes in the UX scenario `<Name>` in the PIN-pad description was raw in prose, so a markdown renderer swallows it as an HTML tag and the sentence reads "Enter 's PIN". Moved inside backticks. And the provenance note said "two figures are edited" in the same breath as naming one. There is one: the Search scope line. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: state Home's play-on-OK rule exactly, not approximately The scenario said "OK on a Continue Watching card resumes, OK anywhere else opens the detail page". Right about the deck, incomplete about the rest: `home_activate` plays on `hub_is_continue(row) || mm.kind == 3`, so an EPISODE card plays from any shelf. And a show/season card does not simply open its page — it opens it, waits for the load to land on the expected item, and only then fires Play, precisely so a failed fetch cannot play whatever page was open before. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: six claims the auditor refuted, five of them in the document written to be graded `doc-claim-auditor` over the new UX scenario and the four corrections. Six findings in files this unit owns; all six were confirmed against the code before being fixed. **The chevron is not a control.** The hero action-row table listed `›` under "what OK does". `home.rs:44-50` says the opposite in as many words — `HERO_NBTN` is 2, "the pager chevron beside them is an INDICATOR, not a third button: it is drawn, it is never focused and it has no hit rect". The hero pages by RIGHT past the info disc or LEFT off the pill (`home_hero_key`), plus an 8 s auto-flip. This is the row a QA reader would have tried first and failed, in the one document written for QA to read. **"No control anywhere can take focus and do nothing" had two counterexamples.** OK on Home's own tab pill standing on Home is a documented no-op (`app.rs:2126`), and the person page's header band holds focus but only acts when there is a biography long enough to expand (`person.rs:626`). Narrowed to what is true and still answers #10, with both stops named. **The synthesized tail can never raise a Skip pill.** The document said it "stands in" where the server has no credits detection, and two lines later that Skip Credits "remains for the last episode of a show". `synthesized_tail_marker` returns None unless `has_next` (`metadata.rs:674`) and every Credits marker with a successor resolves to Up Next (`player_hud.rs:401`), so the tail raises Up Next 100% of the time. Stated with its gate, plus the bench consequence: on a Pass-less server Skip Credits is unreachable. **The show/season sentence contradicted the one above it** — my own previous commit's doing. The open-resolve-then-Play arm is INSIDE `want_play` (`app.rs:2152`), so it is the deck rule, not the general one; elsewhere a show card is a bare `nav_open`. Folded into the deck paragraph. **`docs/pms-api.md` said "the five in bold" over six bolded rows**, and let the table be read as what this app sends. Dropped the count and split the two facts: `playback_identity` emits nine fields (`client.rs:152-162`) and none of the four capability/locale ones exist anywhere in the tree. The table is the target; the paragraph is the state. **And two smaller ones**: `assets/` was said to hold 24 SVG icons against a measured 28 — the number is decoration inside a five-way negative proof and is the only thing in that bullet that can rot, so it is gone; and the detail page's watched disc wears the face of the write it would perform (`detail.rs:1087`), so it is a ✓ on an unwatched item and a − on a watched one, not a fixed ✓. Two further findings are in files this unit does not own and are listed in the PR: CLAUDE.md:985 and docs/lg-self-checklist.md:17, both dangling references this branch created. make check: 976 passed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…had gone false (#55) * docs: the UX scenario LG's checklist defers to, and four claims that had gone false LG's App Self Checklist does not describe four of its own items — #2, #10, #42 and #45 defer to the UX scenario document, and #45 says so in as many words ("refer to UX scenario for movement details"). That makes the scenario the artefact QA grades the transport against, so `docs/ux-scenario.md` is written as a compliance document rather than a tour: every screen, how it is reached, every control on it, what each remote key does on each screen, the BACK trail, and the exit alert. Two of its sections carry the weight. **§6 — playback control.** There is no on-screen `<< || >>` transport row and there will not be one; transport is remote-driven and the HUD shows STATE, a mark beside the elapsed clock and nothing at all while playing steadily. That is stated as settled rather than apologised for, with the grounds: on-screen controls are Recommended rather than mandatory, the idiom already ships approved on these sets, and the half that must really work — the FF/REW/play/pause/stop keys — is bound and was settled 2026-08-22 against LG's own evdev table and 336 captured key lines. The section documents the transport as it IS: three focus bands, the 4.5 s linger, the 10 s preview-then-commit seek with its 450 ms tap accumulation, the six state marks and their precedence, and the control row's three mutually exclusive occupants (discs / Skip pill / Up Next). **§7 — sound.** There is no UI audio at all, and the item is therefore N/A on its own precondition. Checked five ways rather than asserted: SDL is initialised `SDL_INIT_VIDEO` alone, no SDL audio call exists, SDL_mixer is neither present nor linked, there are no audio assets, and no webOS sound service is called. Eleven figures, taken from the simulator at the authored 1920x1080 with the dev counter compiled out. The player HUD is the existing device capture, because the Starfish/ACB seam does not exist off-device — §9 lists the figures that still need a television and why the who's-watching picker is deliberately not among them (its roster is real people's names). One figure is edited and says so: the Search scope line named a real server, and is replaced by the app's own string for a server that reports no name. And four corrections, each verified against the tree first: - `docs/distribution.md` §2 no longer says native Store eligibility is unsettled. It rested on LG's `appinfo.json` reference ("Only `web` is allowed currently") — a `develop/*` WEB-RUNTIME page, which is not authority over a native SDL app. Seller Lounge parses this project's ipk as File Type: Native and asks for the native SDK version, chipset and resolution. What is open is the QA outcome, not the permission. The summary table's "No." row went with it. - `docs/pms-api.md` — the `X-Plex-*` list was the minimum PMS needs to attribute a session, read for years as the identity set. Recorded the full set the official webOS client sends, including `X-Plex-Platform-Version` (Plex gates on FIRMWARE, which `X-Plex-Platform` cannot express) and `X-Plex-Features`, whose exact effect this repo has not measured and which is graded as such. - `docs/shared-servers.md` — it called the `plex.direct` middle label "the certificate UUID, not the machineIdentifier" while `plex-openapi.json` calls the same label "The unique identifier of this particular PMS". Both are 32 hex characters, so no sample settles it. Recorded as a disagreement rather than resolved, with the rule that survives either answer: use the advertised `uri` verbatim, never construct the hostname. - `docs/search.md` — deleted the status blockquote. Its own staleness test had fired: it claimed `ui/search/`'s `draw` bodies are `{}` (mod.rs is ~2200 lines with `draw()` at :832), that `search::pump` lands nothing, and that `Client::search` has zero callers (`search.rs:797` calls it). `rust-modules/src/img.rs` is the only code touched, and only its comments: three said `requiredMemory: 60` against `pkg/appinfo.json`'s 160. make check: 976 passed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: two rendering/consistency fixes in the UX scenario `<Name>` in the PIN-pad description was raw in prose, so a markdown renderer swallows it as an HTML tag and the sentence reads "Enter 's PIN". Moved inside backticks. And the provenance note said "two figures are edited" in the same breath as naming one. There is one: the Search scope line. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: state Home's play-on-OK rule exactly, not approximately The scenario said "OK on a Continue Watching card resumes, OK anywhere else opens the detail page". Right about the deck, incomplete about the rest: `home_activate` plays on `hub_is_continue(row) || mm.kind == 3`, so an EPISODE card plays from any shelf. And a show/season card does not simply open its page — it opens it, waits for the load to land on the expected item, and only then fires Play, precisely so a failed fetch cannot play whatever page was open before. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: six claims the auditor refuted, five of them in the document written to be graded `doc-claim-auditor` over the new UX scenario and the four corrections. Six findings in files this unit owns; all six were confirmed against the code before being fixed. **The chevron is not a control.** The hero action-row table listed `›` under "what OK does". `home.rs:44-50` says the opposite in as many words — `HERO_NBTN` is 2, "the pager chevron beside them is an INDICATOR, not a third button: it is drawn, it is never focused and it has no hit rect". The hero pages by RIGHT past the info disc or LEFT off the pill (`home_hero_key`), plus an 8 s auto-flip. This is the row a QA reader would have tried first and failed, in the one document written for QA to read. **"No control anywhere can take focus and do nothing" had two counterexamples.** OK on Home's own tab pill standing on Home is a documented no-op (`app.rs:2126`), and the person page's header band holds focus but only acts when there is a biography long enough to expand (`person.rs:626`). Narrowed to what is true and still answers #10, with both stops named. **The synthesized tail can never raise a Skip pill.** The document said it "stands in" where the server has no credits detection, and two lines later that Skip Credits "remains for the last episode of a show". `synthesized_tail_marker` returns None unless `has_next` (`metadata.rs:674`) and every Credits marker with a successor resolves to Up Next (`player_hud.rs:401`), so the tail raises Up Next 100% of the time. Stated with its gate, plus the bench consequence: on a Pass-less server Skip Credits is unreachable. **The show/season sentence contradicted the one above it** — my own previous commit's doing. The open-resolve-then-Play arm is INSIDE `want_play` (`app.rs:2152`), so it is the deck rule, not the general one; elsewhere a show card is a bare `nav_open`. Folded into the deck paragraph. **`docs/pms-api.md` said "the five in bold" over six bolded rows**, and let the table be read as what this app sends. Dropped the count and split the two facts: `playback_identity` emits nine fields (`client.rs:152-162`) and none of the four capability/locale ones exist anywhere in the tree. The table is the target; the paragraph is the state. **And two smaller ones**: `assets/` was said to hold 24 SVG icons against a measured 28 — the number is decoration inside a five-way negative proof and is the only thing in that bullet that can rot, so it is gone; and the detail page's watched disc wears the face of the write it would perform (`detail.rs:1087`), so it is a ✓ on an unwatched item and a − on a watched one, not a fixed ✓. Two further findings are in files this unit does not own and are listed in the PR: CLAUDE.md:985 and docs/lg-self-checklist.md:17, both dangling references this branch created. make check: 976 passed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…had gone false (#55) * docs: the UX scenario LG's checklist defers to, and four claims that had gone false LG's App Self Checklist does not describe four of its own items — #2, #10, #42 and #45 defer to the UX scenario document, and #45 says so in as many words ("refer to UX scenario for movement details"). That makes the scenario the artefact QA grades the transport against, so `docs/ux-scenario.md` is written as a compliance document rather than a tour: every screen, how it is reached, every control on it, what each remote key does on each screen, the BACK trail, and the exit alert. Two of its sections carry the weight. **§6 — playback control.** There is no on-screen `<< || >>` transport row and there will not be one; transport is remote-driven and the HUD shows STATE, a mark beside the elapsed clock and nothing at all while playing steadily. That is stated as settled rather than apologised for, with the grounds: on-screen controls are Recommended rather than mandatory, the idiom already ships approved on these sets, and the half that must really work — the FF/REW/play/pause/stop keys — is bound and was settled 2026-08-22 against LG's own evdev table and 336 captured key lines. The section documents the transport as it IS: three focus bands, the 4.5 s linger, the 10 s preview-then-commit seek with its 450 ms tap accumulation, the six state marks and their precedence, and the control row's three mutually exclusive occupants (discs / Skip pill / Up Next). **§7 — sound.** There is no UI audio at all, and the item is therefore N/A on its own precondition. Checked five ways rather than asserted: SDL is initialised `SDL_INIT_VIDEO` alone, no SDL audio call exists, SDL_mixer is neither present nor linked, there are no audio assets, and no webOS sound service is called. Eleven figures, taken from the simulator at the authored 1920x1080 with the dev counter compiled out. The player HUD is the existing device capture, because the Starfish/ACB seam does not exist off-device — §9 lists the figures that still need a television and why the who's-watching picker is deliberately not among them (its roster is real people's names). One figure is edited and says so: the Search scope line named a real server, and is replaced by the app's own string for a server that reports no name. And four corrections, each verified against the tree first: - `docs/distribution.md` §2 no longer says native Store eligibility is unsettled. It rested on LG's `appinfo.json` reference ("Only `web` is allowed currently") — a `develop/*` WEB-RUNTIME page, which is not authority over a native SDL app. Seller Lounge parses this project's ipk as File Type: Native and asks for the native SDK version, chipset and resolution. What is open is the QA outcome, not the permission. The summary table's "No." row went with it. - `docs/pms-api.md` — the `X-Plex-*` list was the minimum PMS needs to attribute a session, read for years as the identity set. Recorded the full set the official webOS client sends, including `X-Plex-Platform-Version` (Plex gates on FIRMWARE, which `X-Plex-Platform` cannot express) and `X-Plex-Features`, whose exact effect this repo has not measured and which is graded as such. - `docs/shared-servers.md` — it called the `plex.direct` middle label "the certificate UUID, not the machineIdentifier" while `plex-openapi.json` calls the same label "The unique identifier of this particular PMS". Both are 32 hex characters, so no sample settles it. Recorded as a disagreement rather than resolved, with the rule that survives either answer: use the advertised `uri` verbatim, never construct the hostname. - `docs/search.md` — deleted the status blockquote. Its own staleness test had fired: it claimed `ui/search/`'s `draw` bodies are `{}` (mod.rs is ~2200 lines with `draw()` at :832), that `search::pump` lands nothing, and that `Client::search` has zero callers (`search.rs:797` calls it). `rust-modules/src/img.rs` is the only code touched, and only its comments: three said `requiredMemory: 60` against `pkg/appinfo.json`'s 160. make check: 976 passed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: two rendering/consistency fixes in the UX scenario `<Name>` in the PIN-pad description was raw in prose, so a markdown renderer swallows it as an HTML tag and the sentence reads "Enter 's PIN". Moved inside backticks. And the provenance note said "two figures are edited" in the same breath as naming one. There is one: the Search scope line. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: state Home's play-on-OK rule exactly, not approximately The scenario said "OK on a Continue Watching card resumes, OK anywhere else opens the detail page". Right about the deck, incomplete about the rest: `home_activate` plays on `hub_is_continue(row) || mm.kind == 3`, so an EPISODE card plays from any shelf. And a show/season card does not simply open its page — it opens it, waits for the load to land on the expected item, and only then fires Play, precisely so a failed fetch cannot play whatever page was open before. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G * docs: six claims the auditor refuted, five of them in the document written to be graded `doc-claim-auditor` over the new UX scenario and the four corrections. Six findings in files this unit owns; all six were confirmed against the code before being fixed. **The chevron is not a control.** The hero action-row table listed `›` under "what OK does". `home.rs:44-50` says the opposite in as many words — `HERO_NBTN` is 2, "the pager chevron beside them is an INDICATOR, not a third button: it is drawn, it is never focused and it has no hit rect". The hero pages by RIGHT past the info disc or LEFT off the pill (`home_hero_key`), plus an 8 s auto-flip. This is the row a QA reader would have tried first and failed, in the one document written for QA to read. **"No control anywhere can take focus and do nothing" had two counterexamples.** OK on Home's own tab pill standing on Home is a documented no-op (`app.rs:2126`), and the person page's header band holds focus but only acts when there is a biography long enough to expand (`person.rs:626`). Narrowed to what is true and still answers #10, with both stops named. **The synthesized tail can never raise a Skip pill.** The document said it "stands in" where the server has no credits detection, and two lines later that Skip Credits "remains for the last episode of a show". `synthesized_tail_marker` returns None unless `has_next` (`metadata.rs:674`) and every Credits marker with a successor resolves to Up Next (`player_hud.rs:401`), so the tail raises Up Next 100% of the time. Stated with its gate, plus the bench consequence: on a Pass-less server Skip Credits is unreachable. **The show/season sentence contradicted the one above it** — my own previous commit's doing. The open-resolve-then-Play arm is INSIDE `want_play` (`app.rs:2152`), so it is the deck rule, not the general one; elsewhere a show card is a bare `nav_open`. Folded into the deck paragraph. **`docs/pms-api.md` said "the five in bold" over six bolded rows**, and let the table be read as what this app sends. Dropped the count and split the two facts: `playback_identity` emits nine fields (`client.rs:152-162`) and none of the four capability/locale ones exist anywhere in the tree. The table is the target; the paragraph is the state. **And two smaller ones**: `assets/` was said to hold 24 SVG icons against a measured 28 — the number is decoration inside a five-way negative proof and is the only thing in that bullet that can rot, so it is gone; and the detail page's watched disc wears the face of the write it would perform (`detail.rs:1087`), so it is a ✓ on an unwatched item and a − on a watched one, not a fixed ✓. Two further findings are in files this unit does not own and are listed in the PR: CLAUDE.md:985 and docs/lg-self-checklist.md:17, both dangling references this branch created. make check: 976 passed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Unit 7 of the parallel Search build. My commit is the single last one —
ad32711e, one file,rust-modules/src/ui/search/empty.rs.mod.rs, the otherui/search/submodules,search.rsand
app.rsare untouched.What it draws
Four readings, decided from
search::state()and never from emptiness alone — aReadystore with nothing in it and a
Failedone with nothing in it are the same store and oppositemeanings, which is the distinction
browse.rshad to learn the hard way.Idle, empty fieldIdle, field holding lettersReady, no shelvesNo results for "wallace"(typographic quotes)SearchingFailedBoth statements are a
HEADLINE-bold line inTEXT_HEADINGover aCAPTION/TEXT_TERTIARYhint one
space::SMdown, cap-top anchored atCONTENT_TOPonMARGIN_X, so the copy sitswhere a first shelf's heading would. No alert mark, no danger tint, no Retry: nothing found is an
answer the server gave, and dressing it as an error tells the user something untrue about their
library.
The two decisions the brief asked me to make and justify
Plain copy, not
widgets::StatusOverlay.StatusKind::Emptyis the right reading of"nothing found" and the wrong anatomy for it here.
StatusOverlayis the app's CENTREDread-out: it centres its block on the frame, aligns every run
HAlign::Center, and fixes its ownrungs (
BODYverdict over aCAPTIONreason, neither bold). This screen's copy is left-alignedat the side margin on the
HEADLINE-bold rung. Bending the component to that would mean addingan alignment axis, an anchor mode and two size overrides to the one thing whose whole job is
holding the centre, and every existing caller would then be one builder call away from drifting
off it. That is a fork of its anatomy dressed as a style variant, which rule 4 of
ui/CLAUDE.mdis aimed at.
Keeping the two anatomies apart also earns its keep: a statement is page copy where the content
would have been; a fault is the centred read-out. The design's own point is then made in
geometry, not only in tint.
State::Searchingdraws nothing, per the brief. A spinner belongs to whoever owns the fetch,and a second unowned clock on one screen is worse than a quiet beat. Flagging a gap this opens,
for whoever takes the store unit:
set_queryclears the shelves on every keystroke, so betweenthe debounce firing and the answer landing the whole region below the field is currently
unowned and blank. Either the store should hold the previous shelves until the next answer lands,
or
results.rsshould own an in-flight read-out. It should not be added here.State::Failedis drawn, and reads as a fault. It is here only because the routing abovesends it here:
mod.rshands this file every query whose shelf list is empty, and a failedrequest has an empty shelf list — so an early return would blank the panel under a field holding
a query, which is exactly the "a screen that failed to draw" reading the not-yet copy exists to
prevent. It gets
StatusOverlayatStatusKind::Failed(danger tint, no spinner) with a reasonline saying what is still fine, and no action pill — a control has to be focusable to be a
control and no
Zonecan hold one yet, so a pill the remote cannot reach would be worse thannone. Frame is clamped above
KEYBOARD_Hwhile the keyboard is up, per this screen's standingrule. That arm is the thing to delete when the fault gets a real owner.
Two rungs the design did not specify
The brief gives "across both sources" and "in <server>". Added:
MAX_SERVERS= 16 slots, and"both" is simply false at three.
plex.tv can dial a server and know no name for it (visible in the screenshots below — the
simulator boots token-only, so nothing ever described the server). Never a placeholder name:
saying less is better than inventing.
Also not in the brief, and easy to drop if unwanted
MIN_QUERYquery.set_querymaps anythingunder
MIN_QUERYtoIdleand clears the shelves, so backspacing a finished search down toone letter lands in
Idlewith the letters still on screen — the one place this file couldstate something the screen itself disproves ("you haven't searched yet", under the user's own
typing). Caught by code review, not by me.
'. Thebrief asks for typographic quotes around the query; a straight mark beside a curly pair in the
same type role reads as an accident. Font coverage verified.
Verification — simulator, not the television
The TV was in use, so everything visual is
make sim-shoton macOS at 1920x1080. Frame rates,text rasterization and the video plane are all outside what this can answer; nothing here needs
them.
make check— 540 tests green (+5 mine). See the flake caveat below.make— the ARM cross-build links.make lint— clean, no new warnings.fault read-out.
The store stub lands nothing, so a real query never leaves
Searching. The no-results and faultshots were taken with a temporary one-line fixture in
say()mappingSearchingto the statebeing photographed. It is removed —
say()on this branch mapsSearchingtoNone, and thetest suite asserts it.
Host tests (5)
The state table (including that
Ready-with-shelves answersNone, so a stray call cannot paint"No results" over a screen full of them), the sub-minimum-query split, the typographic quoting and
that the closing quote survives eliding, and the scope rungs including the nameless and >2 cases.
Placeholder server names only (
nas-home) — this repository is public.Unrelated: the test suite has a memory-unsafety flake — #41
While verifying,
cargo test --libaborted several times withinvalid value for char/is_utf8_char_boundary/ a panic insidecore::fmt— a&strread while its bytes change.It is not this change. On the pristine base with
empty.rsreverted to its stub, four testswhose bodies only
format!in a loop reproduced it at the same rate (2 aborts in 12 runs), whilefour
assert_eq!(1,1)tests were 15/15 clean and the bare base 20/20. Allocation churn from anynew test is the trigger; the bug is a latent race that only becomes visible when another thread
reuses the freed block.
Consequence for anyone reviewing parallel work right now: a red
make checkmay not be theauthor's change. Re-run it, and
--test-threads=1never fails. Full evidence and narrowing in#41.