Repository navigation
canCall's role table shares one object per gate, so the index chunk carries no literal per op - #375
Merged
Merged
Conversation
…nk carries no literal per op Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
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.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
The dashboard's index chunk is 2 kB smaller uncompressed, which keeps it under its bundle budget: its table of the role each operation needs shares one object per gate.
Why
OP_MIN_ROLE(frontend/src/lib/canCall.ts) sits in the index chunk, and each of its 72 entries was its own{ min, by }object literal, which the minifier keeps per entry. The index chunk was 119.9 kB of its 120 kB budget, so the next few gated dashboard controls would each failnpm run budget.Scope and risk
VIEWER,WRITER,ADMIN,ADMIN_CLAIM), each anOpGate, whose fields are nowreadonlyso no write can change every op sharing one; every entry names one. The table's keys and each op's role are unchanged, andcanCall.test.tsstill checks every namespace entry against the generated SDK's roles.npm run budget, before → after:index … 119.9 kB→index … 117.9 kB(uncompressed, what the budget measures);boot scripts 185.7 kB gzipped→185.5 kB gzipped.Compatibility, rollout and rollback
Tests
src/libandsrc/layout(551 pass),tsc -b,npm run budget, biome format and lint.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. I checked the budget before and after.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
npm --prefix frontend run build) and its tests pass, iffrontend/changed.git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code