Repository navigation
fix(meditations): stop keyframes carrying their chakra node's whole page - #1233
Merged
Merged
Conversation
The `frames` afterRead hook enriched each keyframe with a `frames` read at the config's default depth 2, so every chakra frame brought subtleSystemNode -> page along: the page's content, author and managers, on every meditation read. A JSON field takes no `select`, `depth` or `populate` from the caller, so no client could narrow it — WeMeditateWeb shipped ~57 KB of it per meditation page, and the mobile app's `frames][…]` select keys are silently ignored. Read at depth 1 and populate the node as its slug alone. Not depth 0: the installed app and the FrameEditor read `subtleSystemNode.slug` off a populated object. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🚅 Deployed to the SahajCloud-pr-1233 environment in sahajcloud
1 service not affected by this PR
|
railway-app
Bot
temporarily deployed
to
sahajcloud / SahajCloud-pr-1233
November 20, 2026 00:37
Destroyed
Contributor
|
🤖 no session running Written by the sydevs dispatcher. Sessions never edit this comment. |
Contributor
Author
|
@sydevs-bot approve |
sydevs-bot
approved these changes
Nov 20, 2026
sydevs-bot
left a comment
Contributor
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
Contributor
|
Adversarial review skipped: 2 file(s), 38 changed line(s), under 🤖 sydevs dispatcher |
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
framesafterRead hook insrc/collections/Meditations/Meditations.tsnow reads frames atdepth: 1withpopulate: { 'subtle-system-nodes': { slug: true } }. Before, it used the config'sdefaultDepth: 2, so every chakra keyframe carriedsubtleSystemNode.pagein full (content, author, managers, webUrl).Why here, and not in a client
framesis a JSON field that this hook fills with its ownpayload.find. That read takes noselect,depthorpopulatefrom the request, so no client can narrow it:frameson/meditations/17and tried everydepth,populateandselectvariant against production. None of them changed the result. test(meditations): cover loadMeditation WeMeditateWeb#297 had been trimming keyframes on its own side. That trim is now removed in favour of this fix.frames][url,frames][subtleSystemNodeand similar keys (meditation_payload_remote_data_source.dart,path_payload_remote_data_source.dart). They are ignored, so every installed release downloads the pages too. This fix shrinks the app's reads with no app release.Why
depth: 1and notdepth: 0The installed app (
meditation_frame.dart,_resolveFrameCategory) and the FrameEditor (getFrameSubtleSystemNodeSlug) readsubtleSystemNode.slugfrom a populated object. At depth 0 that field would be a bare numeric id, and both would lose the chakra. With this change the node arrives as{ id, slug }. Every field of the frame itself is unchanged.Not changed: the inner read still passes no
req. Frames and subtle-system nodes have no localized fields, so the request locale makes no difference. Passingreqwould also route the read through the API-clientselectgate.Tests
tests/int/meditationFrames.int.spec.ts,Keyframe enrichment. It reads a meditation with a chakra keyframe at the default depth and checks thatsubtleSystemNodeis exactly{ id, slug }and that the frame's own fields are still there. Verified that it fails with the two new lines removed (the diff showspagereturning).check.sh) passes: lint, format, typecheck, test typecheck, and 282 unit files.🤖 Generated with Claude Code