Skip to content

docs(service): document the triage claim gesture in all three locales - #1409

Merged
os-trump merged 1 commit into
mainfrom
claude/issue-1144-triage-claim-docs
Aug 31, 2026
Merged

docs(service): document the triage claim gesture in all three locales#1409
os-trump merged 1 commit into
mainfrom
claude/issue-1144-triage-claim-docs

Conversation

@os-trump

Copy link
Copy Markdown
Collaborator

Part of #1144 — piece 1 (the documentation) only. Piece 2, a claim_case action, is deliberately not built here; the 2026-08-25 grading carved it out as a Feature awaiting a maintainer ruling, so this card stays open after this PR lands.

What shipped without its docs

Moving an unowned case to In Progress, Waiting on Customer or Waiting on Support makes the person doing it the case's Owner, in that same save. That was real behaviour with nothing written down — the PR that landed the seam could not touch content/docs/** because two concurrent cards owned it that round.

Re-derived from src/, not from the card

The card and its grading are from 2026-08-12 and 2026-08-25 and were treated as leads only. Four things came back different from the descriptions I was handed:

Claimed Measured on origin/main today
the case "appears in My Cases" the view is labelled My Open Cases (my_open_cases, src/views/case.view.ts), filtered owner_id == {current_user_id} and is_closed == false
the rule "grants edit only while a case is unowned" it also excludes Resolved: record.owner_id == null && record.status != "resolved" && record.status != "closed" (src/sharing/case.sharing.ts)
the two Chinese pages lack the rule's row they do not — see the rider section below
the claim is inert for a write with no user, so seeded and system writes leave the case ownerless (guards 1 and 2 of createCaseSelfClaim)

The three claiming statuses are CLAIMABLE_TARGET_STATUSES in src/objects/_case-assignment.ts; the hook additionally stands down on a payload carrying owner_id, on an already-owned case, on a closed case, and on a status that does not actually change. All of that is now in the prose, including the four statuses that deliberately do not claim and the reason each is excluded.

The ⭐ #1134 rider was already closed — dropped rather than re-done

Verified before writing: all three sharing-and-security locales already carry | Unassigned Cases — Triage | … | \service_agent` … |at line 97. The two Chinese rows arrived with thecontent/docs/administration/tree in commit903079a(#1277, 2026-08-24), andtest/sharing-coverage.test.ts— the guard written to go red on exactly that gap — is green onmain`. So the rider is not outstanding and nothing was added for it; editing what is already correct would have been the only alternative.

What the pages gained

content/docs/service/cases.mdx (+ zh-Hans / zh-Hant) — a new Claiming a case out of triage section: the gesture, where the case goes afterwards, a table of the moves that do not claim, and a callout on why the claim has no other spelling (a save carrying Owner is refused for an agent whatever name it holds, so the only name the gesture can write is the caller's own). Plus one bullet in What happens automatically and one in Sharing — who can see which case.

content/docs/administration/sharing-and-security.mdx (+ zh-Hans / zh-Hant) — A grant meant to be spent: Unassigned Cases — Triage, the admin half: the grant exists to be consumed, and the claim is what ends it, in three steps. Claiming is also added to the list of everyday actions that write Owner without being transfers — the list head moves from "Three" to "Four" — which is where an admin reading Service Agent may reassign: tasks only would otherwise be left with a contradiction.

content/docs/service/index.mdx (+ zh-Hans / zh-Hant) — one bullet in What the system does for you, so the seam is findable from the module landing page. This is the only discoverability piece 1 can honestly deliver; the button is piece 2's job.

Accuracy fix riding along on the same rows

The rule's own row read service_agentopen cases with no owner (zh: 没有负责人的未关闭工单 / 沒有負責人的未關閉案件). The two escalation rules beside it really are is_closed == false, but this one excludes Resolved as well, so the row overstated the grant — most visibly in Chinese, where 未关闭 says only "not closed". Corrected in all three locales. It is the row this PR exists to explain, so it is in scope rather than a separate card.

Verification

Union run on the final commit 9f9f22c, through the shared verify lock:

  • pnpm exec vitest run --maxWorkers=2Test Files 148 passed (148) / Tests 3110 passed | 1 skipped (3111), lock VERDICT command-exit 0.
  • apps/docs: pnpm run types:check && pnpm run build (the docs-app.yml job, which fires on content/docs/**) — ✓ Compiled successfully in 30.4s, ✓ Generating static pages using 3 workers (349/349), lock VERDICT command-exit 0.
  • node scripts/check-source-hygiene.mjs✓ source hygiene clean; check-source-token-ratchet.mjs✓ source token ratchet clean; check-lint-i18n-gate.mjs✓ i18n lint gate: 0 i18n/missing-* issues.
  • Control-byte scan over all nine edited files: grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]' → exit 1, no matches.

Two guards this change had to satisfy deliberately rather than accidentally:

  • docs-locale-callouts requires equal blockquote-run counts across a page's three locales. Measured before and after: cases 1/1/1 → 2/2/2, sharing-and-security 4/4/4 → 5/5/5, index 0/0/0 → 0/0/0.
  • docs-view-rosters counts table rows inside a ## Standard list views section, so the new table sits in its own section, well clear of that heading. Every internal link added here is unanchored on purpose — a translated heading with an untranslated anchor is the exact rot docs-anchor-links was written for.

Changeset: .changeset/document-the-triage-claim-gesture.md, 'hotcrm': patch — deliberate rather than skip-changeset. This ships changed copy on the published docs site, so it is user-visible and belongs in the release notes; the label is for PRs that ship nothing to users.

Scope

File surface held exactly: content/docs/service/* and content/docs/administration/sharing-and-security{,.zh-Hans,.zh-Hant}.mdx, plus the changeset. No src/, no test/. Nothing under administration/profiles* or sales/* (#1131), and test/docs-drift.test.ts (#1135) is untouched.


Generated by Claude Code

The claim seam shipped without its documentation half. Moving an unowned case
to In Progress, Waiting on Customer or Waiting on Support makes the person
doing it the case's owner, in the same save — real behaviour with nothing
written down, because the PR that landed it could not touch content/docs.

Re-derived from src/ rather than from the card:

  - the three claiming statuses are CLAIMABLE_TARGET_STATUSES in
    src/objects/_case-assignment.ts, and the hook stands down on a payload
    carrying owner_id, on an already-owned case, on a closed case, and on a
    write with no user (seed / system);
  - the destination view is labelled My Open Cases, not "My Cases";
  - case_unassigned_triage_sharing excludes resolved AND closed
    (record.owner_id == null && status != "resolved" && status != "closed"),
    unlike the two escalation rules beside it, which really are
    is_closed == false.

service/cases gains the gesture end to end — the three statuses that claim,
the four that deliberately do not, and why the claim cannot be spelled as an
owner edit. sharing-and-security gains the admin half: Unassigned Cases —
Triage is the one shipped rule meant to be spent rather than held, and the
claim is what ends the grant. Claiming joins the everyday actions that write
Owner without being transfers, which is why it needs no new permission.

The rule's own row said "open cases with no owner" / "没有负责人的未关闭工单",
which overstated the grant by omitting Resolved; corrected in all three
locales.

Part of #1144 — piece 2 (a claim_case action) is deliberately not built.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaBNJyp9XkRodoRNfGuUTo
@vercel

vercel Bot commented Aug 31, 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 31, 2026 4:36am

Request Review

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.

2 participants