Skip to content

docs(sharing): list the Unassigned Cases — Triage rule on both Chinese sharing pages - #1241

Merged
os-sam merged 1 commit into
mainfrom
claude/issue-1239-chinese-sharing-table-triage-row
Aug 23, 2026
Merged

docs(sharing): list the Unassigned Cases — Triage rule on both Chinese sharing pages#1241
os-sam merged 1 commit into
mainfrom
claude/issue-1239-chinese-sharing-table-triage-row

Conversation

@os-sam

@os-sam os-sam commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Description

The app ships ten built-in sharing rules; both Chinese Sharing & Security
pages listed nine. 4a0e1de (2026-08-12, PR #1134 for #1096) added
case_unassigned_triage_sharing and its English table row in one commit and
never touched sharing-and-security.zh-Hans.mdx or .zh-Hant.mdx.

The missing row is not cosmetic: it is the app's only grant over records with
no owner at all
. Every holder of the service_agent position gets edit on
open, unowned cases — the grant that makes the pinned Unassigned — triage tab
workable. A Chinese-reading admin auditing who can reach unassigned case intake
was shown a complete-looking nine-row table, on the app's own security page,
that did not contain the answer.

This PR appends the one missing row to each Chinese table. No sharing rule
changed; no English page changed; the guard that catches this class stays
untouched.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • CI/CD update

Related Issues

Fixes #1239
Related to #1096, #809

Unblocks PR #1240 (the all-locales sharing-rules guard for #809), which is
deliberately red on main on exactly this drift and needs zero edits to go
green — see Testing.

Changes Made

  • content/docs/administration/sharing-and-security.zh-Hans.mdx — one row
  • content/docs/administration/sharing-and-security.zh-Hant.mdx — one row
  • .changeset/zh-sharing-table-unassigned-triage-row.md — patch changeset

The two rows, exactly as written:

zh-Hans: | Unassigned Cases — Triage | 工单 | 编辑 | `service_agent` —— 没有负责人的未关闭工单 |
zh-Hant: | Unassigned Cases — Triage | 案件 | 編輯 | `service_agent` —— 沒有負責人的未關閉案件 |

Every cell is derived from src/sharing/case.sharing.ts, not from the issue text:

Cell Source of truth
Rule name Unassigned Cases — Triage label on CaseUnassignedTriageSharingRule — English verbatim, as every other row on these tables
Object 工单 / 案件 object: 'crm_case', in each page's own word for that object
Grants 编辑 / 編輯 accessLevel: 'edit'
To service_agent sharedWith: { type: 'position', value: 'service_agent' }
没有负责人的未关闭 / 沒有負責人的未關閉 condition: record.owner_id == null && record.is_closed == false

Translation choices follow each page's existing conventions rather than
inventing vocabulary: 负责人 / 負責人 is the Owner term the same page defines
("每条记录有且只有一个负责人(Owner)"), 未关闭 / 未關閉 is the word the
sibling Escalated Cases Sharing row already uses for is_closed == false, and
the —— separator and column spacing match the surrounding rows byte for byte.
The rows are appended after Escalated Cases — Service Director, so the row
order matches the English page.

The English row was cross-checked against src/sharing/case.sharing.ts and is
correct as it stands; it is unchanged here.

Testing

Verified at 1566dec (the head of this branch), working tree clean.

The decisive check — the #1240 guard, before and after. The widened guard is
not on main yet, so it was applied into the tree from 74c2460 (branch
claude/issue-809-sharing-rules-table-all-locales), run against both states, and
restored under a trap ... EXIT INT TERM. test/sharing-coverage.test.ts is
not modified by this PR.

RED — guard applied, the two rows absent (both pages taken back to origin/main,
grep -c of the row on disk: hans=0 hant=0):

 FAIL  test/sharing-coverage.test.ts > ... > sharing-and-security.zh-Hans.mdx > lists exactly the sharing rules this app ships
 FAIL  test/sharing-coverage.test.ts > ... > sharing-and-security.zh-Hant.mdx > lists exactly the sharing rules this app ships
-   "missing": [],
+   "missing": [
+     "Unassigned Cases — Triage",
+   ],
 Test Files  1 failed (1)
      Tests  2 failed | 45 passed (47)

GREEN — same guard, the two rows present (grep -c on disk: hans=1 hant=1),
guard byte-identical:

 Test Files  1 passed (1)
      Tests  47 passed (47)

That green covers the strict cell rules too: the guard compares the object cell
against its ROW_LABEL ledger, the Grants cell against a per-locale
ACCESS_WORD map, and requires the row to name the rule's real position — so
工单 / 案件, 编辑 / 編輯 and service_agent are measured against the compiled
stack, not merely present.

Gates, exit codes captured by redirect (never through a pipe):

Command Exit Verdict line it printed
pnpm verify (validate → typecheck → lint → lint:i18n-gate → hygiene → hygiene:tokens → build → test) 0 see the eight rows below (145s)
pnpm validate 0 ✓ Validation passed (3473ms)
pnpm typecheck 0 tsc --noEmit, no diagnostics
pnpm lint 0 81 warning(s), 10 suggestion(s) (1435ms) — all pre-existing, none in content/
pnpm lint:i18n-gate 0 ✓ i18n lint gate: 0 i18n/missing-* issues
pnpm hygiene 0 ✓ source hygiene clean (control-byte scan covers content/ and .changeset/)
pnpm hygiene:tokens 0 ✓ source token ratchet clean — docs are outside the measured surface
pnpm build 0 ✓ Build complete (1613ms)
pnpm test 0 Test Files 117 passed (117) / Tests 2801 passed, 1 skipped (2802)
node scripts/check-stackblitz-lock.mjs 0 package-lock.json is in sync with package.json (v3).

Checklist

  • I have added a changeset.changeset/zh-sharing-table-unassigned-triage-row.md (patch)
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas — n/a, prose rows
  • I have made corresponding changes to the documentation — this PR is the documentation change
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective — the proving test is PR test(sharing): hold the built-in rules table to all three locales (#809) #1240, run here in both directions
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

git diff --name-only origin/main..HEAD is exactly the three files listed above.
The guard file and the English page were never committed to this branch; the
temporary guard application used for the red/green run was restored by a trap and
verified with git status --porcelain (empty) before the commit.

Scope kept to the file surface in the dispatch: two Chinese pages plus one
changeset. Nothing under src/ was touched, so who can reach an unowned case is
byte-for-byte what it was before this PR — it is simply now written down in all
three languages.

Generated by Claude Code


Generated by Claude Code

…e pages (#1239)

The app ships ten built-in sharing rules; both Chinese Sharing & Security
pages listed nine. `4a0e1de` (#1096) added `case_unassigned_triage_sharing`
and its English table row in one commit and never touched
`sharing-and-security.zh-Hans.mdx` or `.zh-Hant.mdx`.

The undocumented rule is the app's only grant over records with no owner at
all: `service_agent` gets EDIT on open, unowned cases
(`record.owner_id == null && record.is_closed == false`). A Chinese-reading
admin auditing unassigned case intake was shown a complete-looking nine-row
table that omitted a real access grant.

Every cell is taken from `src/sharing/case.sharing.ts`: object `crm_case`
(工单 / 案件, the word each page already uses), access level `edit`
(编辑 / 編輯), position `service_agent`, and the criteria stated in each
page's own vocabulary — 负责人 / 負責人 is the Owner term those pages define,
未关闭 / 未關閉 the word their sibling escalation rows already use. The rule
name stays English, as every other row does. The rows are appended after
`Escalated Cases — Service Director` so the order matches the English page.

No sharing rule changed. This unblocks the all-locales guard in PR #1240
(#809), which is red on `main` on exactly this drift and needs no edit.

Claude-Session: https://claude.ai/code/session_01WzS6NUXo5A5KEwj1KjvPHk
@vercel

vercel Bot commented Aug 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hotcrm Ignored Ignored Aug 23, 2026 2:38am

Request Review

@os-sam
os-sam marked this pull request as ready for review August 23, 2026 02:41
@os-sam
os-sam added this pull request to the merge queue Aug 23, 2026
Merged via the queue into main with commit 48970f7 Aug 23, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Both Chinese sharing pages list 9 of the app's 10 sharing rules — the Unassigned Cases — Triage row never followed #1096

2 participants