docs(sharing): list the Unassigned Cases — Triage rule on both Chinese sharing pages - #1241
Merged
Merged
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
Description
The app ships ten built-in sharing rules; both Chinese Sharing & Security
pages listed nine.
4a0e1de(2026-08-12, PR #1134 for #1096) addedcase_unassigned_triage_sharingand its English table row in one commit andnever touched
sharing-and-security.zh-Hans.mdxor.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_agentposition gets edit onopen, 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
Related Issues
Fixes #1239
Related to #1096, #809
Unblocks PR #1240 (the all-locales sharing-rules guard for #809), which is
deliberately red on
mainon exactly this drift and needs zero edits to gogreen — see Testing.
Changes Made
content/docs/administration/sharing-and-security.zh-Hans.mdx— one rowcontent/docs/administration/sharing-and-security.zh-Hant.mdx— one row.changeset/zh-sharing-table-unassigned-triage-row.md— patch changesetThe two rows, exactly as written:
Every cell is derived from
src/sharing/case.sharing.ts, not from the issue text:Unassigned Cases — TriagelabelonCaseUnassignedTriageSharingRule— English verbatim, as every other row on these tablesobject: 'crm_case', in each page's own word for that objectaccessLevel: 'edit'service_agentsharedWith: { type: 'position', value: 'service_agent' }condition: record.owner_id == null && record.is_closed == falseTranslation 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 Sharingrow already uses foris_closed == false, andthe
——separator and column spacing match the surrounding rows byte for byte.The rows are appended after
Escalated Cases — Service Director, so the roworder matches the English page.
The English row was cross-checked against
src/sharing/case.sharing.tsand iscorrect 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
mainyet, so it was applied into the tree from74c2460(branchclaude/issue-809-sharing-rules-table-all-locales), run against both states, andrestored under a
trap ... EXIT INT TERM.test/sharing-coverage.test.tsisnot modified by this PR.
RED — guard applied, the two rows absent (both pages taken back to
origin/main,grep -cof the row on disk:hans=0 hant=0):GREEN — same guard, the two rows present (
grep -con disk:hans=1 hant=1),guard byte-identical:
That green covers the strict cell rules too: the guard compares the object cell
against its
ROW_LABELledger, the Grants cell against a per-localeACCESS_WORDmap, and requires the row to name the rule's real position — so工单 / 案件, 编辑 / 編輯 and
service_agentare measured against the compiledstack, not merely present.
Gates, exit codes captured by redirect (never through a pipe):
pnpm verify(validate → typecheck → lint → lint:i18n-gate → hygiene → hygiene:tokens → build → test)pnpm validate✓ Validation passed (3473ms)pnpm typechecktsc --noEmit, no diagnosticspnpm lint81 warning(s), 10 suggestion(s) (1435ms)— all pre-existing, none incontent/pnpm lint:i18n-gate✓ i18n lint gate: 0 i18n/missing-* issuespnpm hygiene✓ source hygiene clean(control-byte scan coverscontent/and.changeset/)pnpm hygiene:tokens✓ source token ratchet clean— docs are outside the measured surfacepnpm build✓ Build complete (1613ms)pnpm testTest Files 117 passed (117)/Tests 2801 passed, 1 skipped (2802)node scripts/check-stackblitz-lock.mjspackage-lock.json is in sync with package.json (v3).src/sharing/case.sharing.tscell by cellChecklist
.changeset/zh-sharing-table-unassigned-triage-row.md(patch)Additional Notes
git diff --name-only origin/main..HEADis 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 isbyte-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