Skip to content

feat: Phase 1 architecture stabilisation + test infrastructure#32

Merged
romahawk merged 3 commits intomainfrom
feat/pr5-mobile-log-cards
Feb 18, 2026
Merged

feat: Phase 1 architecture stabilisation + test infrastructure#32
romahawk merged 3 commits intomainfrom
feat/pr5-mobile-log-cards

Conversation

@romahawk
Copy link
Copy Markdown
Owner

@romahawk romahawk commented Feb 18, 2026

Summary

  • Architecture stabilisation (no behavior change): badge registry merge, useSessionData + useAnalytics hooks extracted, lib/insights.js pure functions, JSDoc typedefs for core models, dead xpService.js deleted
  • Product UX: comparator mode toggle (Auto/Prev/Last active), milestone N/total counters + next-tier preview row, Navbar non-admin dev tools hint + dark mode fix, Firestore security rules
  • Test infra: node --test → Vitest (44/44); SessionForm component test (13 cases); Playwright smoke test (3 E2E cases)

Test plan

  • npm test → 44/44 pass
  • npm run lint → clean
  • npm run build → clean
  • npm run test:e2e → 3/3 pass
  • Visual: Analytics tab shows Auto/Prev/Last active pill toggle
  • Visual: Milestone modal shows N/total counters + dashed next-tier row
  • Visual: Navbar non-admin shows dimmed Dev tools button
  • Visual: Admin dev tools dropdown has readable text in dark mode

🤖 Generated with Claude Code

romahawk and others added 3 commits February 18, 2026 21:17
- Merge badge registries: engine.js imports from definitions.js; real emoji icons added (🎯🔥🚀🏀)
- Extract useSessionData() hook: Dashboard 373 → 155 lines
- Extract useAnalytics() hook: all analytics memos moved out of Dashboard
- Extract lib/insights.js: pure typeLabel + generateInsights; InsightsSummaryCard is presenter-only
- Add JSDoc @typedef for Session, Round, ZoneStat in models.js
- Delete dead xpService.js (XP source of truth is session docs + xpCalculator.js)
- Remove dead LogSection.jsx filter state (typeFilter/from/to)
- Add firestore.rules + firebase.json (owner-only session + achievement access)
- Analytics comparator: Auto/Prev/Last-active mode switch with always-visible baseline range label
- Milestones UX: N/total category counters + next-tier dashed preview row per category
- Navbar: non-admin dev tools hint; refresh-token note; dark mode dropdown text fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ght smoke test

- Replace node --test with vitest run; add test:watch, test:ui, test:coverage, test:e2e scripts
- Migrate all 7 existing test files from node:test/assert to Vitest expect syntax
- Add vitest.config.js (happy-dom environment, globals, @vitejs/plugin-react)
- Add src/test/setup.js (@testing-library/jest-dom)
- Add src/components/SessionForm.test.jsx: 13 component tests covering all 3 form steps
- Add playwright.config.js + e2e/dashboard.spec.js: 3 unauthenticated redirect smoke tests
- Fix eslint.config.js: Node globals for *.config.js and e2e/** files
- Suite: 44/44 unit+component tests; 3/3 E2E tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
smartshooter Ready Ready Preview, Comment Feb 18, 2026 8:39pm

@romahawk romahawk merged commit a9a3218 into main Feb 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant