Commit Graph

17 Commits

Author SHA1 Message Date
7dbcd2778e Fix BugTracker: match actual API data model
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 12s
Test / e2e-test (push) Failing after 23s
- is_resolved (0/1/2/3) instead of string status
- priority (0/1/2 numbers) instead of strings
- content field instead of title/description
- display_name/username for reporter
- comment endpoint /comment (singular), body: {content}
- Fix duplicate content display in template

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:38:18 +00:00
81efad83f9 Fix preview deploy: add rollout restart after kubectl apply
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 7s
Test / e2e-test (push) Failing after 22s
Without restart, K8s reuses cached pods even with imagePullPolicy: Always
when the manifest spec hasn't changed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:35:39 +00:00
8443f1a564 Fix 5 wrong API endpoints + stop swallowing JS errors in E2E
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 10s
Test / e2e-test (push) Successful in 4m24s
Endpoint fixes:
- AuditLog: /api/audit-logs → /api/audit-log
- BugTracker: /api/bugs → /api/bug-reports, create → /api/bug-report
- BugTracker: fix create body (content+priority, not title/description)
- MyDiary: /api/brand-settings → /api/brand
- MyDiary: /api/me/display-name → PUT /api/me
- RecipeSearch: /api/category-modules → /api/categories

Test improvements:
- Remove blanket uncaught:exception swallow (only ignore ResizeObserver)
- Add endpoint-parity.cy.js: intercept-based test that verifies correct
  API endpoints are called and wrong ones are NOT called

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:30:54 +00:00
cd65fd35be Fix login: parse API error body into Error.message
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 9s
Test / e2e-test (push) Has been cancelled
api.post/get/put/delete now throw Error with .message from response
body (detail/message field), not raw Response object. Fixes login
modal showing no feedback on auth failure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:28:18 +00:00
9c1c71d21a Fix preview deploy: imagePullPolicy Always, avoid stale image cache
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 5s
Test / e2e-test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:27:28 +00:00
67ccf1771f Fix CI: remove upload-artifact (not supported on Gitea)
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 5s
Test / e2e-test (push) Has been cancelled
2026-04-06 21:24:13 +00:00
22b60c1716 Split CI: tests on hera, deploy on oci
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Failing after 15s
Test / e2e-test (push) Has been skipped
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 9s
- test.yml: unit + e2e + build on 'test' runner (hera)
  - Vitest results + Cypress videos/screenshots as artifacts
  - Auto starts/stops backend + frontend for E2E
- preview.yml: test on hera → deploy on oci (sequential)
- deploy.yml: test on hera → deploy-prod on oci

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:22:51 +00:00
b515cf162b Add preview environment banner in App.vue
All checks were successful
Test / test (push) Successful in 13s
PR Preview / deploy-preview (pull_request) Successful in 26s
PR Preview / teardown-preview (pull_request) Has been skipped
Shows orange warning banner on pr-{id}.oil.oci.euphon.net with PR number.
Production site (oil.oci.euphon.net) is unaffected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:20:08 +00:00
d6058c8d02 Move runner to oci, simplify deploy script
All checks were successful
Test / test (push) Successful in 35s
PR Preview / deploy-preview (pull_request) Successful in 50s
PR Preview / teardown-preview (pull_request) Has been skipped
- Runner now runs on oci (arm64) — docker/kubectl are local, no SSH needed
- deploy-preview.py rewritten with subprocess (no os.system, no SSH)
  - deploy: build image, copy prod DB, create namespace, apply manifests
  - teardown: delete namespace + image
  - deploy-prod: build, push, rollout restart
- Simplified all workflow files to just call the Python script
- Deleted old hera-runner

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:17:12 +00:00
2ee0c7c241 Rewrite preview deploy as Python script
Some checks failed
Test / test (push) Successful in 5s
PR Preview / deploy-preview (pull_request) Failing after 6s
PR Preview / teardown-preview (pull_request) Has been skipped
- scripts/deploy-preview.py: deploy/teardown PR preview environments
  - rsync source to oci, copy prod DB, build image, apply K8s manifests
  - No PVC, DB baked into image
- Simplified preview.yml workflow to call the Python script
- Remove old shell deploy scripts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:10:29 +00:00
3424fd1fd0 Fix: use GIT_TOKEN secret (GITEA_TOKEN is reserved)
All checks were successful
Test / test (push) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 7s
PR Preview / teardown-preview (pull_request) Has been skipped
2026-04-06 21:07:43 +00:00
2645d2afe5 Add CI/CD: Gitea Actions workflows + Act Runner
All checks were successful
Test / test (push) Successful in 8s
PR Preview / deploy-preview (pull_request) Successful in 6s
PR Preview / teardown-preview (pull_request) Has been skipped
- .gitea/workflows/test.yml: unit tests + build on every push
- .gitea/workflows/deploy.yml: auto deploy to production on push to main
- .gitea/workflows/preview.yml: PR preview environments at pr-{id}.oil.oci.euphon.net
  - Bakes production DB copy into preview image (no PVC needed)
  - Auto-creates namespace + deployment + ingress with TLS
  - Comments PR with preview URL
  - Tears down on PR close
- scripts/setup-runner.sh: act_runner installation script

Runner: hera-runner (host mode, ubuntu-latest label)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:06:08 +00:00
d88e202bb3 Fix critical bugs: oil prices ¥0.00, ingredient field mapping
- oils store: change Map to plain object for Vue reactivity
- recipes store: map `oil_name` from API (was only mapping `oil`/`name`)
- OilReference: fix .get() calls to bracket access
- Add price-display.cy.js regression test (3 tests)
- Add visual-check.cy.js for screenshot verification

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 20:35:01 +00:00
ad3af5bd56 Expand test suite to 364 tests (168 unit + 196 E2E)
Unit tests:
- Volume/dilution calculation (63 tests): scaling, mode detection,
  ratio calculation, real recipe round-trip verification

E2E tests:
- Batch operations: create/tag/delete 3 recipes, adopt workflow
- Projects: CRUD, pricing, profit calculation vs oil costs
- Notifications: fetch, fields, mark-all-read
- Account settings: profile read/update, auth rejection
- Category modules: listing, tag reference
- Registration: register, login, duplicate rejection
- Audit log: pagination, field validation, action tracking

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:59:22 +00:00
2491479c2c Add comprehensive test suite: 105 unit + 167 E2E tests
- Vitest unit tests: smart paste parsing (37), cost calculations (21),
  oil translation (16), dialog system (12), with production data fixtures
- Cypress E2E tests: API CRUD (27), auth flow (8), recipe detail (10),
  search (12), oil reference (4), favorites (6), inventory (6),
  recipe management (10), diary (11), bug tracker (8), user management (13),
  cost parity (6), data integrity (8), responsive (9), performance (6),
  navigation (8), admin flow (5)
- Test coverage doc with prioritized gap analysis
- Found backend bug: POST /api/bug-reports/{id}/comment deletes the bug

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:47:47 +00:00
ee8ec23dc7 Refactor frontend to Vue 3 + Vite + Pinia + Cypress E2E
- Replace single-file 8441-line HTML with Vue 3 SPA
- Pinia stores: auth, oils, recipes, diary, ui
- Composables: useApi, useDialog, useSmartPaste, useOilTranslation
- 6 shared components: RecipeCard, RecipeDetailOverlay, TagPicker, etc.
- 9 page views: RecipeSearch, RecipeManager, Inventory, OilReference, etc.
- 14 Cypress E2E test specs (113 tests), all passing
- Multi-stage Dockerfile (Node build + Python runtime)
- Demo video generation scripts (TTS + subtitles + screen recording)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 18:35:00 +00:00
0368e85abe Initial commit: Essential Oil Formula Cost Calculator 2026-04-06 13:46:32 +00:00