docs(views): name the priorities the SLA-at-risk filter actually selects - #1340
Merged
Merged
Conversation
The `sla_at_risk` JSDoc on `crm_case` described the view as "open, high/urgent priority cases". `crm_case.priority` is low/medium/high/critical — there is no `urgent` on this object; that value belongs to `crm_task` — and the filter underneath selects `['high', 'critical']`. The comment now names High and Critical, matching what the code does. It also records why the two vocabularies must stay apart. This is the second time they have crossed in prose, and the first time cost something real: the task view once carried Case colour keys (`critical`/`medium`), which left every `urgent` and `normal` task row uncoloured (`src/views/task.view.ts:35`). The direction that shipped a defect was the one where the comment was believed. Comment only — no filter, option list or colour key changed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ED4cusQ7pxZ7d7TCLKrZb
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
os-trump
marked this pull request as ready for review
August 27, 2026 01:59
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.
Fixes #1333
The
sla_at_riskJSDoc oncrm_casenamed a priority the object does not have.urgentiscrm_taskvocabulary. The comment now names High and Critical — what the filteractually selects — and records why the two vocabularies have to stay apart, because this is the
second time they have crossed in prose and the first time cost something real.
Comment only. No filter, option list or colour key changed; the code was correct on both sides.
The two-directional sweep
The card asked for the crossing to be swept in both directions across
src/, with a controlproving the search reached the code. Surface: all 170 files under
src/— 166.tsplus the 4.mdundersrc/docs/. Discriminating terms are the values the two vocabularies do not share:critical/mediumare Case-only,urgent/normalare Task-only.Controls (a zero is not a finding until these are non-zero):
criticalinside Case-domain filesurgentinside Task-domain filesBoth positive, so the scan demonstrably reached the code.
Direction A — Task-only values (
urgent,normal) in a Case context — 7 raw hits, 1 real:src/views/case.view.ts:233urgentas acrm_casepriority. Fixed here.src/objects/case.hook.ts:386priority: 'urgent'insideapi.object('crm_task').insert(...), a Task recordsrc/objects/case.hook.ts:346src/objects/case.hook.ts:171mediumvsnormal)src/flows/case-escalation.flow.ts:118src/docs/crm_service.md:60src/flows/case-csat-followup.flow.ts:27Direction B — Case-only values (
critical,medium) in a Task context — 2 raw hits, 0 real:src/views/task.view.ts:35src/objects/task.hook.ts:54Code-side crossings: zero. Every
priority:literal insrc/was read together with itsenclosing
api.object(...)/objectName:/defineSeed(...)binding, including both blocks ofsrc/data/service.seed.ts— thetasksseed (urgent/normal/high/low) and thecasesseed(critical/medium/high/low) each use their own vocabulary.
severity: 'critical'on thenotifynodes is a notification-severity vocabulary, not a priority. Nothing to stop and report.
⇒
case.view.ts:233was the only live crossing in either direction. The two comments thatlegitimately name the other object's values both do so to state the contrast explicitly, which is
the pattern this fix follows.
Verification
pnpm verify— the whole&&-joined chain — green on the final commit809ef5f, tree clean atmeasurement time:
Token ratchet coupling, measured rather than assumed.
case.view.tssits inside theinteraction layer the ratchet measures, so the claim that a comment edit cannot move it was tested
directly: the base version of the file was checked out over the branch version, the mutation was
confirmed on disk (
High or Critical→ 0 hits, the oldhigh/urgentJSDoc → 1 hit), and theratchet re-run. Both readings are byte-identical —
— so the ratchet is comment-stripped as documented, and this PR adds 11 comment lines while moving
the reading by zero. The file was then restored and the restore proven three ways:
git diff HEADempty, working-tree blob hash
9b9ae6e…equal to the HEAD blob hash, andgit statusclean.Changeset
Empty frontmatter — the sanctioned "releases nothing" declaration. Prose only: no object, field,
view, label, filter, option list or colour key changed.
Generated by Claude Code
Generated by Claude Code