feat(webapp): the page's infobox — suggested facts by type and system, known facts, a map or picture with a caption (#1279) #1324
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/1279-infobox"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #1279, stage 1 with no AI (D319–D322; the drawing is lane 6i, also in this PR). Stage 2, the local model's suggestions, is #1280.
Reader
Editor
Server
e1279a0b1c2drevisesd1321c0e5a7b:lore_entries.image_caption,image_map_id(FK maps, SET NULL) andfacts_dismissed(JSONB, default[]). The downgrade is real.app/services/suggested_facts.jsonholds the lists from lane 6i for Pathfinder 2e, D&D 5e and Generic.image_caption,image_mapandfacts.GET /api/campaigns/{id}/wiki/suggested-factsis new. A map from another campaign is refused with 422.Checked
src/pages/wikiandsrc/wiki, 41 files and 604 tests passed. eslint has 0 errors.New wording goes on the Wording Review page before merge.
🤖 Generated with Claude Code
Render check: the seeded journeys stack built from this branch, light and dark, 1280×800 and 390×844, 36 shots. The migration ran up to
e1279a0b1c2d.facts, and the reader shows the new caption.Fixed after the check:
7d7133e6, a Generic campaign's sub-line said "Suggested for an NPC in Generic". It now reads "Suggested for an NPC".45c666e0, the chip said "GM only", and now says "GMs only", as everywhere else (#1296).Not exercised in the render: known values from the map, the sheet and the member. The seed's campaign is Generic, and its PC list has no sheet facts. The backend tests cover each of these, including the denials.
Seen, not caused by this PR: the seed's campaign has "Pathfinder 2e" as free text but isn't linked to the registry, so it reads as Generic everywhere that uses the linked system (rules browsing, sheets, and now these facts).
CI: the backend job failed on
tests/wiki/test_maps_migration.py::test_up_down_and_up_again. The suite builds its schema withcreate_all, so the newlore_entries.image_map_idforeign key was there when8b8c9d0e1f2a's downgrade droppedmaps(DependentObjectsStillExistError). It ran with-x, and the job had 9,755 passed before it.Fix, in
19226a99: the test's round trips now downgradee1279a0b1c2dfirst and upgrade it last, as the real chain does. The migrations are unchanged. The maps and infobox migration tests passed on the dev host (13), and lint is clean.The owner approved wording s-001 to s-009. This PR is set to merge when CI passes.
CI again:
tests/wiki/test_parties_migration.py::test_up_down_and_up_againfailed in the same way.8d4e5f6a7b8calso dropsmapsin its downgrade. Those two are the only migrations that do.To find anything else hiding behind
-x, I ran every migration test plus all oftests/wikion the dev host. That surfaced one more failure,test_title_readers: the new code's session-title read needed listing, and a type label usedstr.title().Fixes:
7e5586a2anda135bbf0: the parties round trip downgrades the infobox migration first and re-adds its key only wheremapsexists. That migration's upgrade doesn't recreatemaps.a135bbf0: the session title is listed as not a page's title, and the type label no longer uses.title().50ef9a24:wiki_facts.pyis formatted.Result: 2,096 passed, 0 failed, and ruff format and check are clean. The PR is re-scheduled to merge when CI passes.