Repository navigation
fix(app-status): report a configured page that is trashed or unset - #1255
Conversation
The Pages section dropped a wm-app-config slot whose page it could not find, so a page trashed after the config named it (`required` is only checked on save) disappeared from the report while no client could read it. Such a slot now gets a failing row with a new `exists` check, labelled by slot name. Refs #1252 Co-Authored-By: Claude Opus 5.5 <[email protected]>
One row shape for found and missing pages, slots labelled as the admin labels them, the nodes read at depth 0 (a trashed node page was populated to null and misread as unset), and a string id for a missing row so it no longer links to a document that will not open. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…sts column Review findings: a missing row's string id fell back to the pages list, the always-green exists column added nothing the label and failing checks did not say, and the row id embedded a label that a rename would change. Covers a trashed node page too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🚅 Deployed to the SahajCloud-pr-1255 environment in sahajcloud
1 service not affected by this PR
|
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is the right size for #1252's second criterion, and the shape is right: building rows from the configured slots rather than from the query's results is what makes a dangling slot reportable at all. Nothing is smuggled and no contract surface is touched.
The one shape-level question is reach. The PR learns that a depth-1 read nulls a trashed ref, acts on it for the nodes query, and leaves appConfig.ts — same directory, same global, same getWmAppConfig — reading at depth 1 with the same mislabel.
Findings
should-fix—appConfig.ts's two slot rows still mislabel a trashed ref asNot set→sections/pages.ts:71should-fix— Streamline:APP_REQUIRED_PAGE_FIELDSis a second export of one list, and "REQUIRED" names no subset →WeMeditateAppConfig.ts:22should-fix—lib/status/types.ts:18still scopes sentinel ids to single-row groups →sections/pages.ts:37- Not this PR:
SubtleSystemNodes.ts:32comments theslugaccess override "Vimeo URL is immutable after creation".
What was checked
Read whole on the branch: both touched globals, sections/{appConfig,shared}.ts, five lib/status/ modules, ReadinessGroup.tsx, SubtleSystemNodes.ts.
- The outline's link claim holds:
resolveLinkteststypeof id === 'number'before the group's global, so a found page still opens at/admin/collections/pages/<id>and only a sentinel reacheswm-app-config(ReadinessGroup.tsx:200-209).subtle-system-pagesnames no global, so its sentinels fall to the pages list — dismissal accepted. page?._statusandrichTextHasContent(undefined)both yield false, so a missing row fails every check as claimed.- Preview: the diff touches no
fixture.surfacePathsand no fixture setswm-app-config, so "No preview surface" holds. - Streamliner: 3 pieces covered, 2 kept, 1 posted.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
Payload populates a trashed document whole, `_status` included, so the self-realization meditation row reported a meditation no app client can read as set and published. A read that excludes the trash decides the row now, and a slot nothing resolves to fails every check and names the id it holds. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZ1gjy2a6pKJ8sukEL
`core-pages` mints one across 14 rows and `subtle-system-pages` across 12, so the parenthetical described a rule the code no longer follows. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZ1gjy2a6pKJ8sukEL
`APP_REQUIRED_PAGE_FIELDS` was `APP_PAGE_FIELDS.map((p) => p.name)`, and the field factory marks every entry required, so "REQUIRED" named a subset that does not exist. Its four call sites read `.name` instead. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZ1gjy2a6pKJ8sukEL
The comment beside `update: () => false` described a Vimeo URL, copied from another collection. A migration seeds exactly these twelve rows and every consumer joins on the slug, which is why it cannot be re-pointed. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZ1gjy2a6pKJ8sukEL
|
Three threads addressed, all adopted. Pushed
Joined, comment-only: The body's "Why depth 0 on the nodes read" claimed a populate nulls a trashed target. Corrected there. Lean gate green; 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
There was a problem hiding this comment.
Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. 🤖 Written by the sydevs autonomous loop — see what this is
All three conflicts come from #1255, which reports a wm-app-config slot whose page is trashed or unset. - `Pages.ts`: #1255 renamed `APP_REQUIRED_PAGE_FIELDS` to `APP_PAGE_FIELDS` in the `appUrl` gate this branch deletes, so the branch's `isPagePlaced` clause stands and the import goes with it. The rename survives where it is read. - `WeMeditateAppConfig.ts`: both exports. #1255 dropped `APP_REQUIRED_PAGE_FIELDS` because every slot was required, and `liveMeditationsReminderPage` makes the subset real again. `APP_PAGE_FIELDS` keeps the export #1255 gave it — the status report reads it. - `wm-app-config.int.spec.ts`: both assertions. The Pages tab now holds a `pageTags` select beside the slots, so #1255's unfiltered count no longer matches; it is filtered to relationships and keeps its meaning. The branch's required-subset assertion stands beside it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWUDqgxsj1zo6Ki8KF
#1255 fails any wm-app-config slot it cannot resolve, on the premise that every slot is one a released build has no fallback for. This branch adds `liveMeditationsReminderPage`, which released builds find by slug, so the merged report turned red on a slot nobody is required to fill. Only an unset optional slot is skipped. One naming a trashed or deleted page still fails every check, which is the case #1255 exists for. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWUDqgxsj1zo6Ki8KF
Summary
sahaja-yoga) had never been published. It is now published in 14 locales in production; no code was needed for that.SubtleSystemNodes.slug'supdate: () => falsedescribed a Vimeo URL, copied from another collection.Change outline
Flow —
pagesSection.prepareRows are built from the configured slots rather than from the pages the query returned, so a slot with no page behind it still gets a row.
Behaviour — where a missing core row links
A string id already means "link to the group's global".
core-pagesnow nameswm-app-configthere, so a missing slot opens the config where it is fixed; a found page still opens the page.WeMeditateAppStatusSpec.groupGlobalMap src/globals/WeMeditateAppStatus/WeMeditateAppStatus.ts 'vibe-check-tracks': 'wm-app-config', + 'core-pages': 'wm-app-config',Flow —
appConfigSection.prepareA populate carries a trashed document whole,
_statusincluded, so the slot read as ready. One read per slot that excludes the trash decides the row instead.Preview
No preview surface. The change is in
src/globals/WeMeditateAppStatus/, and the fixture sets nowm-app-config, so every core slot on a preview reads "not set".Test results
wemeditateAppStatus.int.spec.ts27 passed;wm-app-config.int.spec.tspassed;pages.int.spec.ts20 passedmain'spages.ts(expected undefined to be 'Sahaja Yoga Page — page 4 not found')expected 8 to be 'missing:selfRealizationMeditation')Manual verification
GET /api/globals/wm-app-config?depth=0&select[sahajaYogaPage]=truenames 6, andGET /api/pages/6?depth=0&select[slug]=true&select[webUrl]=truereturns 200 withwebUrl: https://wemeditate.com/sahaja-yoga(checked 2026-11-23, also forshriMatajiPage4,explorePage93 andsubtleSystemPage5).Node <slug> — page N not found.Notes for reviewer
lessons.tsreads lessons at depth 0, sointro-audio-set,meditation-setandicon-setpass when the target file or meditation is in the trash.Node pingala), not its display name (Right Channel). The label helper lives insrc/components/admin/FrameEditor/utils.ts, and moving it intosrc/lib/subtleSystemtouches admin components for an edge-case label.pages.existsrelies on the query excluding trashed pages." The new case pins that: it trashes a page and asserts the row.fallbackLocale: false."subtle-system-nodes.pageis not localized.Detail
The production write (2026-11-23). Page 6 was imported on 2026-01-23 and had three versions, all drafts, in every locale. Fourteen locales hold about 9–10 KB of content each; Spanish has a title and empty content. It was published through the Local API from a checkout of the deployed commit (
dd876a03), one locale at a time withpublishSpecificLocale(never all locales), as the admin manager withcurrentProject: null. After each step, every locale's title and content were compared with the backup (key-order-insensitive), and each matched. Spanish stays a draft. The main row and its latest version were backed up first.Why the
existscheck was dropped during review. It added a column that is green on every healthy row. A missing page already fails both checks, and its label says which case it is.Why depth 0 on the nodes read. Only the id is used, so the population was wasted work — and it could not have answered the question either. Measured on this branch: at depth 1 Payload populates a trashed page whole,
_statusand all, so a populate never tells a live reference from a dangling one. What excludes the trash is thepagesfind below it, which is why the row is decided there. The same measurement is whyappConfig.tsneeded its own read rather than a depth change.Closes #1252
🤖 Generated with Claude Code