Repository navigation
fix(app-shell): a member Setup refuses gets the app's no-access page on Setup's settings and marketplace routes - #27590
Merged
Conversation
…pp's access verdict Fixes the member landing in the default app's chrome on /apps/setup/system/settings[/:namespace] and /apps/setup/system/marketplace[/...]: those routes now await Setup's access verdict like Setup's root and the metadata routes, and draw the app root's no-access page on denied. Claude-Session: https://claude.ai/code/session_01Utp6CZ9nhZe8YouxkXECUs Co-authored-by: Claude <noreply@anthropic.com>
…s no-access page Claude-Session: https://claude.ai/code/session_01Utp6CZ9nhZe8YouxkXECUs Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC
A re-run of the failed jobs is the seat's act ( |
Contributor
Author
|
domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC 席位核对ACCEPT · head
Generated by Claude Code |
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.
domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC
Requested by Bill · project thread
Fixes #27507
Clause-②: no
Metadata-protocol: none
维护者速读
system/settings、system/settings/NAMESPACE)和应用市场(system/marketplace、system/marketplace/PACKAGE)时,不再落进默认应用(如 Showcase)的外壳里看「No settings registered」或原始权限报错,而是和打开 Setup 根路由一样,看到「You don't have access to this app … Back to home」。system段,属于伪路由,过去不等待 Setup 的访问裁决,直接回落到默认应用;三处页面各自解读服务端的拒绝,出了三种说法。分诊裁定:一律走应用根已有的无权限页,不新增文案。ui/packages/app-shell/src/console/AppContent.tsx中isSettingsOrMarketplaceRoute与appSurfaceAwaitsVerdict两行;然后是新测试AppContent.settingsMarketplaceVerdict-27507.test.tsx。pnpm --dir ui exec vitest run packages/app-shell/src/console/__tests__/AppContent.settingsMarketplaceVerdict-27507.test.tsx,预期 11 个用例全绿。What changes
AppContent(app-shell) already waits on the access verdict for the app the URL names on two pseudo-route families, Setup's root and the metadata-admin routes (objectui#12706), and drawsrenderAppAccessDeniedondenied. This adds a third family toappSurfaceAwaitsVerdict: a route whose sub-path issystem/settings...orsystem/marketplace...(isSettingsOrMarketplaceRoute). Nothing else moves:!matchedApp), so an admin, and any caller under an app they may open, render the pages exactly as before, unprobed.denied(not_found,unreachable,unknown,granted) falls through to the pseudo-route rendering, unchanged.system/approvals, where the server's approval links forward) and the record pages it opens (OBJECT/record/ID). Their pins inAppContent.setupItemRoutesVerdict-12706.test.tsxare untouched and green.systemlanding is not in the set: it forwards ontosystem/settings(the console host'sSystemLandingRedirect), which is refused. A pin holds that chain.SettingsView's error text andMarketplaceAccessDeniedare unreachable for a caller Setup refuses, and stay as they were for a caller Setup admits.Changeset:
@object-ui/app-shellpatch.Tests
New
ui/packages/app-shell/src/console/__tests__/AppContent.settingsMarketplaceVerdict-27507.test.tsx, on the 12706 file's harness (a realObjectStackAdapterover a stubbedfetch, so the verdict comes from the real probe reading a real 403 envelope; page stubs count their mounts):settings/auth,settings/localization), on the marketplace it names, and on a marketplace package page:app-access-denied, noConsoleLayout, zero page mounts, exactly one probe and it is Setup's, URL unchanged, the Back-to-home button present./apps/com.objectstack.setup/system/settings/auth): same verdict, probed by that address./apps/setup/system: forwards to the hub and is refused there.Ablation (the predicate disabled via
scripts/ablation-replace.mjs, anchor hit 1 to 0, restored to the HEAD blob withgit diff HEADempty): 7 of 11 cases red, the 4 controls green.Acceptance notes
manage_platform_settingscan still type/apps/setup/system/settings/authand seeSettingsViewprint the server's error message verbatim. The hub does not list that namespace for them, so it is reachable only by URL; not reproduced in a browser here.system/*routes the card does not name (system/apps,system/audit-log,system/ai-approvals,system/profile). Whether they wait on Setup's verdict is the same product question objectui#12706 left open for the approvals routes.Verification
Targeted tests and typecheck (head after the main merge)
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/console/__tests__/ apps/console/src/__tests__/AppContent.systemHubRoutes.test.tsx: Test Files 58 passed (58), Tests 408 passed (408).pnpm --filter @object-ui/app-shell run type-check: exit 0; the new test file is intsconfig.test.json's program (--listFilesOnlycount 1).eslinton the two touched source files: 0 errors; no warning on a touched line.Derived gates
At head
244ec6aa,node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 34 derived; each run and recorded, reconciled with--ran: "34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED". Pluscheck:new-line-citations(0 new citations) andcheck-nul-bytes(exit 0).Generated by Claude Code