* fix(deps): minor and patch bumps; give astro2tsx a matching emnapi runtime
* fix(deps): move to @vite-pwa/astro 2.0.1; retire the glob and serialize-javascript overrides
* refactor(scripts): line-based ES-syntax check in check:sw (Sonar S8786)
Supersedes Dependabot #67 and #68.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- fix(vt-recheck): keep the URL fragment, as VirusTotal's API does
- test(vt-recheck): stop reading live security values
- chore(release): v1.2.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- feat(security): VirusTotal re-check — assisted, never decided (D30)
- fix(copy): say what the dated security note now rests on
- docs: VirusTotal re-check (docs/12 §4b, D30); checkedAt = latest scan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- chore(toolchain): Node 26 and TypeScript 6/7 side by side
- test: measure every analysed source; fix the date refinement crash
- ci: SonarQube Cloud CI-based analysis with coverage
- docs: Node 26, TypeScript 6/7, SonarQube Cloud CI analysis (D28, D29)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- docs: CHANGELOG for 1.1.0; README and CLAUDE.md caught up
- fix(sonar): Number.NaN over the global NaN (S7773)
- feat(gate): an icon tile on each step of the legal gate
- feat(build): check-feed — assert the emitted RSS that notify.py trusts
- feat(contact): /contact and /vi/contact — one address per purpose (D27)
- feat(ui): "Harbor" refresh — tokens, header, home, cards, detail, footer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- fix(check-csp): match end tags the way the HTML tokenizer does
- ci(deps): keep @types/node on the Node major in .nvmrc
- test: Playwright + axe e2e, script tests, island coverage, CI gates
- fix(sort): pin the category-page and API orders to the data
- fix(a11y): keep the visible EN/VI code in the switcher's accessible name
- fix(nav): reliable cross-document View Transitions opt-in
- feat(data): enforce the data rules CONTRIBUTING promised; fix quarantine flow
- feat(prefs): display menu with theme, custom scrollbar and motion choices
- fix(i18n,a11y): real small type, translated chips and errors, nav semantics
- fix(search): race-free search with URL state, stable sort and relevance
- fix(pwa): installable app, styled offline page, prompt SW updates, head fixes
- refactor(scripts): hashed pre-paint scripts, CSP meta first, richer error log
- refactor(nav): replace <ClientRouter /> with native cross-document view transitions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Squashed from 8 signed commits:
- chore: normalise line endings to LF with .gitattributes
- fix(deps): refresh dependencies and close every open advisory
- style: adopt prettier-plugin-astro 1.x formatting
- fix: resolve the SonarCloud findings in scripts and issueUrl
- ci: pin actions to SHAs, fix notify/quarantine/link-check, add Dependabot config
- fix(headers): stop Cache-Control concatenation that disabled asset caching
- fix(theme): guard storage access in the pre-paint theme script
- chore(config): TS6-safe tsconfig, type-aware lint, gated build script
Each commit's full rationale is preserved on the PR (#21).
Verified on the Workers Builds preview: hashed assets now carry a single
`Cache-Control: public, max-age=31536000, immutable`, the JSON feeds a single
`max-age=300`, security.txt is utf-8, and preview hosts send noindex.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Service worker: omitting `navigateFallback` does not disable it —
vite-plugin-pwa defaults it to index.html, so the SW registered
NavigationRoute(createHandlerBoundToURL('/')) and threw non-precached-url
on every SW-handled navigation. Had '/' been precached it would have
served the home page for every navigation instead, silently. Fixed with
navigateFallback: '' and a new `pnpm check:sw` gate that asserts the
emitted sw.js rather than the config.
Repo docs: README, CONTRIBUTING (inclusion criteria, gates, auto-close
list) and CODE_OF_CONDUCT (Contributor Covenant 2.1 by reference).
A meta CSP applies at parse time and a ClientRouter swap does not reparse,
so the policy in force stays the origin page's. Any style only some pages
carry is refused on arrival from a page that lacked it.
/apps alone carried ShAppCard's scoped CSS, so soft-navigating there from a
detail page dropped the stretched-link ::after (the whole-card click target)
and unhid .sr-only text.
build.inlineStylesheets: 'never' ends the category — external stylesheets
need no hash under style-src 'self'. check:styles now fails on any style
only some pages allow.
Verified on the built output: zero violations across seven navigations.
The last console error was `style-src-elem`: Astro emits a per-slug
`<style>` for `transition:name` and omits its hash from the page's own
CSP, so the browser refused it on hard loads and swaps alike.
Removing the directive costs nothing — a morph needs the name on both
sides and ShAppCard never had one, so it had never animated — and drops
~1.5 MB of CSS the browser was already discarding. The cross-page fade is
untouched.
`check:styles` now also hashes every `<style>` element against the page's
own CSP. It had only ever inspected `style="…"` attributes, which is how
this shipped green. Verified by reintroducing the directive: it flags all
652 affected pages.
The reported overlap - page content bleeding through the sticky header - was
not a layout bug. The header's computed background-color was rgba(0,0,0,0):
fully transparent, despite style="background: var(--sh-bg)" being present in
the emitted HTML.
Cause: CSP style-src governs inline style ATTRIBUTES, not just <style> blocks,
and hashes do not apply to attributes - only 'unsafe-hashes' or
'unsafe-inline' would permit them, and our policy (D20) has neither. So every
style="..." was being discarded by the browser. Nothing errored. The build
passed, the source read correctly, and the declaration simply was not applied.
49 of them had accumulated since P1, which is also why muted text was rendering
in --sh-ink and borders in the wrong token.
Verified by probe rather than inference: an element given
style="background: rgb(1,2,3)" computes to transparent in this page context.
Fix, not workaround: the design tokens are now Tailwind colours mapped to the
runtime custom properties, so every use is a utility (text-sh-muted,
bg-sh-surface, border-sh-border) and theming still switches on
html[data-theme]. Relaxing style-src to 'unsafe-inline' would have "fixed" the
symptom while giving up the policy.
Added scripts/check-no-inline-styles.mjs, run in CI after build: any style=
reaching dist/ fails. This class of bug is invisible - it deserves a permanent
check rather than vigilance. It immediately earned its place by catching a
dynamic style={`color: var(--sh-${...})`} that the literal-match conversion
could not see.
CI workflows, both of which failed at startup on every push:
- ci.yml is now self-contained. reusable-web-react.yml's Pages-deploy job
declares pages: write and id-token: write; a caller cannot request less, so
GitHub rejected the whole run before any step - even though that job is
skipped by deploy-pages: false. Granting those would hand a Workers-deployed
site the ability to mint OIDC tokens it never uses. Separately, that workflow
runs lint/typecheck/test only "if the script exists", so a renamed script
silently green-lights. This repo has already shipped four silent no-ops; a
quietly-skipping CI is the wrong tool for it.
- codeql.yml passes languages as a JSON ARRAY STRING. The reusable workflow
feeds it to fromJSON for its matrix, so a bare value throws at startup.
NOT fixed here, because it is not mine to fix: the deploy workflow fails with
Cloudflare "Authentication error [code: 10000]" on /workers/routes. The API
token needs Zone -> Workers Routes -> Edit and Zone -> DNS -> Edit. My local
deploys succeeded throughout because wrangler uses OAuth, which masked the gap
entirely.
Gate: lint, i18n:check, validate:data, 99 tests, astro check (0 errors), build,
check:styles, knip - all green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Repo automation, the config changes Kokone asked for, and a full error pass.
Kokone's asks:
- LEGAL_VERSION -> 2026-07-28, the H6 approval date. Anyone who accepted the
pre-approval wording sees the gate once more; that is intended, they agreed
to different text.
- X-Robots-Tag: noindex REMOVED. It existed only while the dataset was empty,
where an indexed blank site can linger as "Crawled - currently not indexed".
With real entries, legal pages and a sitemap live, that objection is gone.
- The existing favicon.svg is now the PWA manifest icon, sizes "any" with
purpose "any maskable". One scalable asset covers every size, and browsers
without SVG-manifest support fall back to the favicon - strictly better than
the empty icons array that shipped in M5 and suppressed the install prompt.
The www deletion, diagnosed: a `www` DNS record added by hand is not part of
the Worker's trigger list, so `wrangler deploy` reconciles triggers and can
remove it - the redirect then dies silently. Declaring www.softharbor.net as a
second custom_domain makes wrangler CREATE and KEEP the record, so it survives
deploys and reproduces from a fresh clone instead of depending on a manual
step. www still never SERVES the site: Redirect Rule R1 runs before Workers
and 301s it to apex. That rule is now a documented hard prerequisite, because
without it www would serve a duplicate - the exact hazard docs/16 N1/N2 exist
to prevent.
CI/CD (docs/12): ci.yml with the two-job split the reusable workflow forces,
plus codeql, notify, deploy, preview, quarantine and link-check. Also
renovate.json - which pins TypeScript below 7 and flags Astro/Vite/Tailwind
majors for a fresh S1 - CODEOWNERS on the three highest-risk paths, and the
remaining issue templates.
quarantine.mjs implements hard rule 5 mechanically, and I tested it rather
than assuming: flagging VLC and running the sweep removed it from the detail
page, the grid, the API export, the RSS feed AND the search index - all five
surfaces - then restored cleanly.
Error sweep found real things:
- Two exactOptionalPropertyTypes violations. Under that flag `foo?: string`
means "absent or string", not "may be passed undefined", and both props came
from optional lookups. Object.fromEntries also widens to { [k: string]: … }
and no longer satisfies Record<Locale, …>.
- ShProbe.svelte was still in the tree - a dead S1 leftover sitting in
islands/ where docs/02 §5 caps the count at six.
- Five unused exports and an unused PWA type reference.
knip now passes clean, so the next dead export is visible instead of buried.
Gate: lint, i18n:check, validate:data, 99 tests, astro check (0 errors), knip,
build (55 pages) - all green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The repository is now the database (docs/02 §1). 43 pages build from 5 JSON
files and a 12-entry category registry: grid, detail and category pages, each
in both locales.
Validation, proven in both directions:
- L1 (Zod, inside astro build) rejects shape errors. Negative-controlled: an
entry missing `developer` and carrying an unknown key fails the build with
both violations named, exit 1 - .strict() doing its job.
- L2 (scripts/validate-data.mjs) covers what Zod structurally cannot, because
it never sees the filename or the filesystem: slug format and length,
duplicate slug, duplicate name folded diacritic-insensitively, unknown
category ref, non-https link, flagged-in-main-tree (hard rule 5), missing
local: logo, updatedAt before addedAt, and quarantine invariants.
Negative-controlled: one bad fixture tripped 5 rules at once, including
catching "7-zip" as a duplicate of "7-Zip".
- L3: scripts/extract-urls.mjs feeds lychee; all 14 seed URLs return 200.
Two findings worth the space:
1. The T4 set:html ban had NEVER worked. docs/09 §2 says it is lint-banned,
but the rule was a hand-rolled no-restricted-syntax selector matching
JSXAttribute - a node astro-eslint-parser does not produce for template
directives. Three components used set:html with a clean CI. Replaced with
eslint-plugin-astro's purpose-built astro/no-set-html-directive, and
negative-controlled: a fresh file with set:html={evil} now fails lint.
2. unplugin-icons cannot do data-driven icons. It resolves ~icons/set/name
from a STATIC import specifier, but `logo` is a schema field, so the name
is only known per entry. src/lib/icon.ts reads the same vendored Iconify
JSON and inlines the SVG at build time - still zero runtime requests
(hard rule 7), and still inheriting currentColor, which an <img> data URI
would lose and which docs/04 §2 and docs/14 §3d both require.
That needs set:html, so the ban carries exactly one carve-out, scoped to
three named files rather than a loose disable comment: the only
data-derived input is a schema-constrained lookup KEY, never interpolated
markup, and an unknown key throws at build.
Seed entries are 7-Zip, VLC, Firefox, Krita and KeePassXC - all
security.status "unverified", the documented entry state (docs/04 §2). I did
not set "clean": that requires the docs/09 §6 vetting checklist, including a
reputation sweep and VirusTotal, and hard rule 4 forbids clean-by-default.
Licenses and developer names still need the L4 human pass.
Also: the header has linked to /categories since M1 and that route 404'd
until now.
Gate: lint, validate:data, i18n:check, 73 tests, astro check (0 errors),
build - all green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Welcome and an empty /apps grid in BOTH locales, on the full design-token and
font foundation. Verified in a real browser this time: the preview pane came
up, so the runtime checks S4 could only assert in happy-dom are now confirmed
against an actual rendering engine.
i18n (docs/07): en.json/vi.json + a typed t() whose Key union derives from
en.json, so a typo is a compile error rather than a blank string. Plus
scripts/check-i18n-parity.mjs, its own script on its own lefthook glob -
folding it into validate:data means an edit touching only src/i18n never runs
it. It also enforces alphabetical key order, because a 200-key dictionary is
unreviewable otherwise. Negative-controlled: deleting a key, adding a stray
one and unsorting all three get caught.
Pages: bodies live in src/components/pages/*.astro and src/pages/** are thin
locale wrappers. This extends the docs/07 §2 no-duplication rule from
getStaticPaths to whole pages - EN and VI cannot drift because there is only
one copy of the markup.
Tokens/fonts (docs/06 §2/§3): full --sh-* set for both themes, type scale with
a mobile step, offset-shadow lift, reduced-motion collapse including
view-transition groups. 13 woff2 self-hosted, latin+vietnamese only; grep of
the built output confirms zero third-party URLs (hard rule 7).
Two more inherited spec bugs found by reading dist/ rather than the spec:
- _headers carried a /fonts/* rule and the PWA a 'fonts/*.woff2' glob, but
Astro content-hashes fonts into /_astro/. The header rule matched nothing
(harmless), the workbox glob matched nothing (not harmless - the offline
page would have rendered unstyled). Both corrected here and in docs/08 D
and docs/09 §4.
- Tailwind's preflight zeroes the margin that native <dialog> relies on for
centring, so the legal gate rendered in the top-left corner. Caught by
looking at a screenshot; no test would have.
Browser verification: zero CSP violations with islands hydrating, which
confirms D20 against a real engine rather than by hash arithmetic. Accept
persists sh:legal and closes the gate; ClientRouter navigation does not
re-flash it; and navigating /apps -> /vi/apps switches the PERSISTED gate's
title, button and legal hrefs to Vietnamese - the exact S4 bug, now confirmed
fixed for real. No horizontal scroll at 375px; Vietnamese diacritics render
cleanly in all three faces.
Gate: lint, i18n:check, 67 tests, astro check (0 errors), build - all green.
CSP hash verification re-run across all 5 emitted pages.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>