Repository navigation
fix(app-shell): PageView builds the page context, never reads a refused context key (objectui#9673) - #10541
Merged
objectstack-fleet[bot] merged 3 commits intoSep 25, 2026
Conversation
…ed `context` key
PageSchema refuses a page-level `context` key, so the spread of
`(page as any).context` contributed `undefined` on every page that parses.
The node's `context` is now exactly `{ params, refreshKey }` and the cast at
that seam is gone.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D486C1axmXnrkJMNUfz2eb
…, refreshKey } Mounts the real PageView over a page that parses and over one that sneaks a refused `context` key in; both must hand SchemaRenderer the route-built context only (objectui#9673). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D486C1axmXnrkJMNUfz2eb
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D486C1axmXnrkJMNUfz2eb
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
objectstack-fleet
Bot
deleted the
claude/issue-9673-pageview-drop-context-spread
branch
September 25, 2026 08:10
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.
Fixes #9673
Clause-②: no
What changed
PageViewno longer reads a page-levelcontextkey. Thecontextit handsSchemaRendereris now built only from the route and the refresh counter: exactly{ params, refreshKey }. The(page as any).contextread and theas anycast on it are gone. This is the ruling on the card (comment 5811058824, letter remove).contextstays undeclared onPageSchema.PageSchemarefusescontext. So every page that parses spreadundefinedthere, and the line looked like an author channel that no author could use.contextis written after...page, so a stored document that never passedPageSchemaand still carriescontextno longer gets it through to the node either.Files:
packages/app-shell/src/views/PageView.tsx: the onecontext:line, plus a comment saying why it is built and not read.packages/app-shell/src/views/__tests__/PageView.context-9673.test.tsx: new pin, run through the realPageViewrender..changeset/9673-pageview-drop-context-spread.md:@object-ui/app-shellpatch.Pin and reverse verification
The pin mounts the real
PageViewwithSchemaRendererstubbed to capture the node, using the same harness aspage-kind-writing-end-9718. It has two cases:PageSchema.safeParsesucceeds) and a query stringaccount=42&tab=notes. The node'scontextmust equal{ params: { account: '42', tab: 'notes' }, refreshKey: 0 }.context: { leaked, params: forged }cast in (control:PageSchema.safeParsefails). The node'scontextmust still equal{ params: { account: '42' }, refreshKey: 0 }.Reverse verification, run after the fix was committed: I put the spread back into the committed
PageView.tsxwith a trap-guarded replace. On disk, the injected text counted 1 and the fixed anchor counted 0. Case 2 went red (Tests 1 failed | 1 passed) and case 1 stayed green, as expected, because spreadingundefinedchanges nothing on a page that parses. I restored the file withgit checkout HEAD -- PATH. After that,git diff HEADwas empty, the file on disk matched the HEAD blob hash, and the pin was green again (Tests 2 passed).Census (objectui#9438)
node scripts/page-key-read-census.mjsbefore the change:context [REFUSED], thePageViewread, and1 of 8 page key(s) ... REFUSED. After the change:OK every one of the 7 page key(s) read off the metadata cache is one PageSchema accepts, exit 0.The census script and its test are unchanged. The dispatch expected a live-instance list to edit, but none exists. The script works out its findings on each run, and neither
scripts/page-key-read-census.mjsnor its test names this site or pins a live count. Adding a count pin would write the instrument's answer into the tree, which AGENTS.md #9 forbids. The card's "two" live instances no longer hold either. The other one, thepageTyperead inusePageAssignment, was already retired by objectui#9674 (PR #10480). So after this PR the census reports zero refused reads, where the dispatch expected one.Checks (at head 16f38e2)
pnpm exec vitest runon the new pin,page-kind-writing-end-9718,PageView.test.tsxandscripts/__tests__/page-key-read-census.test.ts:Test Files 4 passed (4),Tests 23 passed (23).@object-ui/app-shelltype-check(tsc --noEmit && tsc -p tsconfig.test.json), run after building the@object-ui/app-shell^...closure (28 packages): exit 0.--listFilesincludes the new test..ts/.tsxfiles: 0 errors, 2 files by-f json. The only warnings areno-explicit-any(5 per file), andlint.ymldoes not set--max-warnings.PageView.tsxgoes from 5 to 4as any.check:vi-mock-specifiers,check:vi-mock-inherit,check:vi-mock-override-shape,check:test-path-roots,check:new-line-citations(0 new),check:control-bytes,check:changeset-claims,check:pending-changeset-literals,check-changeset-presence,check-changeset-no-major: all exit 0.packages/app-shell/suite: NOT MEASURED. It ran past the roughly 10-minute foreground limit and was terminated. The local run is narrowed to every test file that importsPageView. CI'spnpm testcovers the rest.Acceptance notes
packages/*/srcreadsschema.contextorcontext.paramsfrom a page node (hypothesis 2, by grep). None of the page fixtures in the tests that importPageViewwritescontext. Nothing downstream depended on author-supplied keys, so no fixture needed a fix.Generated by Claude Code