Conversation
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: size-xs Label Categories
For more information, see |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
… tests - Extract chrome/types.ts (interfaces: ChromeOptions, SiteChrome, BreadcrumbItem) - Extract chrome/helpers.ts (depth, renderHreflangBlock, fallbackAlternateHref) - Extract chrome/head.ts (renderChromeHead — SEO, OG, JSON-LD, hreflang) - Extract chrome/header.ts (buildHeaderHtml — nav, CTA, breadcrumb, hero) - Extract chrome/footer.ts (buildFooterHtml — columns, badges, scripts) - Rewrite chrome.ts as thin façade delegating to sub-modules - Fix `any` type in chrome JSON-LD findIndex (replaced with typed JsonLdNode) - Add 59 comprehensive tests in chrome-decomposition.test.ts covering: - Sub-module isolation (no circular deps) - HTML5 structural correctness - WCAG 2.1 AA accessibility (skip-link, ARIA, roles) - RTL language handling (Arabic, Hebrew) - hreflang for all 14 languages - JSON-LD injection and XSS prevention - SEO meta tags (OG, Twitter Cards) - Language switcher (14 languages) - Hero banner control - Pagination rel links - All 430 existing tests pass (zero regressions) Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/e1a3c2db-9238-4874-8434-5932e8e4da99 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
…dence tests - 8 tests for NewsArticle JSON-LD (required fields, author, publisher, provenance) - 6 tests for BreadcrumbList JSON-LD (positions, validation, error handling) - 4 tests for SpeakableSpecification WebPage JSON-LD - 9 tests for markdown pipeline independence from chrome (GFM, sanitization) - 3 tests for markdown security boundaries (XSS prevention) - 3 tests for mermaid preprocessor - Total: 33 new tests, all passing Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/e1a3c2db-9238-4874-8434-5932e8e4da99 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
| import type { Language } from '../../types/language.js'; | ||
| import { LANGUAGE_META, escapeHtml } from '../../generate-sitemap-html.js'; | ||
| import { BASE_URL, GITHUB_BLOB, LANGUAGES } from '../constants.js'; |
| * @license Apache-2.0 | ||
| */ | ||
|
|
||
| import type { Language } from '../../types/language.js'; |
| */ | ||
|
|
||
| import type { Language } from '../../types/language.js'; | ||
| import { LANGUAGE_META } from '../../generate-sitemap-html.js'; |
| readonly publishedIso?: string; | ||
| /** ISO-8601 date for `article:modified_time` / `og:updated_time`. */ | ||
| readonly modifiedIso?: string; | ||
| /** JSON-LD blob(s) appended inside `<head>`. Already-stringified objects. */ |
| ${hreflangHtml} | ||
|
|
||
| <link rel="sitemap" type="application/xml" href="/sitemap.xml"> | ||
| <link rel="alternate" type="application/rss+xml" title="Riksdagsmonitor news (${escapeHtml(meta.nativeName)})" href="${opts.rssHref ?? '/rss.xml'}"> | ||
| ${pagerLinksHtml} |
|
@copilot apply changes based on the comments in this thread |
- Remove unused Language/BASE_URL imports from header.ts
- Remove unused Language import from footer.ts
- Switch all chrome sub-modules from generate-sitemap-html.js (CLI side effects)
to scripts/sitemap-html/index.js (pure exports: LANGUAGE_META, escapeHtml)
- Fix jsonLd docstring in types.ts: clarify plain objects are expected (not
pre-serialised strings) since head renderer calls JSON.stringify internally
- Align RSS href default in head.ts with footer: use per-language /rss_{lang}.xml
for non-English (was always /rss.xml regardless of lang)
Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/971dbb8c-8f37-4274-962a-887ce3c118a1
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Applied all 5 review changes in 98f7a45:
All 105 affected tests still pass, ESLint clean. |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
|
@copilot failing checks |
TypeScript type-check (scripts) was failing with TS6196 because SiteChrome was imported but never referenced in the test file. Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/df174842-32f7-4138-acaa-8f15122fb240 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Fixed in aec5636. The TypeScript type-check (scripts) was failing with TS6196 because |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
chrome.ts(742 lines) into focused sub-modules (head, header, footer, helpers, types) each ≤200 linesanytype in chrome.ts (replaced with typedJsonLdNodeinterface)Language/BASE_URLimports fromheader.tsandfooter.tsgenerate-sitemap-html.js(CLI side-effects) withsitemap-html/index.jsin all chrome sub-modulesjsonLddocstring: clarify plain objects required (not pre-serialised strings)/rss_{lang}.xmlSiteChromeimport inchrome-decomposition.test.ts(caused TS6196 type-check failure)