Skip to content

r5 UI: question router on /models, copy-paste /connect, glossary, home and contact - #204

Draft
vahid-ahmadi wants to merge 37 commits into
vahid/redesign-r2-integratefrom
vahid/r5-ui-home
Draft

vahid-ahmadi wants to merge 37 commits into
vahid/redesign-r2-integratefrom
vahid/r5-ui-home

Conversation

@vahid-ahmadi

@vahid-ahmadi vahid-ahmadi commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #200 (vahid/redesign-r2-integrate). Round 5 UI pass on the front door: home, /models, /connect, /contact, a new /glossary, and the shared shell (footer, sub-tab icons, STYLE_VERSION 20). No numbers were added or changed. Every verdict and failure statement is still there; some moved into expanders.

What changed

  • /models#choose: question router. The seven-row accordion is now a grid of model cards you can filter by question (cost a reform, forecast, shock, who gains and loses, decades, climate) and by country. Each card shows the question it answers, the model name and id, the country, and the check class. It links to the model, its evidence, its results and its paper. The old accordion text sits in the card's "What it is, strengths and limits" expander. If no model matches, an empty-state line says so (for example, forecast + US gives "No model here answers that question for that country"). The US-reform gap is now a "Not covered" card in the grid, so it is always visible.
  • /connect: copy-paste onboarding.
    • The half-empty two-sided panel is gone. The page is now one column with three numbered steps.
    • Step 1 is now: copy the URL, pick a client (its instructions and terminal command show together), then copy a prompt. The terminal commands used to sit in an expander with an upper-case label.
    • The CLI commands were six nested cards. They are now copy rows (label, command, copy).
    • The 8-tab model picker is now a setup list that shows all eight models at once.
    • Limits are label/value rows. This also fixes the "Uk microdata" casing, and the tools table head is now sentence case.
    • Code no longer uses ligatures, so >= and == show as typed (the hosted.py install line used to show ≥).
  • Sub-tab icons. The /models and /connect tabs fell back to a generic document icon. Each tab now has its own icon: signpost, table, link, check, book, plug, terminal, code, wrench, alert.
  • /glossary (new). 27 terms from the site's own trust wording (anchor, by construction, free-running, deltas only, outturn, vintage, credible band, drifting random walk, forecast skill, incidence, SVAR/HANK/OLG/SFC, MCP, job, cold start). Each term links to where it matters. The page is linked from the footer, the home verdict list and the contact page, and is in the sitemap.
  • Home. The h1 now says what the site is: "Open economic models for UK and US policy". The lede says what you can do, followed by one audience line. The start cards are now questions.
  • Contact. Three self-serve routes under the email card: report a wrong number (GitHub issues), run a model, read the glossary.
  • Footer. Adds Glossary and Report an issue. site_nav.py --write restamped all 66 pages, and STYLE_VERSION is now 20.

Checks

  • pytest: 1180 passed, 1 failed.
  • The failure is test_model_cards_quote_the_capability_registry (us-hank Status row). It is not caused by this PR: on us-hank/index.html this branch changes only the footer and stylesheet lines. It comes from the base branch's latest commit and is left for the correctness owner.
  • site_contract.py, site_nav.py and every generator --check pass.
  • Link check: 66 pages, 0 broken.
  • No horizontal scroll at 375 px on any page I touched.

Screenshots: scratchpad/shots/r5/ui-home/ (before_* / v2_* / v3_*).

FRB/US multipliers hub row (d6eb922, macro#209)

The models/validation FRB/US purchases row now reads against CBO's converted ranges and the 2010 FRB-US lines, not "the pegged-rate cross-model range". It matches frb-us/validation (#206) and us-frb-model docs/benchmarks.md.

🤖 Generated with Claude Code

vahid-ahmadi and others added 4 commits November 6, 2026 00:42
…t, glossary, home hero and contact routes

- /models#choose: seven model cards (question, name, country, check class,
  links to model, evidence, results, paper) filtered by question and country,
  with an empty state; accordion content kept in each card's expander
- /connect: three numbered steps in one column (no half-empty side panel),
  URL, client instructions and terminal command together, prompts and CLI
  commands as copy rows instead of nested cards, model setup as a list,
  limits as label/value rows (fixes 'Uk microdata'), sentence-case table head
- /glossary: 27 terms from the site's own trust vocabulary, each linked to
  where it matters
- home: h1 says what the site is, lede says what you can do, audience line,
  start cards as questions; contact: three self-serve routes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… footer glossary and issue links

Sub-tabs on /models and /connect get an icon per target instead of the
generic document; code renders without ligatures so '>=' and '==' read as
typed. Footer adds Glossary and Report an issue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed' card

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
macromod Ready Ready Preview Nov 6, 2026 3:52am UTC

Request Review

vahid-ahmadi added a commit that referenced this pull request Nov 6, 2026
#206 and #205 merge without a conflict

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi and others added 2 commits November 6, 2026 00:56
…y link, inset focus ring on tab rows, copy button clear of code, AA contrast on tinted tiles and code comments, pipeline links not hidden by role=img

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fits on one line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi and others added 2 commits November 6, 2026 00:58
… card); papers cards read 'Read →' in sentence case, pinned to the card bottom

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…olls sideways, so its pre takes keyboard focus

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vahid-ahmadi

Copy link
Copy Markdown
Contributor Author

r5 shared components (commits 63c0cea, ab870b2):

  • Keep reading row is one level. The where-next section on all 63 pages that carry it was a card of tiles inside a section card. It now draws as the Autumn Budget landing does: the section head (icon badge + title) and the entry tiles sit straight on the canvas, with no white card around them. CSS only, in the r5:ui-home section of style.css. The markup is unchanged, so the hand-written pages, site_nav.where_next and the generators that import it (economy/topics.py, notes/generate_release_notes.py) need no change, and every generator --check still passes.
  • Papers cards on /models. The lowercase mono read → is now Read → in the body face. It is pinned to the card bottom, so the row lines up across cards of different lengths.
  • The router cards' bottom-aligned action rows and the US HANK Survey link (so the row no longer wraps) came in QA's commits ac7d019 and 63cf919. The 1440 shots confirm both.
  • STYLE_VERSION 20 → 21; site_nav.py --write restamped 66 pages.

Checks: pytest 1181 passed, site_contract, all site-provenance generator --checks, and the link check (0 broken) all pass. Screenshots at 1440 and 375 of /pe, /economy/topics/rates, /notes/releases, /papers/boe-svar, /forecasts and /models: no horizontal scroll at either width.

Open: two notes pages (ui-data's area) still carry a lowercase where next kicker in the head. A request to change it has been filed for #205.

🤖 Generated with Claude Code

@vahid-ahmadi

Copy link
Copy Markdown
Contributor Author

QA on the combined preview of #204 + #206 + #205 (local branch, not pushed): 66 pages at 1440 and 375 px, axe (WCAG 2.1 AA), keyboard focus, landmarks and headings, anchors, page weight, console.

Fixed here (ac7d019, 63cf919, e1dd4bc):

  • /models router: the expander and action row now sit at the bottom of every card (details.about margin was beating .mcard-more); the US HANK link reads "Survey" (screen-reader text "the HANK survey") so the row fits on one line at 1440 and 375 px.
  • The pipeline on /models was role="img", which hid its two links from screen readers; it is now role="group".
  • The focus ring on the sub-tab rows was clipped by the row's overflow-x; it is now drawn inside the tab.
  • AA contrast: .stat-sub on tinted tiles and code comments and the copy button on code blocks were 4.4:1; they now use --text-muted. The axe re-run is clean.
  • The "copy" button no longer covers long commands, and the scrolling combine command takes keyboard focus.

Merge note: all three r5 style.css sections appended at the same EOF point. #206 moved its block, and #205 has been asked to move its block, so 204 → 206 → 205 merges without conflicts. Full list: r5/qa.md.

🤖 Generated with Claude Code

Home verdicts stop dropping failures: the record now says unemployment
landed outside its 90% band; US HANK, OG-UK, DEFINE-UK, FRB/US and
PolicyEngine verdicts state their limits in words. /models#validation is the
one place the verdict figures live (vphi -17.3%, DEFINE gates, 0.30% MAPE,
64 tests, 49 origins); home and router cards link to it. 'Every matched
year' -> the one matched year; US-static line kept once (router gap card);
OG-UK 'Scores reforms: Yes' qualified; 'nothing quotable' replaced; SVAR
band line now says bands under-cover across 49 origins. Connect: forecast
prompt carries the no-skill note; HANK prompt matches its output
(liquid-wealth quartiles). Glossary: add-factor, design-gated,
paper-anchored, frozen edge, noise floor, release-to-release gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vahid-ahmadi

Copy link
Copy Markdown
Contributor Author

Neutrality copy (6928e71), from the r5 neutrality review, every claim re-checked against its source page:

  • Home: the record now says CPI landed inside its 68% band and unemployment landed outside its 90% band (it had only mentioned CPI). PE, OBR, FRB/US, US HANK, OG-UK and DEFINE-UK verdicts now state their limits in words.
  • /models#validation is the one place the verdict figures live (vphi −17.3%, DEFINE −0.30pp/0.01pp gate, −23.3% emissions, 0.30% MAPE, 64 tests, 49 origins). Home and the router cards use words and link to it.
  • 'Every matched year' → the one matched year (2026–27). The US-static line is kept once, in the router gap card (#us-reform-gap). OG-UK 'Scores reforms: Yes' is qualified. 'Nothing quotable' is replaced.
  • Connect: the forecast prompt carries a no-skill note. The copied text is unchanged. The HANK prompt now matches its output (liquid-wealth quartiles).
  • Glossary: new entries for add-factor, design-gated, paper-anchored, frozen edge, noise floor and release-to-release gap.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi added a commit that referenced this pull request Nov 6, 2026
…nnable topic pages

- style.css: the r5:ui-data block moves above the base ".kv.kv-text" rule;
  EOF is byte-identical to base, so #204 -> #206 -> #205 merge cleanly.
- frb-us: Status row back to the base wording (registry + README with it),
  so the row next to #206's "Joins the microsimulation ... step 3" edit no
  longer conflicts. obr-macro and boe-svar status changes stay.
- Model names, not code ids: scoreboard Round, archive Model, fan titles,
  descs and legends say "BoE SVAR" (id as .model-id) and "BoE SVAR
  unemployment satellite"; svar overview chart title. Render-time only;
  scorecard.json unchanged.
- Tile dates/periods wrap in .nowrap.
- Topic command blocks: <pre tabindex="0" aria-label="Command">.
- Notes pages: Keep reading head uses data-icon="link", no "where next" kicker.
- /forecasts: Limits section moves up beside the scoreboard (rail order too).
- UK growth/inflation topics: answer line, chart, then limits and table in
  expanders; jobs: mapping and round limits in expanders. No number changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi added a commit that referenced this pull request Nov 6, 2026
…e eager script tag goes), so #206 merges cleanly with the #204 shell restamp

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d papers are their own tabs

/models was one 13k px page on phones. Each former section now lives on its
own page under /models/, with a generated SUBTABS row ("Models pages"), so a
new /models/* page joins the row by being listed in site_nav.SUBTABS. Old
/models#<id> links still resolve (stub ids on the router + a hash redirect).
vercel.json redirects point at the new tabs. The UK route table moves to
/models/combine#routes (copied verbatim from #205's /forecasts block, minus
its forecasts-only callout). Glossary terms are linked at first use on home
and the /models pages. STYLE_VERSION 22.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi added a commit that referenced this pull request Nov 6, 2026
…lary)

The status vocabulary pass on #204/#206/#205/#219 (macro #227) dropped
'validated' from every status line. The HANK adapter caveat, CLI help,
module comment, MCP tool docstring, summary and shock framing still said
'validated replication' or 'steady state validated'. They now say partial
replication: six of seven solved steady-state parameters match; IRF
magnitudes are not validated. Registry status strings and README table are
left to #205/#206 (no change here, so the merge is order-independent).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi added a commit that referenced this pull request Nov 6, 2026
canaries.json pinned quoted_at to page:line. Merging the stack (#204, #206,
#205, #219 into #200 before or after this PR) moves those lines, so seven
test_quoted_at_points_at_a_real_line cases failed on the merged tree though
every quote was still on its page. quoted_at now names the page; the line is
located from quoted_anchor at report time, and the test requires the anchor
exactly once on the page, so editing the quoted number still forces the
canary to be revisited. No expected values changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tags; connect step badges match the site's step style (r5 fresh-eyes)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vahid-ahmadi

Copy link
Copy Markdown
Contributor Author

r5 fresh-eyes pass (merged preview of #204+#206+#205+#219, all 71 pages shot at 1440, 15 at 375). Full ranking: scratchpad r5/fresh-eyes.md. No numbers changed, no failure statement removed; pytest, site_contract, linkcheck and generator --check pass on this branch and on the four-way merge, which merges cleanly.

Pushed 83ab86a on this PR:

  • /glossary term index: column link list in a card in place of 36 pills.
  • hosted / local tags: neutral outline (orange read as a warning grade).
  • /connect step badges: tinted like .meth-step-num.
    Needs a STYLE_VERSION bump at the end (not done here). Not fixed: long inline Python on /connect, 7-line home lede at 375, two adjacent card rows with Open vs Explore on /models (models/index.html had someone else's uncommitted edit).

…_VERSION 23 and site_nav --write

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tes the lines beside it (avoids a merge conflict; #206 carries v=23 there)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi added a commit that referenced this pull request Nov 6, 2026
…N bump (the lines beside it change on this branch, so the bump lands here to merge cleanly)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vahid-ahmadi

Copy link
Copy Markdown
Contributor Author

Phone length (r5): the home lede is now 3 lines at 375. It keeps its first clause; "Read forecasts scored against the outturns" and the engine sentence move into the audience line, wording unchanged. STYLE_VERSION goes 22 → 23 and site_nav.py --write has been run. The six methodology pages keep v=22 here because #206 carries their v=23 line (it edits the lines beside it), so the two merge cleanly. models/index.html: only its stylesheet line is committed; another agent's uncommitted edit is left in the worktree.

Merged base+204+206+205+219: no conflicts, 1248 tests pass. One fails: test_page_is_current, because #219's compare page embeds v=22. Run python3 models/compare/build.py once both are in. Shots: scratchpad shots/r5/plen/home375_ba.png.

🤖 Generated with Claude Code

… the define limits table (define #20)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi and others added 2 commits November 6, 2026 03:17
…spending-multiplier sign) on its validation page (#227)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ies the same line, so no conflict now)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ESS, priors, IRF, FEVD, closure, Gauss-Seidel, MCE, MPC, hand-to-mouth, rstar and more); link first uses on /connect and /models tabs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…py (#205); posterior link requested there

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vahid-ahmadi

Copy link
Copy Markdown
Contributor Author

Glossary, round 5 (8a1bbc4 + cc61422)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…angelog entries)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stacked PRs all edited the same [Unreleased] lines, so they conflicted
with each other once one merged. #200 now carries every redesign-stack
bullet, grouped by PR number.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi added a commit that referenced this pull request Nov 6, 2026
#205 already contains #204's changelog commit; taking #204's revert of it
keeps CHANGELOG.md out of #205's diff in either merge order (#204 first or
#205 first).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 23b098aa Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant