27 Commits

Author SHA1 Message Date
d7028ab190 Merge pull request 'refactor/component-tree-2' (#3) from refactor/component-tree-2 into master
Some checks failed
build / Build & Push & Dispatch (push) Failing after 25m46s
Reviewed-on: #3
2026-06-24 01:07:54 +00:00
598d3925a5 fix: restore default faction + remove dead data-testid attributes
- Restore default faction to 'adepta-sororitas' on first load (matches pre-refactor behavior; was a silent behavior change)
- Add regression test asserting default-load shows only Adepta Sororitas units and hides the Faction column
- Remove unused data-testid="app-root" from App.jsx and data-testid="mover-row" from MoversPanel.jsx (no test queried either)
2026-06-23 17:41:06 -04:00
41f43f2ea8 refactor: rewrite App.jsx as orchestrator over new component tree 2026-06-23 17:15:01 -04:00
e2b4a39b51 refactor(app): add data-testid to root Box for tests 2026-06-23 17:03:30 -04:00
2b8713a624 test: add renderWithTheme helper to test setup 2026-06-23 17:00:26 -04:00
613a6dba80 feat(components): extract UnitTable from App 2026-06-23 16:45:57 -04:00
187aa4dfd6 feat(utils): extract buildColumns from App 2026-06-23 16:20:48 -04:00
87f4060487 feat(components): extract FilterBar from App 2026-06-23 16:15:21 -04:00
bd4ca78c1d feat(components): extract MoversPanel + MoversSection from App 2026-06-23 16:06:57 -04:00
b87f5ea5aa feat(components): extract GraphModal from App 2026-06-23 16:02:13 -04:00
4727a7454e feat(components): extract PointsHistoryChart from GraphModal 2026-06-23 15:55:57 -04:00
0e3036e767 feat(components): extract SizeCell from App 2026-06-23 15:52:18 -04:00
812d27a363 chore(vite): enable MUI jsdom test infra (react-transition-group alias, jsx automatic) 2026-06-23 15:50:47 -04:00
ed8e359918 feat(utils): add buildChartGeometry (pure SVG scale math) 2026-06-23 15:41:33 -04:00
b86a95ede1 feat(utils): add computeMovers (top-5 drops + rises) 2026-06-23 15:34:57 -04:00
07c15cd81a feat(utils): add URL read/write helpers for filter state 2026-06-23 15:32:04 -04:00
fc21c887f2 feat(utils): add format helpers (sizeShort, pctLabel, ptsLabel, changeColor) 2026-06-23 15:27:42 -04:00
ba16b6b717 test: add representative data.json fixture for UI tests 2026-06-23 15:21:59 -04:00
376cd2be36 chore: add vitest + testing-library + test config 2026-06-23 15:17:19 -04:00
82122b97c8 docs: add react component tree refactor implementation plan 2026-06-23 14:55:35 -04:00
4e3d5bbebc docs: add UI test strategy to refactor spec 2026-06-23 14:51:26 -04:00
e36159d25e docs: add react component tree refactor design spec 2026-06-23 14:42:14 -04:00
6500deca61 ci: add homelab mkcert public CA (rootCA.pem)
All checks were successful
build / Build & Push & Dispatch (push) Successful in 24s
The build workflow installs this into the system + docker trust stores so
docker login and buildkit can talk to the git.homelab.local registry on its
self-signed cert. PUBLIC cert only — the key lives only on the mkcert box
(/home/kaykayyali/rootCA-key.pem) and is never committed.

Source SHA-256: 3fd11ebc352da32ef228ca35765f5fc26b1ce63ba3524d9d990bd6f7ff30d6f5
2026-06-23 15:11:55 +00:00
2e162edf88 ci: fix build-push-action tag interpolation + reuse step output for dispatch
Some checks failed
build / Build & Push & Dispatch (push) Has been cancelled
Gitea 1.25 expression parser does NOT support GitHub's ${VAR::N}
string-slicing shorthand inside an interpolation context. The previous
build.yml used ${{ github.sha::7 }} inline inside the build-push-action
tags: block, which failed with:
  Failed to parse: got unexpected character ':' while lexing expression

Fix: add a dedicated "Compute image tag" step that writes the short SHA to
$GITHUB_OUTPUT, then reference it as ${{ steps.tag.outputs.short_sha }}
from both the build-push-action tags block and the dispatch curl payload.

Also, the previous workflow referenced certs/rootCA.pem but the file was
never committed to this repo (only to gitea-deploy-demo). Adding
certs/rootCA.pem in the same commit.
2026-06-23 15:11:54 +00:00
7b77f70883 ci: fix build.yml — correct registry port, login, image name, branch
Some checks failed
build / Build & Push & Dispatch (push) Failing after 10s
- REGISTRY: git.homelab.local:8443 → git.homelab.local (no port; :8443 is blocked)
- login: raw docker login | ... → docker/login-action@v3 (cleaner error reporting)
- image name: hardcoded kaykayyali/wh40k-factions → ${{ github.repository }}
  (matches apps/wh40k-site.yaml:repo = kaykayyali/wh40k-points-comparator)
- branch trigger: main → master (actual default branch of this repo)
- secrets.GITEA_DISPATCH_TOKEN → secrets.DISPATCH_TOKEN (set via API)
- add docker/setup-buildx-action@v3 + CA install (gitea-deploy-demo pattern)

Refs the gitea-deploy-demo build.yml as the source of truth.
2026-06-23 15:10:30 +00:00
root
7d84d8f00d ci: add build pipeline (build -> push -> dispatch to orchestrator)
This replaces the old 'manual docker run' workflow. Pushing to main
now:
1. Builds the multi-stage Docker image (Node build + nginx runtime)
2. Tags with :latest and :<short-sha> for reproducibility
3. Pushes both to the Gitea container registry
4. Dispatches to gitea-deploy-orchestrator with the image+SHA+branch

The orchestrator handles the actual deploy (Portainer, DNS, healthcheck).
Single source of truth for 'where do we deploy' lives in the orchestrator
repo, not in scattered docker run commands.

Required secrets (Kay's manual step):
- REGISTRY_TOKEN: Gitea API token with write:package scope
- GITEA_DISPATCH_TOKEN: Gitea API token with repository scope
  (for posting repository_dispatch to the orchestrator)

Refs: gitea-deploy-orchestrator#3 (Phase B5)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 23:48:28 +00:00
root
38bffa491c Initial commit: WH40K Points Comparator
- React + MUI DataGrid app with faction filter, search, change filter
- Biggest movers cards (drops/rises) scoped to current filter view
- Historical points graph modal (5 MFM versions: 1.14 → current)
- URL state sync (faction, dir, q params — shareable URLs)
- Grimdark favicon + OG embed image (Google Imagen)
- Multi-stage Dockerfile (node build → nginx serve)
- docker-compose.yml with Traefik + Cloudflare TLS
- Data pipeline: build_deduped_data.py merges PDF + live scrape
- Ynnari merged into Aeldari (shared codex)
- Mobile responsive: flex columns, no fixed pixel widths
- Color semantics: green=cheaper, red=costlier (consistent everywhere)
- 1,449 units across 31 factions
2026-06-18 02:42:29 +00:00