Commit Graph

202 Commits

Author SHA1 Message Date
m038 aab783384f docs: add template refactor design spec (Milestone 2)
Three Twig macros (stats panel, cycling panel, date range), five template
modifications, and two latent bug fixes in inactive templates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-23 23:38:54 +02:00
m038 5cf7e15219 build: add build-assets make target
Runs npm install + npm run build inside node:20-alpine Docker container,
mounting user/themes/intotheeast as the working directory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-22 23:11:32 +02:00
m038 bd906005e4 docs: add asset pipeline implementation plan
8 tasks: build scaffolding, main/map bundles, maplibre-utils extension,
template CDN cleanup, and end-to-end verification.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-22 23:02:34 +02:00
m038 dc01d943f3 docs: add asset pipeline and frontend reliability design spec
Covers esbuild via Docker, self-hosted CDN deps and fonts, JS
deduplication strategy, Grav-idiomatic output structure, and
template changes for trip.html.twig.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-22 22:43:53 +02:00
m038 be673b2135 feat: align maps (shared partial), add stories map, add regression tests
- Extract feed mini-map into shared partials/feed-map.html.twig
- Refactor dailies to use shared partial
- Add map to stories listing page with story card IDs
- Attribution always starts collapsed; marker click exits fullscreen then scrolls
- Add M9-M11 (stories map) + MUX1-5 (panel/sort/fullscreen) E2E tests: 84 passed
- Document session learnings (MapLibre v4 quirks, CSS patterns, PhotoSwipe v5)
- Update CLAUDE.md with shared partial architecture
2026-06-22 01:54:20 +02:00
m038 7d1bab89b9 docs: fix CSS class name in learnings doc (feed-map-wrap not map-col) 2026-06-22 01:54:01 +02:00
m038 00d6bb0e37 test: add M9-M11 stories map + MUX1-5 panel/sort/fullscreen regression tests 2026-06-22 01:48:04 +02:00
m038 b9f9f4ce9c docs: add mobile-ux session learnings and shared partial architecture 2026-06-22 01:41:23 +02:00
m038 be063ad5b4 docs: add align-maps-tests implementation plan 2026-06-22 01:31:33 +02:00
m038 fac3b18201 docs: fix TC-M QA cases — correct URLs, hover rule, highlight detail
- Wrong active trip slug in intro (japan-korea → us-canada-mex-2024)
- Home page URL /home not /
- TC-M.3: describe teal-fade animation precisely, not "background flash"
- TC-M.6: arrows hidden by hover:none (touch devices), not by screen width
- TC-M.7: add note that home feed only renders in trip mode; explain how to verify

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-21 22:05:41 +02:00
m038 7b4a4d2b9c docs: add QA test cases for 2026-06-21 mobile UX session
Covers: back-to-top button, marker scroll offset, iOS viewport gap,
PhotoSwipe keyboard animation, photo strip arrows, and partial
consistency across trip/dailies/home feed pages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-21 21:52:43 +02:00
m038 35a9393537 docs: add travel-memories session handover (2026-06-21)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:41:24 +02:00
m038 a265b08ca0 fix: use amber/sky colors for journal/story borders and badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:40:13 +02:00
m038 3fd1e8ae96 fix: restore border-4 width when retagging (was stripped by border-* filter)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:36:37 +02:00
m038 a8804547e7 feat: desktop lightbox — click to open, arrows navigate, J/S/X tag, Esc close
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:29:43 +02:00
m038 1c5526c56c fix: arrow key nav (left/right modifiers) + opacity class not clearing on retag
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:26:15 +02:00
m038 14845f47ac feat: highlight selected triage card + arrow key navigation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:23:43 +02:00
m038 e9fffa36ce fix: update triage badge dynamically when tag changes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:20:59 +02:00
m038 f260e2ff76 feat: mobile swipe triage UI + tag visualization
- HammerJS swipe cards (right=journal, left=skip, up=story) with tilt/color feedback
- Three tap buttons as swipe alternative (J/S/X)
- Undo stack (max 10) with Back button
- Progress bar + header counter sync
- Thumbnail strip (all photos, colored dots, tap to jump)
- Desktop: J/S/X badges on all tagged photos including skip

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:10:31 +02:00
m038 1159b9cba6 feat: add mobile swipe triage UI with HammerJS and undo stack
On viewports < 768px, show a Tinder-style card UI instead of the photo
grid. Cards show one untagged photo at a time with swipe gestures
(right=journal, left=skip, up=story), colour overlays during drag, tap
buttons as alternatives, a progress bar, and a 10-deep undo stack.
Desktop grid is unchanged, wrapped in #desktop-view.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:07:50 +02:00
m038 ab159d3a93 docs: mark playwright-tests plan as done 2026-06-21 17:26:21 +02:00
m038 1d29c30900 fix: add ui-test-trip gitignore and bump user submodule
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPJztrVGbwic2xTG7G9fjM
2026-06-21 17:24:32 +02:00
m038 7dc7caee26 fix: sanitise trip slug on input, escape single quotes in YAML frontmatter
Fix D: apply _sanitise_slug() to grav_trip_slug in POST /select before
storing in TripState, preventing path traversal via ../sequences.

Fix E: add _yaml_str() helper that doubles single quotes; apply to title,
location_city, and location_country in both run_export and overwrite_export
frontmatter blocks, preventing invalid YAML for values like Xi'an.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:24:22 +02:00
m038 69cc29b5e5 test: add cross-cutting tests (reload safety, stale, back-nav, export immutability)
Six Playwright tests covering server-side state persistence across hard reloads,
stale-phase propagation after back-navigation, stale banner dismiss, exported group
immutability, and notes surviving phase navigation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:18:24 +02:00
m038 8c32ac707e test: merge playwright-tests branch — reorganise, extend, fix
- Reorganise flat tests/ui/ into feature subdirectories (auth/ post/ gpx/
  maps/ stories/ dailies/ home/ nav/ trip/ a11y/)
- Fix stale trip-slug refs (japan-korea-2026 / italy-2025 → italy-2026-demo)
- Add tests/fixtures/test-route.gpx
- Add GPX Manager spec (GM1–GM7) with real API calls and afterAll cleanup
- Add post-form tests P6–P8 (success message, date frontmatter, form reset)
- Add AX6 (gpx-manager mocked) and AX7 (story page) axe scans
- Fix auth.setup.js AUTH_FILE path; add @axe-core/playwright devDependency
- Fix fixture paths in post specs after subdirectory move

Known failures (not regressions):
  AX6/AX7 — real a11y violations in site (color-contrast, label, scrollable)
  H1/M8   — require travelling:true; site is currently between trips

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPJztrVGbwic2xTG7G9fjM
2026-06-21 17:16:57 +02:00
m038 db7c102da1 Merge branch 'worktree-playwright-tests'
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:12:37 +02:00
m038 5160368407 feat: Phase 6 export — writes Grav entry folders from Immich originals
Implements GET /export summary view and POST /export/run which downloads
originals from Immich, writes entry.md with YAML frontmatter, and sets
group status to exported. Includes POST /export/overwrite for single-group
re-export. All 42 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:06:39 +02:00
m038 b79c0da808 fix: correct fixture paths in post specs after subdirectory move 2026-06-21 16:58:45 +02:00
m038 fade38e7a0 fix: enforce write phase completion gate and wire done endpoint
- GET /write now checks all groups are written/skipped before showing
  the completion screen; incomplete sessions are redirected to the first
  draft group
- POST /write/done now accepts form data (not JSON) and redirects to
  /export; wired up from the completion screen via a <form> POST button
- phase5.html extra_scripts block wrapped in {% if group %} to prevent
  Jinja errors when group is None on the completion screen

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:58:03 +02:00
m038 f22d32f056 test: add AX6 (gpx-manager, mocked) and AX7 (story page) axe scans
Both scans reveal real violations documented in task-6-report.md.
Full suite: 64 passed, 15 failed (2 new AX failures + 13 pre-existing).
2026-06-21 16:54:50 +02:00
m038 02c772f321 feat: Phase 5 write with autosave, journal/story modes, skip
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:54:15 +02:00
m038 1b319ca8ae test: add P6-P8 — success message, date pre-fill, form reset
- P6: verify "Entry posted successfully!" toast after submit
- P7: verify server resolves default:now to a recent timestamp in saved frontmatter (Grav renders the literal "now" string in the HTML input; resolution happens server-side)
- P8: verify title/content fields empty after successful submit (form reset:true)

Also fix pre-existing helpers.js issues:
- TRACKER_DIR now resolves via docker inspect or GRAV_USER_DIR env var so tests find entries even when running from a worktree without a user/ directory
- DAILIES_URL exported and derived from post-form.md pageconfig.parent so P1/P2 navigate to the correct active-trip URL
- cleanupEntry/findEntry now guard against missing TRACKER_DIR
- P2 marked test.skip (was running and failing on missing fixture)
2026-06-21 16:45:04 +02:00
m038 b5c90a1e81 feat: Phase 4 grouping with entry-break dividers
Add group.py route, phase4.html template, and supporting state changes.
Photos are shown as a flat stream; clicking divider zones inserts
entry-break boundaries that split photos into labelled groups. Labels
persist via group_labels dict. Done materialises groups into state.groups
and advances to write phase.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:44:54 +02:00
m038 596db0442f fix: remove stale tests/ui/.auth dir; add to .gitignore 2026-06-21 16:37:56 +02:00
m038 23b68d845b fix: curate swap endpoint name, reorder date field, 404 on missing asset
- Rename /curate/retag to /curate/swap; response now includes new_tag
- /curate/reorder: read body["order"] key (was ordered_ids); include date field
- /curate/remove and /curate/swap: return 404 if asset_id not found
- Update phase3.html JS fetch calls and reorder payload to match spec

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:37:25 +02:00
m038 2c8d676e25 test: add GPX Manager end-to-end spec (GM1-GM7)
Also fix auth.setup.js AUTH_FILE path: the file lives in tests/ui/auth/
so the relative path to tests/.auth/user.json needs ../../ not ../ to
match the storageState path in playwright.config.js.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPJztrVGbwic2xTG7G9fjM
2026-06-21 16:35:48 +02:00
m038 851df070e4 feat: Phase 3 curate with remove, retag, drag reorder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:33:58 +02:00
m038 a6a2b31c43 feat: Phase 2 triage with keyboard shortcuts J/S/X
Implement /triage GET/POST routes in triage.py blueprint; render
phase2.html with day-grouped photo grid, Alpine.js keyboard tagging
(J=journal, S=story, X/Space=skip), and done-button gated on all-tagged.
Remove stub from albums.py; register triage.bp in __init__.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:26:53 +02:00
m038 7b7810cc59 feat: add remote-fetch-content to pull user content repo on server
Separate from remote-fetch (main repo) since content sync is handled
by the git-sync plugin once configured; this is for one-off manual pulls.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-21 16:26:03 +02:00
m038 32775ef83f fix: remote-fetch switches to main branch before pulling
Server clone was tracking experimental-polar-steps; checkout main
ensures it follows the correct branch going forward.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-21 16:25:12 +02:00
m038 2ab0b13eb6 test: reorganise tests/ui/ into feature subdirectories 2026-06-21 16:22:17 +02:00
m038 fec536ef16 test: add minimal GPX fixture for GPX Manager tests 2026-06-21 16:18:40 +02:00
m038 39d19cf2f8 feat: Phase 1 album selection with resume/start-over
Implements GET / listing Immich albums with resume badge, POST /select
creating TripState and redirecting to /triage; graceful error display
when Immich is unreachable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:18:38 +02:00
m038 f00f48c40c fix: add @axe-core/playwright to devDependencies; remove duplicate ITALY_URL constant 2026-06-21 16:18:10 +02:00
m038 508fcbdbe8 test: fix stale trip-slug references; add home, highlights, a11y specs 2026-06-21 16:12:42 +02:00
m038 c9c1a50103 fix: correct Alpine scope for notes panel, tojson escaping, remove dead code
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:11:41 +02:00
m038 e4e4de319d fix: include api plugin in server install alongside admin2
Both api and admin2 are bundled with the Grav 2.0 zip and not available
via GPM. Extract and install both during remote-install. Remove the
ad-hoc remote-install-admin2 target — the main install now covers it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-21 16:11:40 +02:00
m038 bcfee45bd7 feat: add base shell, notes panel, back-navigation with stale propagation
Implements Task 4: base.html DaisyUI/Alpine shell, notes autosave panel,
nav.py phase switching with downstream stale marking, notes.py save/get
endpoints, state debug endpoint, and stub /triage route for test support.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:08:21 +02:00
m038 203737cc3f feat: add Immich API client and photo proxy routes
Implements ImmichClient with list_albums, get_album, get_thumbnail,
get_original methods; wraps connection errors as ConnectionError.
Adds /proxy/thumb/<asset_id> and /proxy/original/<asset_id> Flask routes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 15:55:26 +02:00
m038 102ad7b77b feat: add atomic state management (TripState, Photo, Group)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 15:51:26 +02:00