Skip to content

ci: check every merge to the end, every page under the CSP, styles only in assets - #842

Merged
joszz merged 4 commits into
mainfrom
ci/review-cleanup
Dec 1, 2026
Merged

joszz merged 4 commits into
mainfrom
ci/review-cleanup

Conversation

@joszz

@joszz joszz commented Dec 1, 2026

Copy link
Copy Markdown
Owner

A review of CI (all twelve workflows, the shared setup action, the e2e tests and recent run timings), with what it found fixed. One commit per finding.

1. Every merge to main is checked to the end

ci.yml cancelled a running check whenever a newer push came, on main too, so a quick next merge left the one before it unchecked: of the last 50 runs on main, those of #823 and #826 never finished. It now cancels on pull requests only, as docker-publish.yml already does.

2. The smoke test opens every page

It opened only the dashboard, the map and the statistics, so the trip log, charge history, Planner, logs and route editor never ran under the production nginx and Content-Security-Policy, which is what the test is for. Each now opens up to its heading and something of its own, with no violation (the route editor on a saved trip of the last month, found through the API).

Adding them exposed a leak in settings.spec.ts: the test that switches the car through battery, plug-in and plain hybrid saved each choice on the demo server. The server kept "plain hybrid", which took the charge history away from any test running alongside. That test now answers the car's settings and its car list itself, from the car's real settings, and saves nothing. The demo VIN is one constant in fixtures.ts.

3. Styles only in assets, and lint holds it

AGENTS.md settles "no <style> blocks in components", yet 14 components had them (about 360 lines). Each block moved into the CSS file its component's pages already load: main.css, modals.css, settings.css, map.css, tripLines.css and statistics.css. All the classes are the component's own, so dropping the scoping changes nothing, except where noted:

  • SkeletonCard's .status-card__body rule was a copy of the global one, and goes.
  • :deep(canvas) in the statistics becomes a plain descendant selector.
  • The install button (a .btn) and the directions dialog's coordinates field (a .form-control) won only through the scoped attribute against rules that load later. They are nested under their dialog instead, which keeps the same specificity.
  • The slider theme MapFilterPanel @imported is a script import.

ESLint now fails on a <style> block or a style attribute in a component (vue/no-restricted-block, vue/no-restricted-static-attribute), in pnpm check and in CI's frontend lint. A :style binding, which sets a custom property through the DOM, is left alone. AGENTS.md says so.

4-6. Cleanup

  • docker-all-in-one.yml, a stub that only said to use docker-publish.yml, goes.
  • FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 goes from ten workflows: every pinned action, and every action inside the composite ones (trivy-action, setup-trivy, upload-pages-artifact, cosign-installer), already runs on Node 24.
  • The shellcheck, hadolint and actionlint commands had their line continuations flattened into runs of spaces, and are back on two lines each.

Checked, left as is

A NuGet cache (restore takes 7 to 17 s), the pnpm store and the Playwright browser (both already cached). Changed-file skipping, pinned actions, timeouts and least-privilege permissions are in place throughout.

Testing

  • pnpm check passes (2373 tests). actionlint passes on the workflows.
  • The lint rules fail a planted component with a style attribute and a <style> block, and pass the tree.
  • The full e2e suite against the demo Docker stack (production build and nginx): 33 passed, three runs in a row.
  • On that stack, computed styles of moved rules (statistics grid and canvases, directions dialog, licence plate) match the CSS.

🤖 Generated with Claude Code

joszz and others added 4 commits December 1, 2026 12:59
- ci.yml cancelled a running check whenever a newer push came, on main
  too: a quick next merge left the one before it unchecked (#823 and
  #826 were). It now cancels only on pull requests, as
  docker-publish.yml already does.
- docker-all-in-one.yml was a stub that only said to use
  docker-publish.yml; it goes.
- FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 did nothing any more: every pinned
  action, and every action inside the composite ones, runs on Node 24.
- The shellcheck, hadolint and actionlint commands had their line
  continuations flattened into runs of spaces; back on two lines each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AGENTS.md settles that styles live in frontend/src/assets/*.css, yet
14 components still had <style> blocks (about 360 lines). Each block now
sits in the CSS file its component's pages already load: the skeletons
and CommandFailure in main.css, the install and directions dialogs in
modals.css, the licence plate in settings.css, the map's key, trip list
and filters in map.css, the phone GPS key in tripLines.css and the
statistics layout in statistics.css.

All their classes are the component's own, so dropping the scoping
changes nothing, with three exceptions:
- SkeletonCard's .status-card__body rule was a copy of the global one.
- Statistics' :deep(canvas) becomes a plain descendant selector.
- The install button (.btn) and the coordinates field (.form-control)
  were held by the scoped attribute against rules that load later; they
  are nested under their dialog instead.
The slider theme MapFilterPanel @imported is a script import now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rule that styles live in src/assets/*.css was only written down, so
14 components drifted from it unnoticed. eslint-plugin-vue's
no-restricted-block and no-restricted-static-attribute now hold it, in
pnpm check locally and in CI's frontend lint. A :style binding, which
sets a custom property through the DOM, is left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The smoke test only opened the dashboard, the map and the statistics, so
the trip log, charge history, planner, logs and route editor never ran
under the production nginx and Content-Security-Policy. Each is now
opened up to its heading and something of its own, with no violation.

That showed a leak: the settings test that switches the car through
battery, plug-in and plain hybrid saved each choice on the demo server,
which kept plain hybrid and so took the charge history away from any
test running alongside. The car's settings and its list are now
answered in that test, from the car's real settings, and nothing is
saved. The demo car's VIN is one constant in the fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joszz
joszz merged commit 6d2965d into main Dec 1, 2026
38 checks passed
@joszz
joszz deleted the ci/review-cleanup branch December 1, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant