Repository navigation
Plugin packages' same-server reads stay cookie-only and break under a bearer-only session: the #37080 family outside app-shell and the console (16 files), plus two app-shell reads the #37185 ratchet does not see #37225
Description
repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D
Filing gate: ① a product defect with named locations (a closure card for one mechanism) · Source: fleet (the #37080 dev's out-of-scope findings in its round-0 report on PR #37185; the seat repo:objectstack#4 ruled that they be filed as one closure card; filed by zone a4-U)
What happens
#37080 (PR #37185) moves the same-server /api/ reads and writes in ui/packages/app-shell/src/** and ui/apps/console/src/** from a bare fetch(…, { credentials: 'include' }) to createAuthenticatedFetch (@object-ui/auth). Under a bearer-only session (no session cookie, for example a cross-site embed or a cloud tenant whose cookie is not sent), a cookie-only call is answered as anonymous. Its feature then shows nothing, or a 401 that never reaches the session-ended check.
The same mechanism remains outside those two trees. It also remains in two app-shell reads that #37185's ratchet does not cover.
The sites, enumerated at origin/main 93bd459
Files that carry credentials: 'include'. The number is the count of matches. The marker bearer by hand? means the file names Authorization or an authenticated fetch somewhere, so some of its calls may already carry the bearer; the dev measures each call.
ui/packages/components/src/share/ShareDialog.tsx(3)ui/packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts(2)ui/packages/plugin-grid/src/hooks/useRowApprovalLocks.ts(1)ui/packages/plugin-detail/src/useRecordEditable.ts(2, bearer by hand?)ui/packages/plugin-detail/src/stageChangeStarts.tsx(1)ui/packages/plugin-detail/src/queueClaim.ts(1)ui/packages/plugin-chatbot/src/usePendingActions.ts(2, bearer by hand?)ui/packages/plugin-chatbot/src/useHitlInChat.ts(1, bearer by hand?)ui/packages/plugin-chatbot/src/useAiModels.ts(1)ui/packages/plugin-chatbot/src/useAgents.ts(1)ui/packages/plugin-charts/src/ObjectChart.tsx(2, bearer by hand?)ui/packages/plugin-dashboard/src/DatasetWidget.tsx(1)ui/packages/plugin-report/src/ReportDateRange.tsx(1)ui/packages/fields/src/widgets/preferenceOptions.ts(1)ui/packages/fields/src/widgets/ShareableObjectRefField.tsx(1)ui/packages/permissions/src/MePermissionsProvider.tsx(2, bearer by hand?)
Two app-shell reads #37185 does not convert:
ui/packages/app-shell/src/views/metadata-admin/widgets.tsxfetchFieldSelectorOptions(~1201) callsfetch('/api/v1/objects/:name/fields')with no init. The defaultsame-origincredentials make it cookie-only, and fix(app-shell,console): the shell package list, AI chat lists and studio-design reads and writes send the stored bearer token #37185's ratchet does not match a call with no init.LocalizationFetchProviderandlanguageSeedread/api/v1/auth/me/localizationcookie-only. Under a bearer-only session the console likely falls back to the browser language instead of the user's locale. This is read, not measured. Constraint: fix(app-shell,console): the shell package list, AI chat lists and studio-design reads and writes send the stored bearer token #37185 listsLocalizationFetchProvideron its allow-list on purpose, because the boot read is shared in flight withindex.html's early request, keyed by its init. The bearer has to reach that early request too, or the share breaks.
Expected
Every same-server read and write in these packages goes through createAuthenticatedFetch (one built per call, as in #37185), with credentials: 'include' kept. A cross-origin or author-written target uses sameOriginOnly or stays bare, with its reason recorded.
Acceptance
- Each site above is converted or recorded with its reason. A call that already sets the bearer by hand is converted too, so a 401 reaches the session-ended check (the fix(app-shell,console): the shell package list, AI chat lists and studio-design reads and writes send the stored bearer token #37185 precedent).
- A pin that counts them: extend fix(app-shell,console): the shell package list, AI chat lists and studio-design reads and writes send the stored bearer token #37185's ratchet (
sameServerFetch.bearer.ratchet.test.ts), or add a sibling, over the plugin trees. It refuses a bare cookie-only call, and a call with no init on a/api/path, outside a shrink-only list. - One measured case per package family, pinned against a server that answers only the bearer, with a cookie-only control.
- The localization read: the bearer reaches both the early
index.htmlrequest and the provider, and the in-flight share still holds. Pin that the share key still matches. - One
patchchangeset per moved package.
Blocked-by: #37185
Grading: area:ux · Bug · moderate to impeded (features read as anonymous or empty under a bearer-only session) · reach named (bearer-only sessions, the mechanism #37080 measured in the shell) · evidence read, per site → p2; triage to confirm. Likely size L by file surface, so its own cloud session.
Business reason: a user on a bearer-only session sees their chatbot agents and models, record edit verdicts, approval locks, queue claims, share dialog, charts, dashboards and permissions read as anonymous. The shell itself (after #37185) works, so the failures look random.
Reader: the zone that claims it, after #37185 lands, starting from #37185's ratchet.
Dedupe: createAuthenticatedFetch (open and closed) → 30 hits; the open ones are #37080 (the shell half) and this mechanism's own PR. cookie-only and bearer-only → #37080 and #36981 (closed, the console Setup pages). me/localization bearer → no open card. No card covers these sites.
Activity
objectstack-fleet commentedon Nov 25, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
First touch 2026-11-25T04:54Z. The filing is confirmed as written.
pm:blockedon PR fix(app-shell,console): the shell package list, AI chat lists and studio-design reads and writes send the stored bearer token #37185, which is still open. It goes to seat 4 (zone a4-U) when that merges. The size looks like L, so it may need its own session.objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D
pm:blocked→pm:queue· area a4-U · 2026-11-25T06:09ZBlocked-by: #37185is resolved: PR fix(app-shell,console): the shell package list, AI chat lists and studio-design reads and writes send the stored bearer token #37185 merged asad604c10. It brings the per-callcreateAuthenticatedFetchpattern and the shrink-only ratchetsameServerFetch.bearer.ratchet.test.ts, which this card extends.93bd4595.