docs(16.1): insert phases 16.1 and 16.2 with 16.1 context

This commit is contained in:
2026-10-09 20:19:29 +02:00
parent 1c2dc28588
commit 1ef21b0e43
2 changed files with 61 additions and 0 deletions

View File

@@ -977,6 +977,26 @@ Plans:
**Wave 5** *(blocked on Wave 4 completion)*
- [x] 16-05-PLAN.md — Unit tests: layer and app node --test (incl. SSR), Go command and boot tests, phase gate
### Phase 16.1: Journal admin urgent fixes: relation search, list state, post form content and excerpt (INSERTED)
**Goal:** The Journal posts list and post form in the admin work on real imported data, found on UAT (uat.grzybyfunkcjonalne.pl/gfadmin/golem15/journal/posts): (1) list search no longer fails with "Server error" — the Go log shows `ERROR: column Categories.post_id does not exist (SQLSTATE 42703)` from summercms@v0.1.9 modules/cabana/query.go:129, i.e. search across a belongsToMany (pivot) relation builds a hasMany join; (2) list sort and filters are remembered after opening a record and going back, as WinterCMS persisted list state; (3) the post form shows the stored content (DB has content/content_html on 104/104 posts, the form shows it empty); (4) the post form shows the stored excerpt (100/104 posts have it in the DB). Fixes span summercms.go core (modules/cabana — coordinate with the concurrent session working in modules/) and sm-journal-plugin; release a summercms tag, bump the host, redeploy to UAT and re-run the staging smoke.
**Requirements**: TBD
**Depends on:** Phase 16
**Plans:** 0 plans
Plans:
- [ ] TBD (run /msd-plan-phase 16.1 to break down)
### Phase 16.2: Plugin-provided field types and the Blog Editor formwidget (INSERTED)
**Goal:** Plugins can register their own admin form field types (todo: cabana-richeditor-field-type), and the Journal plugin ships a first-class Blog Editor formwidget for post content — beyond the current markdown field or a plain rich editor — that edits imported HTML posts losslessly.
**Requirements**: TBD
**Depends on:** Phase 16.1
**Plans:** 0 plans
Plans:
- [ ] TBD (run /msd-plan-phase 16.2 to break down)
### Phase 17: Blog companions
**Goal:** The sitemap, menu and FAQ plugins run on SummerCMS as shared `sm-*-plugin` repos, so a blog site can manage its menus, FAQs and sitemap in the admin again instead of hardcoding them in the Nuxt app.

View File

@@ -0,0 +1,41 @@
# Phase 16.1: Journal admin urgent fixes - Context
**Gathered:** 2026-10-09
**Status:** Ready for planning (no discuss-phase run; decisions captured from the user directly)
<domain>
## Phase Boundary
Fix the four defects found on UAT in the Journal posts admin (uat.grzybyfunkcjonalne.pl/gfadmin/golem15/journal/posts), release, and redeploy:
1. List search fails with "The list could not be loaded." (`{"error":{"code":"error","details":{},"message":"Server error"}}`). Go log: `ERROR: column Categories.post_id does not exist (SQLSTATE 42703)` at summercms@v0.1.9 `modules/cabana/query.go:129` — search across a belongsToMany (pivot) relation builds a hasMany-style join.
2. List sort and filters are lost after opening a post and going back.
3. The post form shows `content` empty on every post, although the UAT database has `content` and `content_html` on 104/104 posts and the frontend renders them.
4. The post form shows `excerpt` empty, although 100/104 posts have `excerpt` in the database.
Out of scope: plugin-provided field types and the Blog Editor formwidget (Phase 16.2).
</domain>
<decisions>
## Implementation Decisions
- **D-01: List state lives in both the URL and the server session.** Sort, filters, search and page are reflected in the list URL query string (shareable, bookmarkable, back-button friendly). When the list is opened without list-state query parameters (for example from the admin navigation), the last state stored in the user's session for that list is restored. When the URL carries list-state parameters, the URL wins and also updates the session. User's words: "I may go back to Posts list through navigation and it's great if my filters were remembered + sharable URLs are nice to have."
- **D-02: The relation-search fix is a framework fix in summercms.go `modules/cabana`**, generic for belongsToMany (pivot) relations, not a Journal-specific workaround. Another session is concurrently working in `modules/`; plans must keep cabana changes in their own commits, stage files explicitly by path, and check for conflicting in-flight edits before touching shared cabana files.
- **D-03: Content and excerpt must show the stored values without loss.** Root cause is to be established by research (suspects: translatable-field overlay replacing host values with empty translations; the markdown widget not displaying imported HTML). Saving a post from the admin must not destroy imported HTML (see todo `journal-imported-html-admin-resave.md`); if a full fix needs the Blog Editor, 16.1 at least prevents data loss and 16.2 delivers the editor.
- **D-04: Ship to UAT.** Release a summercms tag carrying the cabana fixes (unless the concurrent session's release already includes them), bump `sm-grzybyfunkcjonalne-app`, redeploy to uat.grzybyfunkcjonalne.pl per its DEPLOY.md, and re-run `scripts/smoke.sh --url` on the server.
### Claude's Discretion
- Session storage mechanism and query-parameter naming for list state, following existing cabana conventions.
- Test strategy, within the lean-mode rule that unit tests are the last plan of the phase.
</decisions>
<canonical_refs>
## Canonical References
- `.planning/phases/16-grzybyfunkcjonalne-pl-on-reusable-blog-views/16-04-SUMMARY.md` — UAT server facts and deploy procedure
- `../sm-grzybyfunkcjonalne-app/DEPLOY.md` — redeploy steps (smoke runs on the server; UAT is behind basic auth)
- `.planning/todos/pending/journal-imported-html-admin-resave.md`
- `.planning/todos/pending/cabana-richeditor-field-type.md` (16.2, context only)
</canonical_refs>
</content>
</invoke>