Repository navigation
feat(preview): render a user-submission proposal from postMessage - #212
Conversation
`pnpm types:cms`. SahajCloud#801 (its #695 Phase 3) landed the unified intake: `event-submissions`, `registrations` and `user-messages` are deleted, and one `user-submissions` collection replaces all three. Generated output only, and it introduced no type error of its own — every error the refresh surfaced came from the region widening in the commit after next, which is why this lands on its own. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FTRmrGNjcyhz3HidwWBoVH
`readLivePreviewParams` nulls any collection that is not the one literal, so the `/preview` arm matched nothing the CMS sent from the moment SahajCloud#801 renamed `event-submissions`. Nothing broke visibly — the route has never rendered a proposal — but the gate was dead rather than loud. The literal now has one home, `LIVE_PREVIEW_COLLECTION`, so the reader and the type cannot drift from each other again. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FTRmrGNjcyhz3HidwWBoVH
The `/preview` arm now renders. A manager reviewing a proposal sees the event as accepting it would leave it, beside the diff SahajCloud shows them. **It renders from the message, and fetches nothing.** API clients hold create-only on `user-submissions`, so the populate round trip Payload's own `mergeData` performs is a certain 403 — and a new-event proposal has no Event id to fetch instead. `mergeData` is only `requestHandler(…).then(res => res.json())`, so answering that handler locally turns the round trip into a pure read of what the panel already posted. **It reads `previewEvent` and drops the rest.** The message is the whole document form state: the submitter's address, their note, the `user` relationship, the screening result, the activity log. `readPreviewEvent` is the one door, so none of it can reach the screen, a log, a report or the cache. **The proposal renders under a reserved event id, at `/preview/0`.** `resolveStack` already reads a digit segment as an event drawer and skips the reserved `preview` word, so the whole drawer stack works unchanged. The reserved id also keeps an unsaved patch out of the key the saved event reads. **Relationships resolve by id, on our side.** The region comes off the wholesale tree the widget already holds; images get their own read, since `images` is readable where the submission is not. One that has not landed is left out rather than blocking the rest. `EventDoc.region` becomes nullish, and that is the one contract change here: a new-event proposal genuinely has no region, because SahajCloud assigns one from the submission row only when a manager accepts it. Every fetched event still carries one. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FTRmrGNjcyhz3HidwWBoVH
Three findings from the review pass over this branch. A message carrying no `previewEvent` — every message about a row that is not a proposal, and any read the projection's access refuses — put the skeleton back over an event the reviewer was reading. The event arm's parse gates a cache WRITE, so a failure there is harmless; this one feeds render state, so it has to be sticky. `alt` is localized on SahajCloud's Images, so the image read needs the locale in its key, exactly as `eventQuery` and `regionQuery` do. Without it a mid-session language switch left every caption in the first-fetched language. `JSON.stringify` throws on a cycle, and a structured clone can carry one. The library's listener holds no catch, so that throw would have ended the subscription rather than dropping one message. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FTRmrGNjcyhz3HidwWBoVH
…tions `getImages` is a new fetcher, so the data-layer rule names it and why it exists where a populated event needs none. The testing guide's jsdom precedent for the transport spec gains the submission arm's own reason: the waiting overlay is a portal, and the cache cannot see it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FTRmrGNjcyhz3HidwWBoVH
Deploying sahajatlas-design with
|
| Latest commit: |
8991439
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9f277369.sahajatlas-design.pages.dev |
| Branch Preview URL: | https://claude-feat-163-submission-p.sahajatlas-design.pages.dev |
Deploying sahajatlas with
|
| Latest commit: |
8991439
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e4e87c14.sahajatlas.pages.dev |
| Branch Preview URL: | https://claude-feat-163-submission-p.sahajatlas.pages.dev |
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The shape is right and tracks #163: the message is the only source, and readPreviewEvent is a real containment. The region widening is confined — the feed schema still requires one.
The resync is the shape question. 2256 of ~3000 lines are generated, and nothing in the feature needs them: mutate.ts addresses the dead endpoints by raw path, so the SDK's Config never gated them, and registrationQuestions is identical across both revisions. Say what depends on it, or land it alone.
Findings — should-fix: the sticky lastPreview ref defends a sequence with no producer. consider: two of shapePreviewEvent's five fallbacks duplicate newEventDefaults. consider: previewRegionId is exported for its spec alone.
Checked — #163, the hand-written diff, LivePreviewController.tsx, submission.ts. Consumer side: mergeProposal.ts, computeReviewFields.ts (loadTargetEvent is depth 0, so getImages answers a real gap), UserSubmissions/fields.ts, Events.ts. payload-types.ts diffed on both revisions.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`resolveRegion` was its only real user; the export and the barrel re-export existed for the spec alone, which is not a caller. The spec now asserts the region through `shapePreviewEvent`, where it covers both branches — a bare id looked up in the tree, and one the message already populated — rather than the extractor in isolation. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_017Top981CKVPvApH1t1EoUC
`shapePreviewEvent` stood in for `eventType` and `languages` as if it were replacing `newEventDefaults`, which already sets both — and an update proposal inherits its target's. So neither fallback fires for any proposal the CMS can produce, and `languages ?? []` disagreed with the `['en']` Accept would write. The one message that would reach them is a cleared required field, and Accept refuses to write that too. So the schema stops admitting it: the parse refuses, the caller holds the last good preview, and the reviewer is not shown a value nobody is going to get. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_017Top981CKVPvApH1t1EoUC
The ref stays; the sequence it defends is not the one the comment named.
A row's `type` is immutable after create and the route opens only for a
proposal, so `computePreviewEvent` does return the merged event on every
read of it — and the access refusal the comment also named strips the
field from the first message too, which is not a sequence.
What does produce one is the handler's own seed. `mergeData` builds the
endpoint from the MESSAGE's collection slug and our id, and returns the
handler's answer whole, merging nothing — so a message about any other
document is refused by `namesPreviewedDoc` and arrives as `{ id }`. The
transport spec now drives that path, and fails without the ref.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017Top981CKVPvApH1t1EoUC
|
Review round: two adopted, one answered. Pushed
The resync: nothing in the feature depends on it, as you found. It is this repo's 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
@sydevs-bot Address my last review and also determine why that review was not automatically picked up and addressed. File a ticket on |
* test(dispatch): pin the review-comment path, red against main
Four cases the suite never had. All 76 existing tests pass with and without
the fix that follows, because nothing covered the mapping at all: a review
comment resolved to reason `issue_comment` and no test asserted otherwise.
Committed red on purpose, so the evidence the fix is load-bearing is in the
history rather than in a claim. Against this commit's parent:
not ok 2 - resolve gives a review comment its own reason
not ok 20 - a review comment on a bot PR re-derives the PR
not ok 21 - a review comment from the bot, or from outside the allowlist
not ok 22 - a review comment carrying a verb on a human PR
Two of them pin note text, not just action types. `types()` renders every
note as the bare string `note`, and an unhandled reason returns exactly one
note, so the bot and stranger cases would both stay green on shape alone.
Refs #109
Claude-Session: https://claude.ai/code/session_01MZsMPSJuc6xW1xwMZpKu5w
Co-authored-by: Claude <[email protected]>
* fix(dispatch): a review comment is feedback, whatever its association
A CHANGES_REQUESTED review with four inline comments landed on
`sydevs/SahajAtlasWeb#212` and dispatched nothing. The PR sat untouched until
the reviewer asked why, eleven minutes later.
`resolve.mjs` mapped every review comment to reason `issue_comment`, whose row
gates on `hasAccess(association)` — OWNER | MEMBER | COLLABORATOR. GitHub sends
`CONTRIBUTOR` for a review comment by the same login it sends `MEMBER` for on
every issue comment, so both surviving runs logged `comment by Ardnived without
write access — not feedback` and returned a note. The gate is redundant where
it fired: the line above already requires `respondTo(author)`, an explicit
allowlist of three logins, and a payload-derived check over an allowlist can
only subtract.
The review's own event is the one path with no such gate, and it was cancelled.
Submitting a review with inline comments emits five events in one second, all
resolving to the same target and so to one concurrency group; three of the five
were cancelled, `pull_request_review.submitted` among them.
Cancelling is safe only because the decision is re-derived, which `dispatcher.yml`
says itself. The association gate is what broke that: the survivors returned
before reaching `evaluatePr`, so nothing re-derived anything.
So the reason, not the gate. A review comment resolves to `review_comment` and
delegates to `case 'review'`, which re-derives the PR through `evaluatePr` —
the invariant the concurrency block assumes, restored rather than replaced.
Whichever of the five survives now sees the thread the cancelled comment
created, since `gather.mjs` fetches review threads for any open PR.
Only the bot guard differs from `case 'review'`: that case's bot branch carries
the critic-header exception, which belongs to reviews alone. Everything after
it — the allowlist, bot PR to `evaluatePr`, human PR to `parseVerb` — is shared
rather than copied.
`association` leaves the review-comment facts with the reason; nothing on the
new path reads it. `triggerType` is untouched and still reaches the record, so
a handler still finds the comment it was woken for. The gate at `decide.mjs`
still guards `issue_comment` proper, where the author is not otherwise bounded,
and its test stays green. `dispatcher.yml` is unchanged.
Closes #109
Claude-Session: https://claude.ai/code/session_01MZsMPSJuc6xW1xwMZpKu5w
Co-authored-by: Claude <[email protected]>
* refactor: simplify per /simplify pass
Comment volume, and one fixture that was not earning its place.
Three comment blocks restated the narrative that `docs/why.md` already carries
under the anchor each of them links — the `CONTRIBUTOR` stamp said in full in
three files, and the SahajAtlasWeb#212 incident twice. Each keeps its imperative
half and its breadcrumb; the story stays in one place, where it cannot drift.
The bot half of the ignore test is what this row's own guard buys, and its
fixture did not punish removing it: a body of `finding` fails the critic-header
test, so `case 'review'` would have noted it either way. The comment now opens
with the critic header on a bot PR with an unanswered own-rooted thread, which
is the case the guard exists for. Delete the guard and the test goes red on
address-review firing against the bot's own words. Checked by deleting it.
Kept, against the pass: the verb-on-a-human-PR test, which reaches
`case 'review'`'s verb tail that nothing covered before, and the inert
`association: 'CONTRIBUTOR'` in its fixture, because that is the stamp GitHub
really sends on that payload.
Claude-Session: https://claude.ai/code/session_01MZsMPSJuc6xW1xwMZpKu5w
Co-authored-by: Claude <[email protected]>
* docs(dispatch): the restored invariant holds for bot PRs, not every PR
The review pass caught the comment and `why.md` claiming more than the code
does. Both said a surviving leg re-derives the PR's whole state, full stop.
That is true through `evaluatePr`, which only bot PRs reach. A human PR takes
`case 'review'`'s verb tail, which reads the body the event carried — so a verb
left in the review body is still lost when that leg is the cancelled one.
The gap predates this change and survives it. Closing it means widening what
`gather.mjs` collects, since the snapshot carries issue comments and not
review-comment bodies. Named rather than fixed, because it is nobody's surprise
the next time it fires.
Claude-Session: https://claude.ai/code/session_01MZsMPSJuc6xW1xwMZpKu5w
Co-authored-by: Claude <[email protected]>
* docs(dispatch): the critic's own review is the one uncovered leg
The restored invariant was stated too broadly. On the loop's own critic
review every review-comment leg stops at the bot guard, so only the
`pull_request_review.submitted` leg re-derives, and cancelling it leaves
nothing behind it. The `unlock` the critic's own lock release fires is
what covers that case, not this row.
why.md now says which legs the claim holds for and names the mechanism
that covers the remaining one. The comment above `case 'review_comment'`
carried the same overclaim in one clause; it now reads "from a human on
a bot PR", which is what the guard two lines below already enforces.
Prose only. No behaviour changes: 80/80 specs unchanged.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Qcz8KMA9UAMtFUnkJkTAJy
---------
Co-authored-by: Claude <[email protected]>
|
Asked. Nothing adopted, nothing pushed — the one new thread turns on a decision only you can make.
Still waiting on you, both answered with evidence: the closed populate endpoint and that same offer. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Ardnived
left a comment
There was a problem hiding this comment.
@sydevs-bot Revise this PR to account for the changes being merged into SahajCloud via sydevs/SahajCloud#816
SahajCloud#816 populates `previewEvent.images` with image documents, in the editor's order, so the widget's own read of the `images` collection has nothing left to do. `getImages`, `imagesQuery` and `EventImageDoc` go with it, and the arm's second query goes with them: `region` is now the only relationship arriving as a bare id, and it resolves off the region tree the widget already holds. The array stays tolerant per ENTRY rather than whole. A CMS that has not shipped #816 yet still posts bare ids, and one of those costing the whole array would cost the reviewer every photograph on the event, while one costing the parse would blank the preview entirely. So an entry that does not parse drops out — the same thing the producer does with an id whose row has gone. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LH37839ZoJfX1iJSQnPNha
|
Adopted SahajCloud#816 and pushed —
Lean gate ✓ 121 files, 1548 tests. Build + Still open for you: the 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
#215 landed the `scope` parameter and the `documentPreviewActive()` gate on the same four files this branch rewrites. Both sides are kept. `boot.ts` — the session keeps no `collection` (this branch) and gains `scope`, read on every route (#215). `protocol.ts` merged clean and already carries that shape. `LivePreviewController.tsx` — both imports. The gate turns a scoped session away, and the document arm below it still picks the submission arm on a boot id. `boot.test.ts` — #215's two scope cases join this branch's "reads no collection off the boot URL", which subsumes #215's collection-nulling case: the field is gone from the session, not narrowed. `transport.test.tsx` — reset through `LIVE_PREVIEW_INACTIVE`, which is #215's own fix for the `scope` leak this branch's spec would otherwise carry. Lean gate green: lint, typecheck, 1559 tests across 122 files. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Kfq22tgTDMm49n4PYHJRQr
|
Merged Two hunks where the choice was not obvious:
The rest was additive: 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
/previewnow renders a proposal. A manager reviewing one sees the event as accepting it would leave it, beside SahajCloud's own diff.payload-live-previewmessage and makes no request of its own — API clients hold create-only onuser-submissions, so a populate round trip is a certain 403, and SahajCloud#816 populates the message's relationships instead.previewEventand drops every other key, so no submitter email, note or screening result reaches the screen, a log, a report or the cache.Changes
src/config/live-preview/protocol.ts—LIVE_PREVIEW_COLLECTION, one home for the slug. It was stillevent-submissions, so the/previewarm had matched nothing the CMS sent since SahajCloud#801. Since3d046c8nothing reads it off the URL:/previewserves one collection, so the slug is only what the message filter matches.src/config/live-preview/boot.ts— the boot reader takes the token and the id, and nocollection(3d046c8).src/lib/live-preview/submission.ts— new, pure: the PII containment (readPreviewEvent), the tolerant parse, and the shaping into an event document.src/components/live-preview/— one file per arm sincef9343dc.SubmissionLivePreview.tsxis this one (subscribe, resolve the region, seed the cache, pin the route).populate.tsandroute-lock.tshold the two seams all three arms sit on.LivePreviewController.tsxkeeps the guards every session shares and the choice of arm.src/types/event.ts—EventDoc.regionbecomes nullish. See Notes for reviewer.src/types/payload/—pnpm types:cms, its own commit. Generated only, and it introduced no type error of its own.Preview
https://claude-feat-163-submission-p.sahajatlas.pages.dev — the branch alias. This route only renders inside SahajCloud's admin iframe, so a preview link cannot show it on its own; see Manual verification.
Contract impact
main(39b7add). That PR populatespreviewEvent.imageswith image documents in the editor's order, and names the region Accept will write on a new-event proposal. SogetImages,imagesQueryandEventImageDocare deleted here, and the arm issues no read of its own. The dependency degrades rather than breaks: without #816 a bare id fails its own entry and drops out, so the preview shows no photographs rather than blanking.main(its #801 / #695 Phase 3):event-submissions,registrationsanduser-messagesare gone, replaced byuser-submissions. No other consumer reads this repo's copy.contractStep(.claude/workflow.json), which the finalize pipeline runs on every PR, landed alone in5c6b880so it reverts alone.LIVE_PREVIEW_COLLECTIONis a bare literal,mutate.tsaddresses the retired endpoints by raw path, andregistrationQuestionsis identical across both revisions.collectionparameter is no longer read. SahajCloud keeps sending it (plugins/formBuilder/index.ts:185) and the widget ignores it, so this needs no upstream change and breaks no existing preview URL.docs/embedding.mdandCHANGELOG.mdare deliberately untouched.Test results
pnpm lint && pnpm typecheck && pnpm test:run— 121 files, 1548 testssrc/lib/live-preview/andsrc/components/live-preview/pnpm build+pnpm sizeon39b7add—standalone295.0 / 308 KiB,embed296.9 / 308 KiB,loader2.6 / 3.5 KiB. 0.1 KiB smaller than3d046c8, the deleted fetcher.Manual verification
Everything below needs SahajCloud's admin, which no automated lane here reaches, and #816's branch for steps 3 and 4.
user-submissionsrow withtype: 'proposal'in the admin. The Live Preview panel opens by itself; the atlas should show a spinner, then the merged event's drawer.proposedfields and confirm the drawer follows each keystroke — not just the first.user-submissionsand none toimages.event). It should name the region screening anchored, and render with no photographs rather than an error.senderEmailorsubmissionData.Notes for reviewer
EventDoc.regionis now nullish, and that is the one contract change. A proposal whose screening has not anchored a region names none, and SahajCloud'ssubmissionRegionIdreturns null for it. Every fetched event still carries one, andsrc/types/event.test.tspins both directions. One call site needed a guard (EventMetadata's JSON-LDPlace).computePreviewEventmirror the write throughsubmissionRegionId, the disagreementmergeProposal's own docblock called worse than no diff. §3 of Event submission preview — render a user-submission proposal from postMessage #163 still forbids reading the submission's ownregionoff the message, and this repo does not.main(5c835b4).access/config/roles.ts:106-123grantssahaj-atlas-clientcreate alone,config/projects.ts:169marks the collection restricted so no implicit project read rides along, and a verified preview token lifts drafts rather than permission (accessConfigs.ts:126). SahajCloud#814 took Option 1 — populate incomputePreviewEvent— so the grant is untouched and the widget reads nothing back.Widget.standalone.test.tspins the Payload hook's importers as a closed list, so the second importer is a decision, made inf9343dc: both files sit behind the one lazy seamApp.tsxmounts the controller through./previewshould become a contained/proposalroute (the controller is not proposal-only, and the literal is SahajCloud's), and the standing offer to dropuseLivePreviewand read the message directly — which removes the fake populate, the id trick, and the reach into Payload internals.main:createRegistrationstill POSTs/events/:id/registerandsendReportstill POSTs/user-messages, endpoints SahajCloud#801 deleted. feat(api): migrate widget intakes to unified form-submissions #195 owns both, and this PR's type resync only makes them legible. Nothing here calls either./security-reviewran (the diff touchessrc/config/api/,src/types/event,src/lib/shape/path) and found nothing above threshold.Detail
Why a reserved event id at
/preview/0. A proposal is not an event: a new-event one has no id, and an update proposal's merged shape is not whatevents/<id>would answer, so seeding the real id would put an unsaved patch under the key the saved document reads.resolveStackalready skips the reservedpreviewword and reads a digit segment as an event drawer, so/preview/0opens one with no change to the router, the drawer stack orRESERVED_SLUGS.Why the boot route names no collection.
/previewserves exactly one, so the route already says which, and the parameter beside the id was a second unauthenticated claim about what is on screen — plus a literal that had to stay in step with the CMS's slug, and silently did not through SahajCloud#801's rename. The session drops the field, the arm opens on the boot id (read on/previewand nowhere else), andnamesPreviewedDocstill matches the posted message againstLIVE_PREVIEW_COLLECTION. A/preview/user-submissionspath instead would need SahajCloud to compose it, and SahajCloud#723 owns retiring the route outright.Why the populate handler answers locally, and keeps the submission's id.
mergeDatais onlyrequestHandler(…).then(res => res.json()), so answering it in the browser turns the round trip into a pure read of what the panel already posted. It answers{ id: <submission id>, previewEvent }rather than the event itself, because the library caches what it returns and addresses the next populate at<collection>/<that result's id>— returning the merged event would re-address message two at the event's id andnamesPreviewedDocwould refuse every edit after the first. The transport spec pins that second edit.What makes a refused message survivable.
mergeDatareturns the handler's answer whole and merges nothing of its own, so everyseed()reaches the call site as{ id }with nopreviewEvent. The endpoint it gates on is built from the message's collection slug plus our id, so a message about any other document is refused bynamesPreviewedDocand arrives that way. The event arm gets stickiness free — its parse gates a cache write — while this arm's feeds render state, which is what thelastPreviewref is for.Relationship hydration, and where the tolerance had to move. #163's scope said to confirm
region/imagesstill resolve from the pushed ids.imagesnow arrive as documents (SahajCloud#816), so nothing resolves them here.regionstays a bare id on purpose: raising the producer's depth is shared withcomputeProposedChanges, where a populated relationship renders by name instead of by row id and would change what the reviewer reads. The widget already holds the whole tree, so it costs no request.The
imagesarray is therefore tolerant per entry, not as a whole. A CMS that has not shipped #816 posts bare ids, and one of those failing the array outright would cost the reviewer every photograph on the event, while one failing the parse would blank the preview — so an entry that does not read drops out, exactly as the producer drops an id whose row has gone.Where the tolerance stops.
eventTypeandlanguagesare not relaxed:newEventDefaultssupplies both on a new-event proposal and an update proposal inherits its target's, so a message missing one is a cleared required field — which Accept refuses to write too. The parse refuses it and the last good preview stays on screen, rather than a fallback showing a value nobody is going to get.id,title,region,registrationMode, the relationships and a half-typedscheduledo stay tolerant.Why the split is three files and not two. The submission arm shares exactly two things with the event and region arms:
namesPreviewedDoc, the document filter that keeps one arm from rendering another's document, and the route lock. Everything else is disjoint — the other two populate against the CMS and overlay the drawer's own cache entry, while this one answers in the browser, has no saved document to fall back on, and renders its own waiting state. So the two shared pieces became their own modules rather than exports of an arm, and no arm imports another.Every new assertion was watched failing. Each defect was reintroduced at the site that caused it, per
docs/testing.md: the containment removed fromreadPreviewEvent(2 red), the real event id kept (1), the reserved id dropped from the path (1), the schedule tolerance removed (1), the region tree ignored (1), the submission dispatch removed from the controller (4), the handler answering with the merged event directly (4), the containment removed at the handler (3), and the sticky-preview ref removed (1). The first review round added four: the populated-region branch deleted fromresolveRegion(1), the id filter dropped frompreviewImageIds(1), the nullish tolerance restored to the schema (1), and the sticky ref removed again against the new other-collection message (2). The second added one: the collection read restored toreadLivePreviewParams(3). The third added two, at their own sites: the per-entry image tolerance narrowed back to a whole-array parse (2 red), and the null filter dropped fromshapePreviewEvent(1).The skeleton assertion needs a DOM, and the cache cannot stand in for it. A later message with no
previewEventleaves the cache entry untouched while covering it with the overlay, so a cache-only assertion passed with the defect reintroduced. It now asserts the portal'srole="status".Closes #163
🤖 Written by the sydevs autonomous loop — see what this is
🤖 Generated with Claude Code
https://claude.ai/code/session_01LH37839ZoJfX1iJSQnPNha