Repository navigation
docs(admin-ui): the frames rule names a publishAt field that is gone - #905
Merged
Merged
Conversation
`publishAt` was replaced by Payload drafts in #124 and exists nowhere in `src/`. The frames paragraph is a path-scoped rule loading on every `src/components/admin/**/*.tsx` read, so the claim was injected into sessions editing the code it describes. The ticket scoped this to that one clause and recorded the rest of the sentence as correct. It was not. Four of its claims disagreed with the code, all in the same direction: they credited the collection with gates that only the editor applies. - Duplicate timestamps are allowed at the collection level. `meditationFrames.int.spec.ts` asserts it outright ("allows duplicate timestamps"), and so is one frame repeated at several times. - Timestamps are not stored as integers. Any finite non-negative number persists; `afterRead` rounds on read, not `beforeChange` on save. - A negative timestamp is dropped silently by the normalizer, not refused with an error. - "when audio exists" has no counterpart in the validator, which reads only the frame count. So the paragraph now separates the two layers instead of merging them: the collection errors once, on update, which is what refuses a publish with no frames; the whole-number, no-duplicate and one-hour rules are `validateTimestamp`'s, in the editor alone. Two further stale names, both the same class: - `getCategoryLabel` is cited in that sentence and exists nowhere. It was renamed `getFrameDisplayLabel` — the call sites still assign it to a `categoryLabel` local. - `seeds/wemeditate/AGENTS.md` mapped `published_at` to `pages.publishAt`. The importer reads it as a boolean and writes `_status` per locale; the date itself is never stored. The ticket's grep covered `docs/` and `src/`, so it could not see this one. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_017RanUBFbuBJmZkJ1YLyPfm
…s en The first version of this row claimed presence of `published_at` publishes that locale. It does not. `updateLocales` passes `publishSpecificLocale` with no `_status` in `data`, and this repo's own `seeds/AGENTS.md` records that such a write lands with the locale still `draft`. The base write sets `_status` from `translations.some(...)` at `locale: 'en'`, so any locale's flag publishes English and no other locale is ever published. Whether the importer should behave that way is filed separately; this row now says what it does. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_017RanUBFbuBJmZkJ1YLyPfm
railway-app
Bot
temporarily deployed
to
sahajcloud / SahajCloud-pr-905
October 9, 2026 23:00
Destroyed
|
🚅 Deployed to the SahajCloud-pr-905 environment in sahajcloud
1 service not affected by this PR
|
sydevs-bot
marked this pull request as ready for review
October 9, 2026 23:10
sydevs-bot
enabled auto-merge
October 9, 2026 23:10
Contributor
Author
|
Adversarial review skipped: 2 file(s), 4 changed line(s), under 🤖 sydevs dispatcher |
railway-app
Bot
temporarily deployed
to
sahajcloud / SahajCloud-pr-905
October 10, 2026 01:58
Destroyed
Open
49 tasks
Ardnived
approved these changes
Oct 10, 2026
11 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/rules/admin-ui.md's frames paragraph now states the gate that runs.publishAtwent in Replace custom publishAt system with PayloadCMS built-in drafts and scheduled publishing #124 and existed nowhere insrc/.Change outline
Contract —
docs/rules/admin-ui.md§ Frame editorThe paragraph is a path-scoped rule loading on every
src/components/admin/**/*.tsxread, so each line here is an instruction to the next session that edits the frame editor. One rule per line:Contract —
seeds/wemeditate/AGENTS.md§ PagesPreview
Documentation only — the diff touches no runtime surface, so there is nothing in the PR preview to open.
Test results
.claude/skills/pr-prep/check.sh— lint, typecheck (src), typecheck (tests), 2293 unit tests in 175 filestests/int/meditationFrames.int.spec.ts— 24 passedManual verification
git grep -n publishAtreturns nothing outsidetests/int/available-locales.int.spec.ts, where the hits are the local helperpublishAtlasLocale. The ticket'sgrep -rn 'publishAt' docs/ src/would not have shown those — a repo-wide grep does, so match on a word boundary if you re-run it.git grep -n getCategoryLabelreturns nothing.meditationFrames.int.spec.ts:236("allows duplicate timestamps"),:254(one frame at two times),:88(negative timestamps filtered, not refused),:432(publish refused without frames).Notes for reviewer
The ticket's premise did not hold, and that is most of this diff. It scoped the fix to the
publishAtclause and recorded the rest of the sentence as correct. Four of the remaining claims disagreed with the code, each in the same direction — attributing an editor-side rule to the collection.validateTimestampis imported only byFrameListManager, so none of its three rules has ever applied to a write that did not come through the editor. I rewrote the sentence to separate the two layers rather than patch the one clause, which is what acceptance criterion 2 asks for.getCategoryLabel, cited in that same sentence, exists nowhere — a sixth instance of #867's class, sitting beside the fifth. It was renamedgetFrameDisplayLabel; the call sites still assign it to acategoryLabellocal, which is what makes the rename legible.The ticket's grep missed a second
publishAt.seeds/wemeditate/AGENTS.md:58mapped it as a Pages field. Same removed field, same class, one line, and insideprAllowlistGlobs— so it is fixed here rather than filed.Filed, not fixed: #904. Correcting that mapping row meant reading the importer, which decides one publish state from every locale's
published_atand applies it toen, then publishes no other locale (updateLocalespassespublishSpecificLocalewith no_status, which this repo's ownseeds/AGENTS.mdsays leaves the locale a draft). A page live only in French upstream imports as English-published. That is a behaviour change across fourupdateLocalescallers and may be intended, so it wants a decision rather than a drive-by.Detail
On the guard the ticket asks about. The ticket proposes deciding here whether to build what #867 declined, rather than meet a sixth instance of this class. #867's guard (
tests/unit/doc-citations.spec.ts) resolves cited paths.publishAtandgetCategoryLabelare identifiers, which it cannot see. So the question is whether an identifier guard is viable.Measured, not estimated. Over the 36 in-scope docs, taking every backticked lowerCamelCase token outside a fenced block:
src/onlysrc,tests,seeds,scripts, root configs,.github/)Of the 32 survivors, two are the defects this PR fixes. The rest are correct prose naming something that is not ours to own: Payload internals (
deleteByID,appendNonTrashedFilter,replaceWithDraftIfAvailable,reduceFieldsToValues,commitTransaction, and eight more underdocs/rules/access.md), Next.js route config (generateStaticParams,dynamicParams,fetchCache,preferredRegion), Vitest (setupFiles), JSON Schema (anyOf), Node (unhandledRejection), aworkflow.jsonkey (worktreeSetup), and one deliberate historical reference two lines above the sentence this PR fixes (useLivePreviewAuto, naming whatpreviewTargetFieldreplaced).So the obvious shape is not worth building: roughly one real finding per thirty rows, and suppressing the rest needs exactly the allowlist #867 refused. A narrower resolver — per-doc scope, or a real symbol table — is a different and much larger piece of work than the path guard was, and it would still have to classify "names a third-party API" against "names ours".
What is cheap and does help is #867's own third follow-up, still unbuilt:
.claude/hooks/unit-test.mjsgates the Tier-1 lane onsrc/**andtests/unit/**, so editing a.md— the only act that can break a citation — fires nothing today. Adding.mdto that matcher makes the existing path guard run when it can actually catch something, at ~1.5s. It closes nothing for identifiers, and I have not done it here: it is a.claude/write, which this run cannot make.Review. No
pr-review-toolkiton this account (ListPlugins→ empty), so the pass was/code-review highplus/simplify. It raised one finding — that my first version of thepublished_atrow ("Presence publishes that locale") misstated the importer — which held up againstBaseImporter.ts:1084-1096and is fixed in its own commit.comment-lint.mjs --base origin/mainreports 0 changed files, since the diff adds no code comments.No security review.
securityReview.triggerPatternfrom.claude/workflow.jsonmatches neither changed path.No line numbers in the new prose.
docs/rules/code-comments.mdforbids pointing at a moving target, and the surrounding section already namessrc/components/admin/FrameEditor/, so the rewrite cites the validator and the hooks by name instead.Closes #901
🤖 Written by the sydevs autonomous loop — see what this is
🤖 Generated with Claude Code
https://claude.ai/code/session_017RanUBFbuBJmZkJ1YLyPfm
Generated by Claude Code