Repository navigation
test(app-shell,console): approvals and inbox reads carry the console's UI language - #37543
Conversation
…s UI language Pins that every approvals reader (approval history, request labels, remind, the pending-approvals page) and the notification inbox read send the active UI language as Accept-Language through the console's authenticated fetch, with a control: no UI language chosen leaves the header to the browser. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbGtuQD4c5iyX7mqpV
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 3312d68 · 2026-11-26T12:51Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: ① Derived judgmentsThe diff adds two test files and nothing else. It changes no accept-set and no public surface. All check-runs on the head are success or skipped by path, with none failed. That includes Test UI 1-16, Type Check UI, Lint UI and Check Changeset. Census of the live tree on
The pins hold up under reading:
Findings:
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
… wiring The inbox pin now mounts the real AdapterProvider and useSharedInboxFeed instead of a hand-built adapter, and the request-page pin goes through routeApprovalRecordReads as AppContent wires it. Controls are reworded as controls on the stamp itself. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbGtuQD4c5iyX7mqpV
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 812ae05 · 2026-11-26T13:27Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: ① Derived judgmentsThis is a delta from
The pin count is unchanged at 9: 6 positive and 3 controls. ② Semver levelUnchanged: ③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X
Landing on seat ACCEPT 7193444090, which sits on the same-head delta PASS 7193425919. The maintainer named this PR on the seat thread's decision card: 「合并 #37543」 on 「合并已 ACCEPT 的非受管 PR #37543(审批请求跟随界面语言,纯测试)吗?」, at 13:36Z. Action: ready + auto-merge. |
Requested by Bill · project thread
Part of #37483
What changes
Test-only. Two pins hold every approvals reader and the notification inbox read to the console's authenticated fetch, which sends the active UI language as
Accept-Language:ui/packages/app-shell/src/hooks/__tests__/approvalsUiLocale-37483.test.tsx: the approval history read (listApprovalActions,/approvals/requests/:id/actions),remindApprovalRequest,fetchPendingApprovalPage(bell, home, full-page inbox), and the notification inbox: the realAdapterProvidermounted withuseSharedInboxFeed, asserting the header on itssys_inbox_messageread.ui/apps/console/src/services/approvalRequestsDataSource.uiLocale-37483.test.tsx: the request page's history (sys_approval_actiontimeline) and request read (process_label/step_label) throughrouteApprovalRecordReads(adapter), asAppContentwires it.Each pin sets
<html lang="en">and assertsAccept-Language: en. The controls are on the stamp itself: an empty<html lang>adds no header rather than a guessed one.Why
The card was measured on the 18.6.0 bundles. On
mainthe shared helper the card suggests already does the job:createAuthenticatedFetch(@object-ui/auth) stamps<html lang>asAccept-Languageon every/api/call, and the readers it names now go through it:useRecordApprovals(fetchJson: request, actions, remind) andsharedUserFeeds(fetchPendingApprovalPage) moved from a barefetch+bearerAuthHeaders()to it in fix(app-shell,console): the shell package list, AI chat lists and studio-design reads and writes send the stored bearer token #37185 (merged 2026-11-25, after 18.6.0).approvalsApi.tsandapprovalRequestsDataSource.tshave used it since fix(console): the approvals inbox names the flow, the step and the object in the reader's language #27040 / fix(app-shell,console): an approver who opens an approval request sees its decision panel again, read from the approvals service #28619.sys_inbox_message,sys_notification_receipt) reads through the console adapter, whichAdapterProviderbuilds on the same fetch.So no source change is needed for approval history; what was missing is a pin that keeps these surfaces on that transport. Ablation: replacing the stamp in
createAuthenticatedFetchwith a no-op turns all six positive pins red, controls stay green; buildingAdapterProvider's adapter on a barefetchturns the inbox pin red.Why
Part of, notFixes: the inbox read already went through the stamped adapter at 18.6.0, so "fixed after 18.6.0" does not explain the inbox evidence in comment 7186322473. The card stays open until a header capture ofGET /api/v1/data/sys_inbox_messageon amainbuild settles it (reported on the card).Verification
pnpm --dir ui exec vitest run packages/app-shell/src/hooks/__tests__/approvalsUiLocale-37483.test.tsx apps/console/src/services/approvalRequestsDataSource.uiLocale-37483.test.tsx: 9 passed.fetch.eslinton both files: clean.check:commit-card-trailers,overlap-check: clean.Publishes nothing (test files only), so
skip-changeset.Clause-②: no
Metadata-protocol: none
Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CbGtuQD4c5iyX7mqpV