Skip to content

Shelf appearance: one chrome per shelf, one-line credits, and what a search-only shelf is allowed to be #126

Closed

Description

@holden

Purpose

#116 finished the plumbing: one Images shelf, four sources, one Artworks shelf with three, one Texts shelf with two, every card credited, every item saying why it is there. This issue is the appearance pass the owner asked for once that was proven — and the one product decision #116 left open (its D2), which the card design depends on. Measured on main @ 79fd344, 2026-09-19, on /define/war, /define/soldier, /define/nepotism and /define/logomachy at 1280 and 375.

Schema impact

0 new tables, 0 changes to existing tables. Every change is in ContentTypes (data), Culture (the reader), the provider that composes a credit line, and the conformance suite where an assertion names a DOM id that moves.

What the page looks like today, measured

  1. No word is without an Images shelf. Openverse, Unsplash and Pexels decline nothing and Pexels has no empty at all: nepotism shows 36 stock photographs, logomachy 11. Every one is labelled Search result for “…”, ranked by the provider and not matched on an identifier. That is Many sources, one shelf: the Photos shelf (Openverse, Unsplash, Pexels) as the rule for every multi-source content type — memes and quotes follow it; what eventasaurus taught #116's D2 as recorded, and it is a different page from the one Phase 1 ended with.
  2. The credit is the tallest thing on an Openverse card. Its attribution is the full CC sentence — "war" by zbigphotography (1M+ views) is licensed under CC BY-SA 2.0. To view a copy of this license, visit https://creativecommons.org/licenses/by-sa/2.0/. — and a required credit is unclamped by decision (Phase 3), so it runs seven lines under a 112 px thumbnail. Unsplash and Pexels compose one line; Commons composes one line.
  3. One shelf, four sets of chrome. Each contributing source adds a matches for “war” · About these results disclosure and a Load more control, so the Images shelf carries four of each; at 375 the byline (Wikimedia Commons · depicts: Wikidata · Openverse · search: CC and public domain · Pexels · …) wraps to four lines above the rail.
  4. Counts drift across sources. Load more is per source: one click on Pexels made it 24 on a rail where the others hold 12, and the About note faithfully lists 24.
  5. Cards say Year unknown on every Pexels and most Unsplash and Openverse items, because a stock photograph publishes no date; on the :image row that line is noise in the position a year would hold.
  6. The square frame crops the searches' photographs. Phase 2 measured Openverse on soldier: 15 landscape, 5 portrait, 0 square. Phase 3 measured Unsplash and Pexels ladders with landscape, portrait and original rungs. The row stays square because a square crops a portrait less than 4:3 does — that argument still holds, and this issue does not reopen it without a measurement that beats it.
  7. Two audit residuals that belong to whoever touches these files next: Artworks.source_tiers/1 runs the same sources query twice per page; /define/soldier renders two elements with id="may-refer-to-Q4991371" (thing.ex:226).
  8. Two facts from Phase 3's own report that have no other home. (a) Every href on a card comes out of a provider response; since 0c1027b the renderer accepts only an absolute http(s) URL, and that rule is not yet in docs/discovery/adding-a-provider.md. (b) A tier change in a provider's source_attrs/0 does not reach an existing source row — ensure_source/1 inserts on_conflict: :nothing — so Openverse stayed :middle until Sources.Catalog.seed!/0 was run by hand. There is no deployment issue in this repository; until there is, every PR that changes a source row's attributes says so in its body, and the guide's §6 says to run the seed.

Decisions (defaults; change them here, not in a chat)

  • D1 — A search-only shelf is demoted, not hidden. On a page where no identity-bearing or attesting source contributed to a shelf, the shelf still shows (M6's honesty stands: the label is the point) but it renders after every shelf that has identity or attestation on it, and it takes one page in total, not one per source — twelve items across the searches in turn, with Load more to go on. On a page where an identity source did contribute (war, soldier), nothing changes: identity leads on tier and the searches follow. The alternative — hide the shelf outright — is one clause in Culture.shelves/1 and is recorded here as the fallback if the demoted shelf still reads as a results page.
  • D2 — A credit is one line the provider composes. M4's verbatim stands for the fields; it never meant a paragraph. Every provider on a :required row writes attribution as at most one sentence naming the creator and the licence, with no URL in the prose — the licence link D3 puts on the licence name is where "view a copy" lives. Openverse composes "{title}" by {creator}, {licence} from its own fields instead of forwarding the CC boilerplate; Commons, Unsplash and Pexels already comply. Conformance asserts the line carries no http and is under 160 characters.
  • D3 — One About and one Load more per shelf. The shelf's About these results is one disclosure listing every contributing source in tier-then-slug order, each with its reason sentences; Load more is one control that advances every contributing state one page, so counts stay even. DOM ids move from culture-about-<provider> to culture-about-<type> with a culture-about-<type>-<provider> section inside, and from per-state Load more to culture-more-<type>; the conformance suite's assertions change to the new ids with the same meaning, and that change is listed in the PR as the one place an existing assertion is edited.
  • D4 — The byline is names. Wikimedia Commons · Openverse · Pexels · Unsplash; each provider's shelf_detail (depicts: Wikidata, search: CC and public domain) moves into its About section. At 375 the byline is one or two lines.
  • D5 — A card shows a year only when it has one. The year · badge line becomes badge alone when year is absent; Year unknown is never printed on a discovery card. The registry's own entity pages are untouched.
  • D6 — Aspect and column stay (aspect-square, w-24 sm:w-28) unless a session measures, on the four real sources at 375, that another frame crops less. Anyone changing them puts the measurement in the PR.
  • D7 — No provider is named in the reader. Every rule above is data on the row or a fact on the state; Culture keeps branching on neither.

Phase 1 — the shelf's chrome (one session)

D1, D3, D4, D5, residual 7, and residual 8's two guide sentences. All in Culture, Artworks.source_tiers/1, thing.ex, docs/discovery/adding-a-provider.md, and the conformance assertions D3 moves. No provider file. Exit: /define/war and /define/nepotism at 1280 and 375 with one About and one Load more per shelf, the byline as names, no Year unknown on an image card, the search-only shelf on nepotism rendered last with twelve items; precommit green apart from the environmental manifest test; conformance green with the moved ids; the four counts on war even after one Load more.

Phase 2 — the card (one session)

Carried in from Phase 1's report (2026-09-19), all provider-side or out of Phase 1's file list:

  • Openverse's page 1 returns the same ids as its page 0 — now its own issue, Openverse: the second page is the first page #128, with the measurement. Phase 2 opens openverse.ex for D2 anyway, so the Phase 2 PR fixes Openverse: the second page is the first page #128 in the same file and closes it; if Phase 2 runs before Openverse: the second page is the first page #128 is read, read Openverse: the second page is the first page #128 first.
  • Two stale comments in pexels.ex (lines 38 and 330) still say the card prints Year unknown; D5 made that false.
  • Thing.disagreement/1 has the same latent duplicate-id shape may_refer_to/1 had; not observed on a page, fix it the same way while thing.ex is open, or record that it is left.
  • No test drives Load more through the LiveView; a provider fixture with two pages and one discovery_more assertion closes that.
  • Culture computes each entry's reasons twice per shelf (demotion check and About); cheap, noted, fold it only if the shelf map is being touched anyway.

D2 on Openverse (its provider file), the conformance assertion on every :required row, and the credit's typography beneath a 112 px thumbnail: creator and licence linked, nothing else underlined, the line never taller than three rows at 375. D6's measurement if the session wants to argue with it. Exit: the Openverse credit on /define/war is one line; the fold check and the multi-source check still pass; a screenshot of one card from each of the four sources at 375.

Not doing

Checklist

Activity

  1. holden commented on Sep 19, 2026

    @holden
    MemberAuthor

    Phase 1 — #127, open, not merged

    Branch codex/issue-126-phase1 off main @ 79fd344. 19 files. D1, D3, D4, D5, residual 7, residual 8's guide sentences. No provider file; schema impact 0.


    Conformance, pasted

    $ MIX_TEST_PARTITION=p126a mix test test/devils_dictionary/discovery/conformance \
        test/devils_dictionary/artworks/corpus/conformance \
        test/devils_dictionary/discovery/conformance_coverage_test.exs
    Running ExUnit with seed: 749844, max_cases: 32
    
    .......................................................................................
    .......................................................................................
    ..........................................................................
    Finished in 13.7 seconds (0.4s async, 13.2s sync)
    244 tests, 0 failures
    

    mix precommit:

    Finished in 69.8 seconds (30.3s async, 39.4s sync)
    1394 tests, 1 failure
    

    The one failure is test/devils_dictionary/sources/manifest_test.exs:26, the environmental one (the untracked data/ dumps). Baseline on main in this worktree was 1,380 tests, 1 failure, same test; the 14 new ones are this PR's culture_chrome_test.exs. Formatting and compile are clean.


    Browser proof

    Server on 4017, devils_dictionary_v2, nothing else listening and pg_stat_activity showing no other application on the database before or during. mix compile to completion first. Screenshots over CDP with an emulated layout viewport, document.documentElement.scrollWidth === 375 at 375 on all three pages (and === 1280 at 1280).

    File What it shows
    docs/discovery/issue-126-phase1-war-1280-2026-09-19.jpg / -375- /define/war, all four shelves, first visit
    docs/discovery/issue-126-phase1-war-images-1280-2026-09-19.jpg the Images shelf after one Load more: one byline of names, one About, one Load more
    docs/discovery/issue-126-phase1-war-images-375-2026-09-19.jpg the byline on two lines at 375
    docs/discovery/issue-126-phase1-nepotism-1280-2026-09-19.jpg / -375- the demoted Images shelf, last on the page
    docs/discovery/issue-126-phase1-nepotism-images-1280-2026-09-19.jpg twelve items, one About, one Load more
    docs/discovery/issue-126-phase1-logomachy-1280-2026-09-19.jpg / -375- Pexels alone, eleven items, last on the page

    Measured in the DOM:

    /define/war — shelves in order artwork, image, text: the Images shelf has Commons's depictions on it, so nothing is demoted and the table's order stands, exactly as D1 says.

    byline  Wikimedia Commons · Openverse · Pexels · Unsplash          (names only)
    about   #culture-about-image
              #culture-about-image-commons, -openverse, -pexels, -unsplash   (tier then slug)
    more    #culture-more-image  phx-value-providers="commons,openverse,pexels,unsplash"
    byline height at 375: 48px / 24px line-height = 2 lines  (was four)
    "Year unknown" on the page: false
    

    /define/nepotism — shelves in DOM order film, text, image last. The Images shelf has nothing but searches on it, so it is demoted and capped:

    openverse 4 + pexels 4 + unsplash 4 = 12    (was 36)
    one #culture-about-image with three sections, one #culture-more-image
    

    /define/logomachy — shelves film (empty state), text, image last, eleven Pexels photographs, one About with one section, one Load more. Summary reads Matches for “logomachy” · About these results.

    /define/soldier — duplicate DOM ids on the page: 0. It rendered two id="may-refer-to-Q4991371" before.

    D5

    No card on any of the four pages prints Year unknown. A card with a year prints 1966 · Image; a card without prints Image.


    The one exit criterion I did not meet as written

    the four counts on war even after one Load more

    One click on #culture-more-image advanced all four sources one page each, which is the mechanism D3 asks for, and it is one control where there were four. The counts on the rail afterwards are not level:

    source before after run
    commons 12 24 page 1, 12 results
    openverse 6 6 page 1, 6 results — the same six ids as page 0
    pexels 24 34 page 2, 11 results, 1 folded as a duplicate
    unsplash 12 24 page 1, 12 results

    Two reasons, neither of them the chrome:

    1. Pexels was already two pages deep in the cache before I started — discovery_runs has its page 0 (09:03) and page 1 (09:32) for war from a Phase 3 session on 2026-09-19. The per-source Load more this PR removes is what made it uneven; a persisted page cannot be un-loaded, and the brief forbids deleting a run, so war starts uneven and stays uneven by exactly that one page.
    2. Openverse's page 1 for war returns the same six ids as its page 0. Verified in the database: 6 results on page 0, 6 on page 1, count(distinct external_id) across both = 6. The shelf's read-time dedup folds them, so its count cannot move. That is a provider-pagination fact, and Openverse is a provider file this phase may not touch — worth a look in Phase 2 or its own issue.

    So what I can report is: one control, four sources advanced, each by one page, in one click — and the counts diverge only by what was in the cache before and by what Openverse returns. On a word with no pre-loaded page, the advance is level; culture_chrome_test.exs asserts the cap moves from 12 to 24 when every source has loaded a page.


    Ledger

    5 live requests, all from that one Load more. discovery_request_attempts 256 → 261:

    source stage requests
    commons search 1
    commons entities 1
    openverse image_search 1
    pexels photo_search 1
    unsplash photo_search 1

    Opening war, nepotism, logomachy and soldier spent 0 — every page was answered from cache. No image bytes; no run deleted.


    Where the issue was wrong or insufficient

    1. Residual 8(b)'s remedy is wrong, and the guide now says the true one. The issue says a tier change "did not reach an existing source row … so Openverse stayed :middle until Sources.Catalog.seed!/0 was run by hand". Sources.Catalog.sources/0 holds six MVP-0 sources — wordnet, wiktionary, wikidata, wikipedia, bierce, johnson — and no discovery provider, so seed!/0 cannot have fixed an Openverse row and will not fix the next one. Discovery.ensure_source/1 is the only writer of a provider's row, and it inserts on_conflict: :nothing. The row has to be updated (or dropped so the next visit re-inserts it) by hand. The guide's §6 now says that, with the psql line to check the row, rather than pointing at a seed that does nothing here. The observation itself is right and still bites; only the fix named was wrong.

    2. Phase 1 cannot be done in the files the issue lists. The brief says "All in Culture, Artworks.source_tiers/1, thing.ex, docs/discovery/adding-a-provider.md, and the conformance assertions D3 moves." D3's single Load more advances several states, and the handler that advances them is WordLive.handle_event("discovery_more", …), which took one provider slug. I changed it to take providers and reduce; nothing else in the module moved. Listed in the PR body as a shared file touched.

    3. D3's "every contributing state" would strand a folded source. I read it as every state on the shelf that has another page. A source whose whole page folded into a better-tiered copy contributes nothing to the byline, so under the literal reading it would never advance and would be off the shelf permanently. The superset satisfies the decision's purpose (the counts move together) and costs nothing. Said out loud because it is a reading, not the words.

    4. D4's byline assertions are not id moves, and I moved them rather than dropping them. Five assertions named #culture-provider-<slug> and its text ("The Met · tags: Wikidata"). D4 takes the detail out of the byline, so each became two assertions — the name in the byline, the name and detail in that source's About section. The PR body lists them; no assertion lost coverage.

    5. The issue's per-provider About id is not the whole set. It names culture-about-<provider>; the catalog is a state too, so #culture-about-catalog moved to #culture-about-artwork-catalog in three test files the issue does not mention (word_artwork_catalog_test.exs, artwork_live_test.exs, culture_discovery_live_test.exs). Same move, same meaning.

    6. The measured state (item 1) no longer matches the database. The issue records nepotism at 36 and logomachy at 11 with every image source :middle. In devils_dictionary_v2 today Openverse, Pexels and Unsplash are :plebs and Commons is :middle, which is what makes the byline read Wikimedia Commons first. Nothing to fix — the tier order and the slug order happen to agree — but the issue's "every source is :middle" is stale and the ordering assertions in culture_chrome_test.exs now cover the case where they disagree.


    Left out, named as left out

    • D2, D6 and the credit typography are Phase 2 and untouched. The Openverse credit on /define/war is still the seven-line CC boilerplate; you can see it in issue-126-phase1-war-images-1280-2026-09-19.jpg, which is what Phase 2 is for.
    • Two stale comments in lib/devils_dictionary/discovery/providers/pexels.ex (lines 38 and 330) still say "the card says Year unknown and that is the truth". D5 made that false. It is a provider file, which this phase may not touch, so they are left for Phase 2.
    • Thing.disagreement/1 has the same latent duplicate-id shape as may_refer_to/1 — its @concepts are assertion revisions on several senses and two senses referring to one entity would render two id="disagreement-<qid>". Not observed on any page I opened, and the brief scopes thing.ex to "the duplicate id only", so I left it and am naming it here.
    • No test drives the Load more button through the LiveView. There was none before either (discovery_more had no test at all); the new component test asserts the control's markup and the cap's arithmetic, and the browser proof above is the end-to-end evidence. A LiveView test for it would want a provider fixture with two pages and is worth its own change.
    • Culture computes each entry's reasons twice on a shelf — once to decide whether the shelf is demoted, once in the About. Cheap (it is a map read plus a struct build) and not worth threading a cache through the shelf map for; noted so the next session does not think it went unseen.
  2. holden commented on Sep 19, 2026

    @holden
    MemberAuthor

    Addendum — a design pass over the two controls this phase rebuilt

    Ran the chrome through the ui.sh design guidelines after the fact. Three findings, all in the controls D3 and D4 redesigned, none in the card:

    1. A dark-mode hover that moved the text towards the background. #culture-more-<type> carried hover:text-mist-950 with no dark counterpart — mist-950 is oklch(14.8%) and the dark page background is mist-950, so hovering the shelf's one Load more in dark mode made it disappear. Now dark:hover:text-white, which is the idiom credit_parts/2's links two components down already use. The About summary had the same shape (hover:text-mist-700 over dark:text-mist-400); now dark:hover:text-mist-200. Both pre-existed this PR — they were just four small controls before and are one prominent one now.
    2. The shelf's one control read a size smaller than the text beside it. Load more was text-sm at every width while the summary on the same row is text-base sm:text-sm. Levelled to text-base sm:text-sm.
    3. 80×32 at 375 is under the 48 px a thumb needs. It carries the guidelines' touch target now — an absolute span sized max(100%, 3rem), pointer-fine:hidden — measured 80×48 at 375, invisible to a mouse.

    Both controls also gained the focus-visible:outline-2 focus-visible:outline-offset-2 every other interactive element in Culture already had.

    Verified at 375 with every disclosure forced open: the About sits inside the gutter (x 24 → 351 of 375), no descendant crosses the viewport edge, scrollWidth still 375, and all three new utilities are in the built stylesheet. Screenshot: docs/discovery/issue-126-phase1-nepotism-about-open-375-2026-09-19.jpg.

    mix precommit after: 1,394 tests, 1 failure (the environmental manifest test). Conformance: 244 tests, 0 failures. Ledger unchanged at 261 — no further live requests. Aspect and column untouched (D6).

    Pushed to #127 as a second commit (046a991).

  3. holden commented on Sep 19, 2026

    @holden
    MemberAuthor

    The Openverse pagination finding is now #128, not a Phase 2 item here. It is a provider correctness and ledger bug rather than an appearance one, this issue's Not doing fences provider changes to Openverse's credit line, and it needs its own probe with a ceiling — a different kind of work from D2's typography. Phase 2 opens openverse.ex anyway, so a session may reasonably do both; neither is gated on the other.

  4. holden commented on Sep 19, 2026

    @holden
    MemberAuthor

    Phase 1 audit (2026-09-19) — PR #127 @ 046a991, doc fix in bad464e — grade A

    Independent re-check on a fresh detached worktree: mix precommit 1,394 tests, 1 failure, the environmental manifest test only, matching the report. The diff read in full; the screenshots read against the DOM measurements in the report. No browser run of my own this time: the owner's dev server is up on port 4007 from the main checkout against devils_dictionary_v2, and a second server on that database is the thing the guide forbids, so the report's DOM readings and the fourteen new component tests stand as the proof.

    What holds

    • D1. A shelf with no identity or attestation on it sorts last and takes one page of twelve across its sources in turn; a shelf with a Commons depiction on it is untouched. Read from the entries' own reasons, not the row, which is the right place: whether this page got an identity is a fact about what arrived. The nepotism screenshot shows Films, Texts, then the demoted Images shelf with twelve items.
    • D3. One About per shelf with a section per contributing source in tier-then-slug order, one Load more that names every state with a cursor — including a state whose whole page folded, which the literal wording would have stranded. The handler change in WordLive is the one shared file outside the list, and it is the minimum: the event takes a list where it took one slug.
    • D4, D5. The byline is names, two lines at 375 where it was four; no card prints Year unknown and a card without a year prints the badge alone.
    • Residual 7. The source tiers are one query per page; the duplicate may-refer-to id is gone by de-duplicating on object id, with the QID-less fallback so two unidentified things cannot collide either.
    • Residual 8, corrected. My remedy was wrong: Sources.Catalog.seed!/0 seeds the six MVP-0 sources and no provider, so it cannot have moved Openverse's tier. The guide now says the true thing — update the row by hand and say so in the PR — and CodeRabbit's one finding, the psql line naming a fixed database while the procedure allows DD_DATABASE, is fixed in bad464e.
    • The addendum's design pass is the kind of thing an audit usually has to ask for: a dark-mode hover that vanished into the background, a control smaller than its neighbour, a 32 px touch target, all fixed and measured.

    The one exit criterion not met, and why that is fine

    "The four counts on war even after one Load more" could not be met on that word: Pexels was already a page deep from a Phase 3 session and a persisted page cannot be un-loaded, and Openverse's page 1 returns the same six ids as page 0, so its count cannot move. The first is history; the second is a provider bug and is now the first item of Phase 2. The mechanism the criterion was written to check — one control, every source advanced one page — is asserted in the component test and shown in the ledger (five requests, one per source plus Commons's hydration).

    Verdict

    Mergeable at bad464e. Phase 1 of #126 is done as written, with one reading (D3's "every contributing state" as "every state with another page") said out loud and correct. Phase 2 is the card: D2's one-line credit on Openverse, the credit typography, D6 if measured, plus the five residuals carried into its section above.

  5. added a commit that references this issue on Sep 19, 2026
  6. holden commented on Sep 19, 2026

    @holden
    MemberAuthor

    Phase 2 — #129, open, not merged

    Branch codex/issue-126-phase2 off main @ 2a760f3. 15 files. D2, the credit's typography, the Openverse pagination bug, and the four other residuals Phase 1 carried in. Schema impact 0; no source row's attributes changed, so §6's by-hand update does not apply to this PR.


    Conformance, pasted

    $ MIX_TEST_PARTITION=p126b mix test test/devils_dictionary/discovery/conformance \
        test/devils_dictionary/artworks/corpus/conformance \
        test/devils_dictionary/discovery/conformance_coverage_test.exs
    Running ExUnit with seed: 316542, max_cases: 32
    
    .......................................................................................
    .......................................................................................
    ..........................................................................
    Finished in 13.4 seconds (0.4s async, 12.9s sync)
    244 tests, 0 failures
    

    That is with D2's new assertion running on every :required-row provider — Commons, Openverse, Pexels, Unsplash, and the two multi-source stubs — plus the Commons–Openverse fold check, whose credit assertions tightened rather than loosened.

    mix precommit:

    Finished in 70.6 seconds (31.2s async, 39.4s sync)
    1403 tests, 1 failure
    

    The one failure is test/devils_dictionary/sources/manifest_test.exs:26, the environmental one. Baseline was 1,394 / 1, same test; the nine new tests are seven in openverse_test.exs and two in the new culture_more_live_test.exs.


    D2, measured

    Openverse forwarded its own CC boilerplate — 155 characters, two sentences, an unbreakable URL. Rendered through the card component on /define/war, that one credit is fourteen rows at 375 and eleven at 1280. The issue recorded seven; the number on the card the issue names is worse than that.

    It now composes "{title}" by {creator}, {licence}. Same card: "war" by zbigphotography (1M+ views), CC-BY-SA-2.0, 50 characters, four rows at 375, three at 1280.

    docs/discovery/issue-126-phase2-four-sources-before-375-2026-09-19.jpg and …-four-sources-375-2026-09-19.jpg are the same four cards before and after, at 375.


    The credit's typography, and the exit criterion I did not meet

    text-sm → text-xs: the card's own scale, putting the obligation below the title, the year and the artist. Measured on the 131 real image credits in devils_dictionary_v2 for war and soldier:

    median longest over three rows
    375 (96 px column), text-sm 4 rows 10 85 / 131
    375, text-xs 3 rows 8 59 / 131
    1280 (112 px), text-sm 3 rows 8 59 / 131
    1280, text-xs 2 rows 7 42 / 131

    Creator and licence linked, nothing else underlined — asserted, not eyeballed: exactly two anchors in the credit and exactly two elements carrying an underline class.

    "Every credit at most three rows at 375" is not met, and it is not reachable from the three files this phase may touch. At text-xs in a 96 px column a credit has to be about 46 characters to fit three rows. {author}, {licence}, via Wikimedia Commons spends 23 of them on its tail before it names anybody; the longest real Commons credit here is 89 characters and eight rows. Per source at 375: Commons 32/34 over three, Openverse 12/18, Unsplash 10/33, Pexels 5/46.

    The two ways to reach it are both fenced: clamp a required credit (forbidden — that is what hid the word Unsplash and the link on it), or widen the column (D6). Your call; the numbers are above and in the component's comment.

    On the page of twelve war actually shows, 8 of 12 credits are at most three rows at 375 and 9 of 12 at 1280, against 5 of 12 before.


    Openverse's second page — found, and it is not the arithmetic

    div(offset, limit) + 1 is correct and the run really did ask for page 2. The cause is filter_dead: Openverse validates upstream links against a cached dead-link mask per query and, when that cache is cold, serves the requested page from the start of the ranking.

    request result
    filter_dead=true, page_size=12, page 2 page 1's twelve ids — cf-cache-status: HIT, age: 7603 — the entry written at 12:19, the moment Phase 1 clicked Load more
    same, fresh cache key (mature omitted) MISS, and still answered from index 0
    filter_dead=false, pages 1 / 2 / 3 three cold MISSes, contiguous
    filter_dead=true, page_size 6 / 10 / 20 contiguous — but the mask was warm by then

    Fix: the first page keeps the filter, the pages after it do not. The cost, said out loud: an item on page 2+ has not been link-checked, so its thumbnail may be dead; and the two rankings differ by what the filter removed, so the unfiltered page 2 can repeat one item from the filtered page 1 — exactly one, measured — which Shelf.dedup/2 folds at read time.

    The fixture now models the API's behaviour, so a provider that asks for the filter on a later page fails the shared pagination suite rather than a bespoke test. Verified by regressing it deliberately:

    1) test openverse — pagination hands back a cursor and the next page appends to the first
       left:  ["c80387bb…", "da6a88c7…"]
       right: ["c80387bb…", "da6a88c7…", "0a8fdfa0…", "0ea589cc…"]
    

    This is #128. Your 13:29 comment moved it out of Phase 2; my brief asked for it and Phase 2 opens openverse.ex anyway, so it is in this PR. Close #128 against it or keep #128 for the ledger half — nothing here touches the request-accounting side of it.


    Screenshots

    Saved as the guide names them, in docs/discovery/:

    File What
    issue-126-phase2-four-sources-375-2026-09-19.jpg one card from each of the four sources at 375
    issue-126-phase2-four-sources-before-375-2026-09-19.jpg the same four as main renders them
    issue-126-phase2-war-images-shelf-375-2026-09-19.jpg / -1280- the rail as it really scrolls
    issue-126-phase2-war-images-shelf-wrap-375-2026-09-19.jpg / -1280- the same twelve with only the rail's overflow overridden, so every credit is in one frame

    Where the issue was wrong or insufficient

    1. "The credit is the tallest thing on an Openverse card … seven lines" understates it. Measured through the component, that credit is fourteen rows at 375 and eleven at 1280. The direction was right; the number was optimistic.

    2. D2's "under 160 characters" is a conformance ceiling, not a design budget. 160 characters is a paragraph in a 96 px column — about ten rows. The assertion is in as written, because it catches the boilerplate class of failure, but Openverse's own envelope is 72, and the number that matters for the card is 46. Worth recording in D2 itself so the next provider does not aim at 160.

    3. "The credit's typography … never taller than three rows at 375" is not achievable as written, for the reason above. It is not a typography problem: no readable size fits a 73-character Commons credit into three rows of 96 px. The decision it actually forces is D6 (column) or an exception to the no-clamp rule, and the issue does not connect those.

    4. "Beneath a 112 px thumbnail" is true at 1280 and not at 375. column is w-24 sm:w-28, so the card is 96 px at 375 and 112 px from sm up. Every 375 measurement above is at 96. The code wins.

    5. Residual "Openverse's page 1 returns the same ids … the page arithmetic against first, or Openverse's own ranking" — neither. It is a request parameter we control, and the evidence was reachable without touching the pipeline. Also, the 13:29 comment reclassifies it as out of Phase 2 while the Phase 2 list still carries it as its first item; the checklist and the comment disagree.

    6. D6 cannot be measured from what this pipeline stores, which the issue's "unless a session measures … that another frame crops less" assumes it can. No intrinsic image dimensions are persisted by any of the four providers, and the stored thumbnails cannot stand in: every Pexels and Unsplash thumbnail loads at exactly 3:2, which is the provider's rung, not the photograph's shape. Whoever takes D6 needs to persist the width and height the APIs already report, or fetch the originals.

    7. Sources.Catalog.seed!/0 is still named in the issue body (item 8b) as what fixed Openverse's tier. Phase 1's report and the guide already corrected this; the issue body did not get the edit.


    Every file touched, and why

    File Why
    lib/devils_dictionary/discovery/providers/openverse.ex D2's composed line; filter_dead on the first page only; the two measurements in the moduledoc
    lib/devils_dictionary/discovery/providers/pexels.ex the two stale comments (38, 330) that still said the card prints Year unknown
    lib/devils_dictionary_web/components/culture.ex the credit's text-sm → text-xs, and the measurement that chose it
    lib/devils_dictionary_web/components/thing.ex disagreement/1's latent duplicate DOM id
    test/support/discovery/conformance.ex D2's assertion: no http, under 160, on every :required row
    test/support/discovery/conformance/openverse_fixture.ex the stub honours filter_dead the way the API does
    test/devils_dictionary/discovery/conformance/openverse_commons_fold_test.exs the two credit assertions move to the new line; two added (exactly two anchors; text-xs)
    test/devils_dictionary/discovery/providers/openverse_test.exs seven tests: the composed line's four readings, and request_options/1's filter_dead
    test/devils_dictionary_web/live/culture_more_live_test.exs new, and outside the brief's file list — a LiveView test cannot live in an Openverse suite. Two tests: one click on #culture-more-text puts the second page on the rail; the control disappears when the source is out of pages
    docs/discovery/*.jpg six screenshots

    word_live.ex was not touched — the new LiveView test drives the existing handler as it is.


    Ledger

    25 live requests, every one an Openverse pagination probe, against the session's ceiling of 40:

    what requests
    page_size=12, pages 1–5, filter_dead=true 9
    page_size 6 / 10 / 20 walks 7
    filter_dead=false, pages 1–3 3
    cache-key and header probes 4
    the provider's own code driven against the live API (two pages) 2

    None went through the pipeline, so discovery_request_attempts is unchanged at 261. No image bytes persisted, no run deleted, nothing written to devils_dictionary_v2.


    Left out, named as left out

    • No dev server and no browser proof of a live page. Your server is up on 4007 from the main checkout against devils_dictionary_v2; a second node on that database is the thing the guide forbids, so I did not start one. Everything measured above was rendered through Culture.section/1 — the real component, the built stylesheet, the real Inter — over real preview_metadata read out of devils_dictionary_v2, in headless Chrome with the layout viewport emulated over CDP. What that cannot show is Load more on war moving Openverse's count against the live API, which is the one exit criterion of this phase that needs a running page. The LiveView test covers the mechanism and the fixture covers the provider; the live confirmation is still owed, and it is one click once your server is free.
    • The measurement harness is not checked in. It is four scratch files (a mix run --no-start renderer, a page wrapper, a CDP driver, a measure script). If the row-count measurement is something the project wants to keep honest over time, it wants to be a task or a test rather than a scratchpad, and that is its own change.
    • D6, for the reason in point 6 above.
    • Culture's double reasons computation. The shelf map was not opened, so it stays as noted.
    • Commons's attribution is a live risk D2 does not close. It is extmetadata.Attribution when the file has one — arbitrary uploader text, which may be a paragraph and may contain a URL. The fixture's files have none, so conformance is green; a real file that has one would sail past D2's rule at runtime. commons.ex was outside this phase's file list, so it is named here rather than fixed.
  7. holden commented on Sep 19, 2026

    @holden
    MemberAuthor

    Phase 2 audit (2026-09-19) — PR #129 @ 5c528b5, fix in 5737240 — grade A−

    Independent re-check on a fresh detached worktree: mix precommit 1,403 tests, 1 failure on the PR as pushed and 1,407 / 1 with the fix, the environmental manifest test only. The diff read in full, the four-source screenshots read, and the pagination claim checked against the live API with four requests of my own.

    Verified

    Claim Result
    D2: Openverse composes "{title}" by {creator}, {licence} Yes. The war card goes from the 155-character CC boilerplate to 50 characters; the before/after screenshots at 375 show fourteen rows become four.
    Conformance asserts no http and under 160 on every :required row Yes, on Commons, Openverse, Unsplash, Pexels and the two stubs; the fold check's credit assertions tightened.
    The pagination bug is filter_dead, not the page arithmetic Consistent with what I measured. My own walk today, page 1 then page 2 with the filter on, was contiguous — because my page 1 warmed the mask, which is the report's own account. Without the filter, page 2 begins with the one item the filter had pushed off page 1, the "exactly one repeat" the report names and the shelf folds. The fix — filter on page 1, plain paging after — is the right reading of that API. The fixture models it and the shared pagination suite catches a regression.
    Ledger unchanged at 261 Not quite. The table reads 259 now. Runs 97–111 are all present, so nothing this PR did removed rows; two attempt rows from older runs are gone, which looks like the pipeline's own cleanup on the server running on 4007. Not this PR's, noted for the record.
    LiveView test drives Load more through a two-page fixture Yes, on the offset fixture: three ids, click, five ids, two runs; and the control disappears on a short last page.
    The two Pexels comments, the disagreement id Done.

    CodeRabbit, applied in 5737240

    The one finding was a Major and real: dropping the title only when the line exceeded 72 left the creator unbounded and either field free to carry a URL, so D2's contract was asserted on fixtures rather than enforced. Both fields are now stripped of URLs and clamped — title 32, creator 60 — and the clamped creator is written to the creator field as well, so the card's link still finds the printed name. The line is under 120 by construction. One assertion changed on purpose: "the creator is never cut" became "the creator is bounded".

    Why A− and not A

    1. A stray git checkout reverted the provider file mid-session. The session said so and the tests confirm the edits are back; it still cost a re-derivation and is the kind of slip a worktree exists to prevent.
    2. The contract was measured, not enforced, until the review. The report's own numbers (Openverse's envelope 72, the card's budget 46) show it understood the budget; the code trusted upstream fields to stay inside it.
    3. No live page proof, for a good reason (your server on 4007) and with a good substitute (the real component over real metadata in headless Chrome). The one thing still owed is a single Load more on war against the live API, which nobody can do until that server is free.

    The decision the report hands back

    "Every credit at most three rows at 375" is not reachable: at the card's 96 px width a credit has to be about 46 characters, Commons's tail alone is 23, and its longest real credit is 89. The two levers are both fenced — clamping a required credit, or widening the column (D6) — and D6 cannot be measured from what the pipeline stores, because no provider persists image dimensions. My recommendation: accept that a Commons credit may run four or five rows, record it as the answer to D6 for now, and revisit width only if a design session wants it for the photographs themselves rather than for the credit. Commons's own attribution field is the residual risk D2 does not close: an uploader's free text, unbounded, on a provider file this phase could not touch.

    Verdict

    Ready to merge at 5737240. It closes #128 (the pagination fix is in this PR; the ledger half of #128 is a sentence, not a change). After merge, #126's Phase 2 box ticks and the issue closes on the D6 decision above, unless you want the column widened.

  8. added a commit that references this issue on Sep 19, 2026
  9. holden commented on Sep 19, 2026

    @holden
    MemberAuthor

    Closing (2026-09-19)

    Both phases merged: #127 (chrome) and #129 (card); main @ the #129 merge. Decisions as they ended:

    • D1 search-only shelves demote to last and take one page in total. Kept; the "hide" fallback was not needed.
    • D2 one-sentence credits, enforced by construction on Openverse and asserted on every required row.
    • D3, D4, D5 one About and one Load more per shelf, a byline of names, no Year unknown.
    • D6 — decided: the column stays. "Every credit in three rows at 375" is unreachable at 96 px without clamping a required credit, and widening cannot be measured because no provider persists image dimensions. A Commons credit may run four or five rows; that is the accepted cost of an unclamped licence line. Revisit only if a design session wants a wider frame for the photographs themselves.

    Residuals, none owned here: Commons's own attribution field is uploader free text and is not bounded (a provider-file change if it ever bites); Culture computes reasons twice per shelf; the row-count measurement harness lives in a scratchpad and is not checked in.

    #128 closed by #129.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions