Conversation
…n all news/*.html Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/75333b42-6233-49a1-8eda-1962ba136c92 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
…m-chrome refactor Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/154123b2-4def-414b-aaff-07ed16763857 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
…lternateBase Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/87cc190e-505c-413d-a1e9-02eea00d08fc Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/87cc190e-505c-413d-a1e9-02eea00d08fc Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
…hrome Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/87cc190e-505c-413d-a1e9-02eea00d08fc Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
…rome Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/87cc190e-505c-413d-a1e9-02eea00d08fc Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: documentation,html-css,translation,testing,refactor,size-xl,news Label Categories
For more information, see |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR centralizes the HTML “chrome” (head/header/footer, SEO JSON-LD, theme toggle, language switcher, skip-link target) for generated pages (news indexes, sitemap, political-intelligence) by reusing scripts/render-lib/chrome.ts (buildChrome / renderChromeHead) and updating tests/docs accordingly.
Changes:
- Extend
buildChrome/renderChromeHeadwithbreadcrumb,ogType, anddefaultAlternateBase, plus theme anti-flash bootstrap and runtime script injection. - Update generator-facing test suites to assert the unified chrome contract (IDs/classes, JSON-LD serialization format, og:type behavior).
- Add styling for the unified header theme toggle button and update generated HTML/doc artifacts accordingly.
Reviewed changes
Copilot reviewed 89 out of 112 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/render-lib.test.ts | Adds unit coverage for new chrome options (theme toggle, anti-flash, breadcrumb override, alternate fallback, ogType). |
| tests/generate-sitemap-html.test.ts | Updates assertions to the unified chrome contract (skip-link target #main, compact JSON-LD, footer/header parity). |
| tests/generate-political-intelligence.test.ts | Aligns PI generation expectations with unified chrome (JSON-LD formatting, skip-link, header/footer structure). |
| tests/generate-news-indexes.test.ts | Retargets news index tests to canonical header/footer, app-version marker, and JSON-LD serialization behavior. |
| styles.css | Introduces .rm-theme-toggle styling consistent with the unified header chrome. |
| scripts/render-lib/index.ts | Re-exports BreadcrumbItem type for consumers. |
| scripts/render-lib/chrome.ts | Implements BreadcrumbItem, breadcrumb, defaultAlternateBase, ogType, anti-flash theme bootstrap, header theme toggle, and runtime script injection. |
| news/2026-04-21-realtime-1353-sv.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-21-realtime-1353-en.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-21-motions-sv.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-21-motions-en.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-21-evening-analysis-sv.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-21-evening-analysis-en.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-20-motions-sv.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-20-motions-en.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-20-evening-analysis-sv.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-20-evening-analysis-en.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-19-realtime-1219-sv.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-19-realtime-1219-en.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-19-month-ahead-sv.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-19-month-ahead-en.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-19-deep-inspection-sv.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-19-deep-inspection-en.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-18-realtime-1705-sv.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-18-realtime-1705-en.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-17-realtime-1434-sv.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| news/2026-04-17-realtime-1434-en.html | Regenerated output reflecting unified chrome (theme bootstrap/toggle, updated timestamps, injected loader). |
| analysis/daily/2026-04-26/monthly-review/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-26/month-ahead/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-25/monthly-review/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-25/month-ahead/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-24/propositions/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-24/motions/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-24/interpellations/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-24/evening-analysis/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-24/committeeReports/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-23/motions/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-23/monthly-review/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-23/month-ahead/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-23/committeeReports/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-22/realtime-2338/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-22/evening-analysis/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-21/realtime-1353/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-21/motions/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-21/evening-analysis/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-21/committeeReports/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-20/motions/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-20/interpellations/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-20/evening-analysis/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-19/realtime-1219/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-19/monthly-review/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-19/month-ahead/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-19/deep-inspection/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-18/weekly-review/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-18/realtime-1705/article.md | Updates generated_at timestamp from regeneration. |
| analysis/daily/2026-04-17/realtime-1434/article.md | Updates generated_at timestamp from regeneration. |
| Article-Generation.md | Documents the new runtime injection approach for Mermaid/back-to-top/theme-toggle and the anti-flash bootstrap. |
|
@copilot analyse root cause of Test News / News & Sitemap Tests (cypress/e2e/news-page.cy.js) (pull_request) and adress root cause and improve changed code from all perspective. regenerate html , analyse, iterate and improve |
Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/5516d7cf-01ed-4225-8adf-b8e1202fca9c Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Root-caused and fixed in dced8d4. Two root causes behind the 3 Cypress failures (
Vitest still 2157/2157 ✓; news-index regenerated (14/14 files, 2746 articles). |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
|
@copilot continue improve still 89 passing (33s)
❌ Test failures detected in spec. Use the --bail flag to stop the run on first failing spec. failing checks |
Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/b73216c2-7547-4f71-a0f9-03be3edafe25 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Fixed in de10b28. Root cause: the site correctly emits Fix: added optional |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…gression in PR #2012) Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/ee35cfe2-dcb2-42a4-86a0-bcbb9c7969ea Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Plan — unify generated-page chrome via
render-lib/chrome.tsLANGUAGE_META[lang].translations.Cypress regressions fixed
Run 24957929765 (news-page.cy.js · 3 failures) — fixed in
dced8d4<h1>in news/index — restored as<header class="news-page-heading"><h1>${t.title}</h1></header>to mirror sitemap and PI.<details>lang-switcher dropdown was clickable — gateddisplay: flexbehind.rm-lang-switcher[open]. Cypress click selector tightened to:visible.Run 24958216054 (sitemap.cy.js · 1 failure) — fixed in this commit
Norwegian Sitemap (no) → should have proper lang attribute for Norwegianexpectedlang="no"but gotlang="nb". The site correctly emits BCP-47nbfor Norwegian Bokmål (perLANGUAGE_META[no].hreflang = 'nb'and the repo-wide instruction "Norwegian uses BCP-47nb(preferred)"); only the file slug stayssitemap_no.htmlfor backward-compat URLs. The Cypress test was hard-codingcode(the slug) as the expected lang value. Updated the Norwegian fixture to{ code: 'no', lang: 'nb' }and the assertion tocy.get('html').should('have.attr', 'lang', lang ?? code). All other 12 locales unchanged.Vitest still 2157/2157 ✓.