Commit Graph
33 Commits
Author SHA1 Message Date
m038 fa6550a232 Merge branch 'main' into worktree-content-fixes 2026-07-07 23:52:34 +02:00
m038andClaude Opus 4.8 b752178eb4 refactor(demo-load): iterate docs/demo/trips/* instead of per-trip blocks
demo-load / demo-reset now loop over every fixture under docs/demo/trips/
rather than hardcoding each trip, so new fixtures (no-photos-demo and any
future one) are picked up with no Makefile edit. The only per-trip specific —
the source `dailies/` folder mapping to `01.dailies/` in the pages tree — is
uniform across fixtures, so one loop covers all. chown is scoped per fixture
dir (never the whole 01.trips tree) and all copies stay `|| true`.

Verified on the worktree server: a full reset then reload restores both
italy-2026-demo (7 gpx + 12 entries + stories) and no-photos-demo; trip suite
green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDS6t8wcpbwKvvrxykVQ5K
2026-07-07 23:03:54 +02:00
m038andClaude Opus 4.8 af07ef403c test(trip): add AE4 no-banner coverage + record deferred review findings
- trip-header.spec.js: new U4/R9/AE4 test — a trip with no cover_image and no
  entry images renders its text header with no .trip-header-banner strip.
- Makefile: demo-load/demo-reset now also (un)load the no-photos-demo fixture,
  guarded with `|| true` so runs whose user/ predates the fixture skip it
  instead of failing globalSetup.
- plan: post-review follow-up notes the applied fixes and records the two
  intentionally-deferred findings (macro-owned resolution per KTD2; inline
  toggle script per U4's Approach) so they are not re-flagged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDS6t8wcpbwKvvrxykVQ5K
2026-07-07 09:13:59 +02:00
m038andClaude Opus 4.8 9295914238 docs: capture history-rewrite-under-live-git-sync + secrets-audit tooling
Update the git-sync secret-exposure solution doc with today's operational
lesson: untracking an already-committed secret under a live bidirectional
sync. Covers the direction:both force-push-revert trap, the freeze-every-
server-first sequence, audit-before-reset (authoritative secret in env/),
the stale origin/main ref + sparse-checkout gotchas, and the ignore:-field
mechanism.

Add Makefile targets that supported the fix:
- remote-secrets-audit: secret-safe (existence + size + git ls-files, never
  contents) audit of config/ vs env/<host>/config secret locations
- remote-content-status: also show the .gitignore diff git-sync regenerates

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 19:25:32 +02:00
m038andClaude Opus 4.8 3cb7dfbd8b make: add remote-seed-api-salt + show HEAD in remote-content-status
remote-seed-api-salt writes a per-host popularity salt into the env
override tree (user/env/<host>/config/plugins/api.yaml) so the api plugin
reads it there instead of appending one to the git-tracked
config/plugins/api.yaml. That appended salt kept the content working tree
perpetually dirty, which aborted git-sync's auto-merge on webhook and
silently broke prod auto-deploy. Salt is generated server-side, never
committed, and re-runs are idempotent.

remote-content-status now prints HEAD so a webhook auto-pull can be
verified.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 16:53:30 +02:00
m038andClaude Opus 4.8 d61de6f3f7 build: make git-sync toggle + diag env-path aware
Grav Admin saves plugin config into the active environment's config tree
(user/env/<host>/config/plugins/) when an env override dir exists — so
git-sync.yaml landed there, not in user/config/plugins/. Update the
toggle script to take a WEBROOT and search both locations (env path
first), and update remote-git-sync-disable/enable to pass WEBROOT.
remote-diag now surfaces git-sync config (secrets redacted) from either
location.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Np4cMQLF77i664CAQXySzU
2026-07-04 23:35:11 +02:00
m038andClaude Opus 4.8 cc40c23ea8 build: add remote-gpm-install (single out-of-plugins.txt package)
For installing remote-only plugins like git-sync that are deliberately
excluded from plugins.txt. Usage: make remote-gpm-install-prod PKG=git-sync

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Np4cMQLF77i664CAQXySzU
2026-07-04 23:18:51 +02:00
m038andClaude Opus 4.8 41e61fc148 build: per-environment Grav config override (prod Twig prod-mode)
Prod needs twig.cache:true / debug:false / auto_reload:false, but those
values break local dev, so they must not live in the committed
system.yaml. Add a per-environment override deployed only to the server
via Grav's environment://config (user/env/<host>/config/system.yaml):

- deploy/env/prod/system.yaml — version-controlled source of truth.
- make remote-apply-env-prod — writes it to the server + clears cache;
  resolves the host in-recipe (WEB_HOST || REMOTE_HOST) to avoid the
  recursive-make empty-export trap.
- remote-diag now shows the deployed override + whether twig cache is
  populating, so prod-mode can be verified not assumed.
- CLAUDE.md §1 rewritten: never flip committed system.yaml; use the
  override. Backlog updated (twig prod-mode + /post login-gate done;
  note stale .env.prod GRAV_VERSION and pending git-sync).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Np4cMQLF77i664CAQXySzU
2026-07-04 22:54:59 +02:00
m038andClaude Opus 4.8 553d9e4759 build: force GPM index refresh before install; add remote-diag
- remote-install-plugins now runs 'gpm index -f' before install so a
  fresh server doesn't rely on the stale package index bundled in the
  grav-admin zip (which can miss recently-published plugins).
- Add read-only remote-diag target: Grav version, installed plugin
  versions, GPM view of the api plugin, api override keys, and log tail.
  Surfaced the prod rc.10 vs 2.0.4 mismatch that blocked the api plugin.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Np4cMQLF77i664CAQXySzU
2026-07-04 22:49:06 +02:00
m038andClaude Opus 4.8 58d2d70c13 test: self-contained local test account + urlencoded login
Add a dedicated, gitignored testrunner account auto-created by the suite
(make test-account, also invoked from global-setup) so `make test` no longer
needs the real account in .env. The target uses --admin-type both so the
account has admin.login for the gpx-manager specs. test-post.sh switches its
login POST to --data-urlencode to survive special chars in credentials.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Np4cMQLF77i664CAQXySzU
2026-07-04 19:36:39 +02:00
m038andClaude Opus 4.8 a639dc6e41 build: fix remote-upgrade-grav; add remote plugin-update, git-sync toggle, content-status targets
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Np4cMQLF77i664CAQXySzU
2026-07-04 16:41:25 +02:00
m038andClaude Opus 4.8 4dc5bf6812 build: add per-environment (test/prod) Makefile targets
Split env config into local vs remote:
- .env: local/shared config, always loaded (docker compose + make test)
- .env.test / .env.prod: full remote config, loaded on demand via ENV

Remote targets now generate -test/-prod variants (e.g. remote-install-prod);
a guard-env prerequisite blocks bare remote targets with no environment set.
Refresh .env.example to document the two-tier layout and add .env.prod/.env.test
to gitignore and the never-read list in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 14:02:13 +02:00
m038andClaude Opus 4.8 aeea6744bd chore: drop 02.map/03.stats from demo-load target
Phase 1 cleanup companion — demo-load no longer creates the retired
map/stats sub-pages or copies their now-deleted source .md files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 13:22:58 +02:00
m038andClaude Sonnet 4.6 0d3a3451f3 chore: update .env.example and fix remote-fetch-content sparse-checkout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-26 18:22:53 +02:00
m038andClaude Sonnet 4.6 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
m038andClaude Sonnet 4.6 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
m038andClaude Sonnet 4.6 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
m038andClaude Sonnet 4.6 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 65597de00d docs: fix all internal cross-references after restructure 2026-06-21 12:48:04 +02:00
m038andClaude Sonnet 4.6 b9e0e39402 fix: make demo-load writable, fix photo strip a11y, fix M7 marker click
- Makefile: add chown 1000:1000 after demo-load so Grav can create entries
- Makefile: add collection config to demo dailies.md (page.collection() needs it)
- base.html.twig: add tabindex="0" to journal-photo-strip for keyboard access (AX1-AX3)
- maps.spec.js: use force:true on M7 marker click (start/end overlap at Campiglia)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-20 22:12:33 +02:00
m038andClaude Sonnet 4.6 ed005bae14 feat: add pixelfed-import script and make target
Copies JSON export + script into Docker container and runs import via
python3; installs python3 if absent. Idempotent (skips existing folders).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-20 15:32:56 +02:00
m038andClaude Sonnet 4.6 3c4ec0b79b chore: update demo-load/demo-reset for italy-2026-demo; retire japan demo
Rewire demo targets to use docker exec for file ops (user/ is owned by
http), point to the new italy-2026-demo source, and reduce demo-reset
to a single rm -rf of the demo trip directory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-20 15:18:42 +02:00
m038andClaude Sonnet 4.6 50b64fbcb3 build: add Italy 2025 stories folder to demo-load target
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
2026-06-19 23:44:18 +02:00
m038 6c378d77ca build: add story folder to demo-load and demo-reset targets 2026-06-19 23:04:14 +02:00
m038andClaude Sonnet 4.6 5e954d8adf fix: update paths for trips/japan-korea-2026/dailies restructure
- Update post form parent, Makefile demo targets, and test scripts to use
  new trip-scoped paths (01.trips/japan-korea-2026/01.dailies)
- Rename tracker.spec.js → dailies.spec.js and update all /tracker URLs
  to /trips/japan-korea-2026/dailies across nav.spec.js, post.spec.js,
  helpers.js, and dailies.spec.js
- Add Italy 2025 demo trip to Makefile demo-load/demo-reset targets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 01:49:38 +02:00
m038andClaude Sonnet 4.6 943026658b fix: make fix-perms idempotent and persistent across container restarts
The getgrav/grav image is Debian-based and has no uid 1000 user,
causing Apache to fail switching to APACHE_RUN_USER=#1000 on restart.
fix-perms now creates the uid 1000 user if absent, sets ownership,
then gracefully reloads Apache workers so they run as uid 1000.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 00:15:56 +02:00
m038andClaude Sonnet 4.6 8824f79c64 feat: run Apache as host UID 1000 and add fix-perms target
APACHE_RUN_USER/GROUP=#1000 makes PHP/Apache write files owned by
the host user (mischa) instead of http. fix-perms target in setup
ensures ownership is correct after plugin install.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 23:34:57 +02:00
m038andClaude Sonnet 4.6 df55917347 feat: switch to getgrav/grav 2.0 RC docker image
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 23:13:53 +02:00
m038 545e3f5ba0 feat: add Playwright UI test for post-with-photo flow 2026-06-18 20:35:17 +02:00
m038andClaude Sonnet 4.6 fb28f09e0c test: add form config validator and HTTP integration test
test-config: static YAML validator for post-form.md — checks that the
add-page-by-form action name, pageconfig/pagefrontmatter blocks, and all
required fields are correctly wired. Fast, no server needed. Catches the
class of bug that caused silent post failures.

test-post: end-to-end HTTP test — logs in, submits the form, verifies an
entry.md was created on disk, then cleans up. Requires GRAV_TEST_USER and
GRAV_TEST_PASS in .env (see .env.example).

  make test-config   # fast, no credentials needed
  make test-post     # full e2e, needs .env credentials
  make test          # both

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 19:57:49 +02:00
m038 618e0c707b feat: add demo-load and demo-reset make commands 2026-06-18 17:52:33 +02:00
m038 bc6781133e Document local dev setup gotchas; fix install-plugins gpm path 2026-06-18 00:16:47 +02:00
m038 c52353ac8e Initial project setup: Docker, Makefile, scripts, plugins 2026-06-17 23:38:59 +02:00