You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Related table on a record page offers 导出 to a reader who may not export, and the click ends in an English error #30069
The maintainer: 「等我决定的都要立卡,并且从业务的角度给我具体解释和我沟通」 (2026-11-04). Measured by the seat on main63b86b385d, on the example CRM unless noted. No domain:* label is set: triage routes this card.
Business reason
A rep opens a customer's 商机 tab, sees 导出 and clicks it. A red English line appears: "Export is not permitted on object 'crm_opportunity' for this user". The list page hides the same button for the same reader, so the product says two different things about one permission. The reader learns they cannot export only after trying, in a language they did not choose.
Measured
Dev admin on the CRM: /auth/me/permissions gives crm_opportunity no export in apiOperations. The opportunity list page shows no 导出.
/apps/com.example.crm/crm_account/record/{id}?related=crm_opportunity.account shows 导出. A click sent GET /api/v1/data/crm_opportunity/export… → 403, and the table showed that English sentence.
ui/packages/plugin-detail/src/RelatedList.tsx:3409-3410: exportable asks only whether the data source can export and the relation is known. :3517: the button draws on that.
Acceptance
The related table asks the same question as the list page. A reader without export sees no button.
A reader with export still exports only the rows of this relation.
An export refusal that does reach the reader, in any door, reads in the Console's language.
Read fresh. A record page's related table offers 导出 to a reader without export, and the click ends in an English error. RelatedList.tsx should ask the list page's effectiveApiOps question. p2 kept.
Claim: PM loop round 1
Session: session_01QSeKYpFBMr917PmVkG9up7
Account: os-justin
Branch: claude/issue-30069-related-export-permission
Worktree: objectstack-issue-30069
Domain: domain:ui
Seat: domain:ui#3
File surface: ui/packages/plugin-detail/src/RelatedList.tsx (the exportable gate about :3425 and the button about :3517) and its tests; the export-refusal display string in ui/packages/i18n or the refusal renderer it reaches, if ui-side (stop on breach; explain in the report)
Container & model: S, mode:subagent, model: opus (dispatch-gates --tier: no path-derived mandate; default tier), effort: high
Clause-②: no
Metadata-protocol: none
Responsibility: ui RelatedList offers 导出 without asking the reader's apiOperations | ListView.tsx:2446 exportPermitted already asks effectiveApiOps.includes('export'); the server refuses with 403 | any reader without export who opens a record's related table; reachable today
Thread-read: 6631419018
Premise: holds (RelatedList.tsx:3425const exportable = typeof …exportDownload === 'function' on origin/main55337f4c, no permission term)
Serial constraints cleared: none (no live domain:ui claim names RelatedList.tsx; seat 2's split 6635419431 leaves this card to seat 3)
{
"issue": 30069,
"status": "done",
"branch": "claude/issue-30069-related-export-permission",
"pr": "https://github.com/objectstack-ai/objectstack/pull/30156",
"session": "session_01QSeKYpFBMr917PmVkG9up7",
"premise_still_valid": true,
"summary": "Premise held on origin/main 55337f4ce: RelatedList's `exportable` had no permission term (re-check command hit once). The enlarged related table now also asks the list page's question, reading the child object's effective API operation set through usePermissions().getObjectApiOperations(api), the same source and default-allow rule ListView's exportPermitted uses (no new derivation; ObjectGrid and ReportExportControl read it the same inline way). Item 3: the server 403 carries code EXPORT_NOT_PERMITTED + status 403, so it is localized ui-side. All three doors that call exportDownload (RelatedList, ListView, ObjectGrid) now ask the existing shared classifier isPermissionError from @object-ui/react and show the new `view.exportNotPermitted` sentence (ten locale packs plus the three provider-less default maps, byte-identical to en); other failures keep the server's sentence. packages/** untouched. The file surface went past the claim's RelatedList + i18n: ListView.tsx, ObjectGrid.tsx and their translation maps were added to cover the 'in any door' clause of item 3. Two existing pins in ListView.test.tsx and plugin-grid exportServer.test.tsx used new Error('Permission denied') as their failure fixture, which is itself a refusal shape. They now use a 504 to keep pinning 'surfaced, not swallowed', and a refusal case was added beside each.",
"tests": "Head 31bb7e7cb. Run under os-verify-lock (VERDICT lines quoted): `pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/src/__tests__/RelatedList.enlargedToolbar-27524.test.tsx` gave Tests 9 passed (9), VERDICT command-exit 0. The 4 new cases sit in one top-level describe in that shared harness, under a real MePermissionsProvider + I18nProvider: no-export reader sees no button and exportDownload is never called; export reader's request filter carries the parent scope lead=L-1; under zh a 403 EXPORT_NOT_PERMITTED shows the Chinese sentence and not the server's; a 504 control shows the server's sentence. Affected-package sweep: `pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/ packages/plugin-grid/ packages/plugin-list/ packages/i18n/ packages/app-shell/src/__tests__/defaults-maps-mirror-en-pack.test.tsx scripts/__tests__/check-i18n-call-site-keys.test.ts` gave Test Files 932 passed | 1 skipped (933), Tests 9033 passed | 31 skipped (9064), VERDICT command-exit 0. `pnpm exec turbo run type-check --concurrency=2 --filter=./ui/packages/plugin-detail --filter=./ui/packages/plugin-list --filter=./ui/packages/plugin-grid --filter=./ui/packages/i18n` gave Tasks 56 successful, 56 total, VERDICT command-exit 0. Ablation (test imports ../RelatedList from source, so no build or dist leg). Both mutations went through scripts/ablation-replace.mjs --hold (anchor x1->x0, replacement x0->x1, blob moved) and were restored with --restore (blob == HEAD 3b9366b14dfa, git diff HEAD empty). (1) exportPermitted forced true: the 'reader without export' case went red, Tests 1 failed | 8 passed (9). (2) the refusal branch replaced by false: the zh 403 case went red, Tests 1 failed | 8 passed (9). Before the sweep, the first harness run failed to resolve @objectstack/spec/ui because the seven @objectstack builds were missing; after the turbo build (40/40) it passed. The ListView/grid fixture updates were driven by a first sweep run with 2 red (the old 'Permission denied' fixtures), then fixed.",
"gates": "Local: `node scripts/pm/dispatch-gates.mjs --commands` (no paths; stderr named objectstack-ai/objectstack @ 31bb7e7cb) derived 36 families. Each ran through a node runner capturing spawnSync status with no pipe: every one exit 0, including check-closing-keyword-parity (+self-test), check-sdui-manifest (+self-test), check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check:undeclared-dep-imports, check:nul-bytes, check:published-files, check:test-source-alias, check:tier-file-adoption, check:type-check-coverage, check:type-check-debt and check:where-matcher, plus `pnpm --dir ui exec vitest run scripts/` (Test Files 170 passed | 2 skipped, VERDICT command-exit 0). `dispatch-gates --ran` gave 36 derived, 36 run, 0 NOT-MEASURED, 0 UNRUN, exit 0; the ran-file listed commands only, with exits recorded in the runner log. `pnpm --dir ui check:new-line-citations` gave 0 new citation(s), exit 0. CI on PR head 31bb7e7cb at report time was in_progress: Test UI 1-16/16, Lint UI, Type Check UI, Build & E2E UI, Test Core, Dogfood Regression Gate and Build UI Deps queued; the path-filtered core shard jobs completed skipped. Not run locally: pnpm lint, which belongs to CI.",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2 — POST /repos/objectstack-ai/objectstack/dispatches (fleet-write relay pr_create: POST /pulls draft, no labels, no assignees; the dispatcher's 300s wait ended UNCONFIRMED exit 6, and a read showed PR #30156 open, draft, by objectstack-fleet[bot], body identical to what was sent apart from the trailing newline, no assignees and no reviewers; not re-dispatched) · POST /repos/objectstack-ai/objectstack/issues/30069/comments via post-stamped.mjs (os-dev-report). git push is not counted.",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed — an export whose object has the operation switched off by its `enable` block (classifyLoadError kind api-disabled) is not a permission refusal and still shows the server's sentence in all three doors; inferred from reading the code, not measured against a server; recorded in the PR's Acceptance notes"
]
}
ACCEPT · PR #30156 · head 31bb7e7cb · 2026-11-04T17:57Z
Seat review of the diff (read via GET /pulls/30156 diff, not the report):
Shape (items 1, 2):RelatedList reads the child object's perms.getObjectApiOperations(api), the same usePermissions() source and default-allow rule as ListView's exportPermitted. It draws no Export when the set leaves export out. The export request filter still carries the parent scope.
Item 3: all three exportDownload doors (RelatedList, ListView, ObjectGrid) map the existing isPermissionError refusal to the new view.exportNotPermitted sentence. Other failures keep the server text. The key is in all ten locale packs, translated (the seat read zh, ja and de), plus the three provider-less default maps, which equal en.
Tests (item 4): 4 new cases under a real MePermissionsProvider and I18nProvider. Two ablations went red and were restored. Two old fixtures that used a refusal-shaped Permission denied as a generic failure now use a 504, and a refusal case was added beside each.
Gates: check-runs on 31bb7e7cb show 55 runs: 44 success, 11 skipped, 0 red. check-governed-merges --pr 30156 says NOT governed, 231 changed lines. mergeable_state reads clean.
Out of scope: an export switched off by the object's enable block (load-error kind api-disabled) still shows the server sentence. This was inferred from the code, not measured → Acceptance notes on the PR.
State: delivered in full. pm:dispatched is removed in this stroke. Seat 2's #30077 was knocked Notify: serial behind this card; it is knocked Notify: landed now.
Activity
objectstack-fleet commentedon Nov 4, 2026
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U
Path: none
Triage: first-touch audit · p2 kept ·
domain:ui· 2026-11-04T13:06Z⛔ Not a claim.
RelatedList.tsxshould ask the list page'seffectiveApiOpsquestion. p2 kept.Generated by Claude Code
objectstack-fleet commentedon Nov 4, 2026
domain:ui#3 · os-justin · session_01QSeKYpFBMr917PmVkG9up7
Claim: PM loop round 1
Session:
session_01QSeKYpFBMr917PmVkG9up7Account:
os-justinBranch:
claude/issue-30069-related-export-permissionWorktree:
objectstack-issue-30069Domain:
domain:uiSeat:
domain:ui#3File surface:
ui/packages/plugin-detail/src/RelatedList.tsx(theexportablegate about:3425and the button about:3517) and its tests; the export-refusal display string inui/packages/i18nor the refusal renderer it reaches, if ui-side (stop on breach; explain in the report)Container & model:
S,mode:subagent,model: opus(dispatch-gates--tier: no path-derived mandate; default tier),effort: highClause-②: no
Metadata-protocol: none
Responsibility:
ui RelatedList offers 导出 without asking the reader's apiOperations|ListView.tsx:2446 exportPermitted already asks effectiveApiOps.includes('export'); the server refuses with 403|any reader without export who opens a record's related table; reachable todayThread-read: 6631419018
Premise: holds (
RelatedList.tsx:3425const exportable = typeof …exportDownload === 'function'onorigin/main55337f4c, no permission term)Serial constraints cleared: none (no live
domain:uiclaim namesRelatedList.tsx; seat 2's split 6635419431 leaves this card to seat 3)Generated by Claude Code
objectstack-fleet commentedon Nov 4, 2026
domain:ui#3 · os-justin · session_01QSeKYpFBMr917PmVkG9up7
os-dev-report
{ "issue": 30069, "status": "done", "branch": "claude/issue-30069-related-export-permission", "pr": "https://github.com/objectstack-ai/objectstack/pull/30156", "session": "session_01QSeKYpFBMr917PmVkG9up7", "premise_still_valid": true, "summary": "Premise held on origin/main 55337f4ce: RelatedList's `exportable` had no permission term (re-check command hit once). The enlarged related table now also asks the list page's question, reading the child object's effective API operation set through usePermissions().getObjectApiOperations(api), the same source and default-allow rule ListView's exportPermitted uses (no new derivation; ObjectGrid and ReportExportControl read it the same inline way). Item 3: the server 403 carries code EXPORT_NOT_PERMITTED + status 403, so it is localized ui-side. All three doors that call exportDownload (RelatedList, ListView, ObjectGrid) now ask the existing shared classifier isPermissionError from @object-ui/react and show the new `view.exportNotPermitted` sentence (ten locale packs plus the three provider-less default maps, byte-identical to en); other failures keep the server's sentence. packages/** untouched. The file surface went past the claim's RelatedList + i18n: ListView.tsx, ObjectGrid.tsx and their translation maps were added to cover the 'in any door' clause of item 3. Two existing pins in ListView.test.tsx and plugin-grid exportServer.test.tsx used new Error('Permission denied') as their failure fixture, which is itself a refusal shape. They now use a 504 to keep pinning 'surfaced, not swallowed', and a refusal case was added beside each.", "tests": "Head 31bb7e7cb. Run under os-verify-lock (VERDICT lines quoted): `pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/src/__tests__/RelatedList.enlargedToolbar-27524.test.tsx` gave Tests 9 passed (9), VERDICT command-exit 0. The 4 new cases sit in one top-level describe in that shared harness, under a real MePermissionsProvider + I18nProvider: no-export reader sees no button and exportDownload is never called; export reader's request filter carries the parent scope lead=L-1; under zh a 403 EXPORT_NOT_PERMITTED shows the Chinese sentence and not the server's; a 504 control shows the server's sentence. Affected-package sweep: `pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/ packages/plugin-grid/ packages/plugin-list/ packages/i18n/ packages/app-shell/src/__tests__/defaults-maps-mirror-en-pack.test.tsx scripts/__tests__/check-i18n-call-site-keys.test.ts` gave Test Files 932 passed | 1 skipped (933), Tests 9033 passed | 31 skipped (9064), VERDICT command-exit 0. `pnpm exec turbo run type-check --concurrency=2 --filter=./ui/packages/plugin-detail --filter=./ui/packages/plugin-list --filter=./ui/packages/plugin-grid --filter=./ui/packages/i18n` gave Tasks 56 successful, 56 total, VERDICT command-exit 0. Ablation (test imports ../RelatedList from source, so no build or dist leg). Both mutations went through scripts/ablation-replace.mjs --hold (anchor x1->x0, replacement x0->x1, blob moved) and were restored with --restore (blob == HEAD 3b9366b14dfa, git diff HEAD empty). (1) exportPermitted forced true: the 'reader without export' case went red, Tests 1 failed | 8 passed (9). (2) the refusal branch replaced by false: the zh 403 case went red, Tests 1 failed | 8 passed (9). Before the sweep, the first harness run failed to resolve @objectstack/spec/ui because the seven @objectstack builds were missing; after the turbo build (40/40) it passed. The ListView/grid fixture updates were driven by a first sweep run with 2 red (the old 'Permission denied' fixtures), then fixed.", "gates": "Local: `node scripts/pm/dispatch-gates.mjs --commands` (no paths; stderr named objectstack-ai/objectstack @ 31bb7e7cb) derived 36 families. Each ran through a node runner capturing spawnSync status with no pipe: every one exit 0, including check-closing-keyword-parity (+self-test), check-sdui-manifest (+self-test), check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check:undeclared-dep-imports, check:nul-bytes, check:published-files, check:test-source-alias, check:tier-file-adoption, check:type-check-coverage, check:type-check-debt and check:where-matcher, plus `pnpm --dir ui exec vitest run scripts/` (Test Files 170 passed | 2 skipped, VERDICT command-exit 0). `dispatch-gates --ran` gave 36 derived, 36 run, 0 NOT-MEASURED, 0 UNRUN, exit 0; the ran-file listed commands only, with exits recorded in the runner log. `pnpm --dir ui check:new-line-citations` gave 0 new citation(s), exit 0. CI on PR head 31bb7e7cb at report time was in_progress: Test UI 1-16/16, Lint UI, Type Check UI, Build & E2E UI, Test Core, Dogfood Regression Gate and Build UI Deps queued; the path-filtered core shard jobs completed skipped. Not run locally: pnpm lint, which belongs to CI.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — POST /repos/objectstack-ai/objectstack/dispatches (fleet-write relay pr_create: POST /pulls draft, no labels, no assignees; the dispatcher's 300s wait ended UNCONFIRMED exit 6, and a read showed PR #30156 open, draft, by objectstack-fleet[bot], body identical to what was sent apart from the trailing newline, no assignees and no reviewers; not re-dispatched) · POST /repos/objectstack-ai/objectstack/issues/30069/comments via post-stamped.mjs (os-dev-report). git push is not counted.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed — an export whose object has the operation switched off by its `enable` block (classifyLoadError kind api-disabled) is not a permission refusal and still shows the server's sentence in all three doors; inferred from reading the code, not measured against a server; recorded in the PR's Acceptance notes" ] }objectstack-fleet commentedon Nov 4, 2026
domain:ui#3 · os-justin · session_01QSeKYpFBMr917PmVkG9up7
ACCEPT · PR #30156 · head
31bb7e7cb· 2026-11-04T17:57ZSeat review of the diff (read via
GET /pulls/30156diff, not the report):RelatedListreads the child object'sperms.getObjectApiOperations(api), the sameusePermissions()source and default-allow rule asListView'sexportPermitted. It draws no Export when the set leavesexportout. The export request filter still carries the parent scope.exportDownloaddoors (RelatedList,ListView,ObjectGrid) map the existingisPermissionErrorrefusal to the newview.exportNotPermittedsentence. Other failures keep the server text. The key is in all ten locale packs, translated (the seat read zh, ja and de), plus the three provider-less default maps, which equalen.MePermissionsProviderandI18nProvider. Two ablations went red and were restored. Two old fixtures that used a refusal-shapedPermission deniedas a generic failure now use a 504, and a refusal case was added beside each.RelatedList.tsxand the i18n strings. The PR also editsListView.tsx,ObjectGrid.tsxand their translation maps, because item 3 says "in any door". All of it is insideui/**, and the report explains it. Intersections were handled: seat 2's [Decision] Readers can hide list columns but not add one: should a reader be able to add an object's field to their list? #30077 claimsListView.tsxin a different region (the hidden-fields panel), knocked asNotify: serial6637588048. This seat's Studio on zh-CN still mixes languages and terms: view properties panel, flow nodes, publish sheet labels, and 仪表板 beside 仪表盘 #30039 dev was told aboutlocales/zh.ts.31bb7e7cbshow 55 runs: 44 success, 11 skipped, 0 red.check-governed-merges --pr 30156says NOT governed, 231 changed lines.mergeable_statereadsclean.enableblock (load-error kindapi-disabled) still shows the server sentence. This was inferred from the code, not measured →Acceptance noteson the PR.pr_ready+automerge_enableby the seat. Held: the same stroke was refused by this session's auto-mode classifier (i18n: sys_user.locale still stores a shape-valid tag no platform locale serves (xx-YY) with 200, and the console's exact-match locale pick still renders English for legacy mis-cased rows and for zh / zh-Hans-CN / en-GB #30050 comment 6636572112). It waits for the maintainer to allow it, or to land this by hand.Fixes #30069closes the card at MERGED.Generated by Claude Code
objectstack-fleet commentedon Nov 5, 2026
domain:ui#3 · os-justin · session_01QSeKYpFBMr917PmVkG9up7
Landed · PR #30156 · 2026-11-05T01:08Z
5f801296dat 2026-11-05T01:05:28Z, via the merge queue;Fixes #30069closed this cardorigin/maingit grep -c "exportNotPermitted" origin/main -- ui/packages/plugin-detail/src/RelatedList.tsx→ 1State: delivered in full.
pm:dispatchedis removed in this stroke. Seat 2's #30077 was knockedNotify: serialbehind this card; it is knockedNotify: landednow.Generated by Claude Code