Skip to content

Fix a clipped metric strip, unify the diagram fonts, trim validation, and document driving the model directly - #187

Merged
vahid-ahmadi merged 1 commit into
mainfrom
fix/ui-fit-fonts-and-trim
Aug 26, 2026
Merged

Fix a clipped metric strip, unify the diagram fonts, trim validation, and document driving the model directly#187
vahid-ahmadi merged 1 commit into
mainfrom
fix/ui-fit-fonts-and-trim

Conversation

@vahid-ahmadi

Copy link
Copy Markdown
Contributor

The metric strip was clipped, not scrolling

Measured on the live page: inside a scrollytelling column the four-up vmet-strip has 562px and needs 659px, and its overflow-x is visible — so the fourth stat (free-running, 4.48% MAPE) was cut off with no way to reach it.

The cause: the existing four-up rule is a min-width: 720px viewport media query, which can't see that the column it sits in is 562px wide at a 1440px viewport.

Two-up inside .scrolly-steps, four-up again past 1500px. Verified against the live DOM:

before  client 562  scroll 659   <- clipped
after   client 562  scroll 562   <- fits

The wide tables in the same column are fine — they're overflow-x: auto, so they scroll rather than clip.

Fonts

The methodology diagrams hardcoded font-family="Roboto, sans-serif" in 54 places and "JetBrains Mono, monospace" in 8. The site's body face is Inter (--body) — Roboto is only the fifth fallback in that stack — so every label in those diagrams rendered in a visibly different typeface from the rest of the site, and none would follow a token change. All 62 now use var(--body) / var(--mono).

Validation text

Seven blocks trimmed — the intro, the anchored lead-in, and the longest configuration-table cells, which were also what made that table scroll furthest in the narrower column. No fact removed.

Driving the model directly

The overview described only the PolicyEngine bridge, so nothing on it told a reader the model can be driven on its own. Adds the direct route: pe-macro obr-shock, the equivalent run_reform call with no PolicyEngine dependency, the five levers, and a pointer to the caveats — since two of them don't work.

Paper

Removed the paper-result summary paragraph from papers/obr-macro as requested.

The .tex is deliberately not edited. There's no LaTeX toolchain on this machine, so main.pdf couldn't be rebuilt and the published PDF would contradict its own source. Review findings are reported separately — several are material.

Testing

Site suite 1564 passed; site_contract.py and site_nav.py clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lcj9DDqam9KmVCfhEdnJcJ

… and

document driving the model directly

## The metric strip was clipped, not scrolling

Measured on the live page: inside a scrollytelling column the four-up
vmet-strip has 562px and needs 659px, and its overflow-x is `visible`,
so the fourth stat (free-running, 4.48% MAPE) was cut off with no way to
reach it. The existing four-up rule is a `min-width: 720px` VIEWPORT
media query, which cannot see that the column it sits in is 562px wide
at a 1440px viewport.

Two-up inside `.scrolly-steps`, four-up again past 1500px. Verified
against the live DOM: scrollWidth 659 -> 562, no overflow.

The wide tables in the same column are fine -- they are `overflow-x:
auto`, so they scroll rather than clip.

## Fonts

The methodology diagrams hardcoded `font-family="Roboto, sans-serif"` in
54 places and `"JetBrains Mono, monospace"` in 8. The site's body face is
Inter (`--body`); Roboto is only the fifth fallback in that stack, so
every label in those diagrams rendered in a different typeface from the
rest of the site, and none of them would follow a token change. All 62
now use `var(--body)` / `var(--mono)`.

## Validation text

Seven blocks trimmed -- the intro, the anchored lead-in and the longest
configuration-table cells -- which is also what was making that table
scroll furthest in the narrower column. No fact removed.

## Driving the model directly

The overview described only the PolicyEngine bridge, so nothing on it
told a reader the model can be driven on its own. Adds the direct route:
`pe-macro obr-shock`, the equivalent `run_reform` call with no
PolicyEngine dependency, the five levers, and a pointer to the caveats --
since two of them do not work.

## Paper

Removed the `paper-result` summary paragraph from papers/obr-macro as
requested. The .tex is NOT edited: there is no LaTeX toolchain here, so
main.pdf could not be rebuilt and the published PDF would contradict its
own source. Findings reported separately.

Site suite 1564 passed; contract and navigation clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lcj9DDqam9KmVCfhEdnJcJ
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
macromod Ready Ready Preview Aug 26, 2026 12:33pm

Request Review

@vahid-ahmadi
vahid-ahmadi merged commit 3d7330c into main Aug 26, 2026
6 checks passed
vahid-ahmadi added a commit that referenced this pull request Aug 26, 2026
My own fix in #187 reintroduced the bug it repaired. I added
@media (min-width: 1500px) to restore the four-up strip on large
screens, on the assumption that a wide viewport means a wide column. It
does not: the column width is set by the scrolly grid. Measured on the
live page at a 1728px viewport, that query matched while the column was
still 562px, so the strip went back to four-up and clipped again --
exactly the failure mode, from the other side.

The column width is a container property, so this has to be a container
query. Two-up is now the floor, and four-up returns only when the column
itself passes 700px.

Verified against the live DOM: container queries supported, column
588px, columns resolve to 281px + 281px, scrollWidth 562 == clientWidth,
no clipping.
vahid-ahmadi added a commit that referenced this pull request Aug 26, 2026
* Bump the CSS cache key, and stop flex breaking inline links

Two bugs, both found by measuring the live page rather than the source.

## The CSS fix from #188 was not reaching browsers

style.css is cache-busted by a hand-written `?v=N` in each page's link
tag, and it had sat at v=3 since #180. #187 and #188 both changed
style.css without bumping it, so any browser that had already loaded
`/style.css?v=3` kept serving the old file from cache and never saw the
container-query fix -- confirmed on the live page: the deployed CSS
contained the rule, the browser did not, and the strip stayed clipped
until the stylesheet was reloaded under a different URL.

Bumped to v=4 across 62 pages. Worth noting for future CSS changes: the
version is manual, so it has to move whenever style.css does, or the fix
ships to the CDN and stops there.

## An inline link was breaking mid-word

`.vmet-notes-line` was `display: flex`, which makes EVERY child its own
flex item -- including the inline <a> in the "gated" note. It shrank to
40px and broke "working paper" across three lines, splitting the word.

Replaced with a hanging indent, which reproduces the same key/body look
while leaving inline content in normal flow. Only two pages use this
component and only one line in it carries a link, so the blast radius is
small.

Site suite 1564 passed; contract clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lcj9DDqam9KmVCfhEdnJcJ

* Bump the CSS version in the topic-page generator too

The economy topic pages are emitted by economy/topics.py, which carries
its own copy of the stylesheet link. Bumping the committed HTML without
bumping the template made the two disagree, and the 'Economy topic pages
match committed data' gate caught it. Template updated and all 11 pages
regenerated.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
vahid-ahmadi added a commit that referenced this pull request Aug 26, 2026
Six models described in six paragraphs made the reader do the comparison
themselves: to find out which model answers over which horizon, you had
to read all six and hold them in your head. The information is
two-dimensional, so it is now drawn that way.

The map places each model on one shared time axis -- recent past, coming
quarters, three to five years, decades -- and splits UK from US into
lanes. Where a model sits IS the answer to "which one do I want": the
recent past is boe-svar, a UK reform three to five years out is
obr-macro, decades is psl-og, climate scenarios is define-uk, and the US
pair sits in coming quarters.

Evidence strength is in the shape rather than a label: a solid outline
means the model is checked against an external published anchor, a
dashed one means no independent outcome benchmark exists. That puts
psl-og and define-uk visibly apart from the other four, which is the
honest reading and the thing a table buried in a column.

The six evidence statements are kept in full, in the key/value grid
fixed in #192, so nothing that made this section worth reading is lost
-- only the arrangement changed.

Details: every pill is a link to its model page, with hover and
focus-visible states. Fonts come from --body/--mono rather than a
hardcoded family (the #187 lesson). Colours are all tokens, so it
follows the theme. Below 720px the map is hidden and the evidence lines
carry the section alone, because a two-dimensional layout stops being
readable at that width.

Verified geometrically: no pill overlaps another, all six sit inside the
viewBox, every label falls within its own pill, and no font-family is
hardcoded. The Vercel preview is SSO-protected so it could not be
eyeballed before merge.

Cache key v=6 -> v=7, template included.

Site suite 1564 passed; contract and generator clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lcj9DDqam9KmVCfhEdnJcJ
vahid-ahmadi added a commit that referenced this pull request Aug 26, 2026
Six models described in six paragraphs made the reader do the comparison
themselves: to find out which model answers over which horizon, you had
to read all six and hold them in your head. The information is
two-dimensional, so it is now drawn that way.

The map places each model on one shared time axis -- recent past, coming
quarters, three to five years, decades -- and splits UK from US into
lanes. Where a model sits IS the answer to "which one do I want": the
recent past is boe-svar, a UK reform three to five years out is
obr-macro, decades is psl-og, climate scenarios is define-uk, and the US
pair sits in coming quarters.

Evidence strength is in the shape rather than a label: a solid outline
means the model is checked against an external published anchor, a
dashed one means no independent outcome benchmark exists. That puts
psl-og and define-uk visibly apart from the other four, which is the
honest reading and the thing a table buried in a column.

The six evidence statements are kept in full, in the key/value grid
fixed in #192, so nothing that made this section worth reading is lost
-- only the arrangement changed.

Details: every pill is a link to its model page, with hover and
focus-visible states. Fonts come from --body/--mono rather than a
hardcoded family (the #187 lesson). Colours are all tokens, so it
follows the theme. Below 720px the map is hidden and the evidence lines
carry the section alone, because a two-dimensional layout stops being
readable at that width.

Verified geometrically: no pill overlaps another, all six sit inside the
viewBox, every label falls within its own pill, and no font-family is
hardcoded. The Vercel preview is SSO-protected so it could not be
eyeballed before merge.

Cache key v=6 -> v=7, template included.

Site suite 1564 passed; contract and generator clean.


Claude-Session: https://claude.ai/code/session_01Lcj9DDqam9KmVCfhEdnJcJ

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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