Repository navigation
feat(views): tint only the exception rows in list views - #2108
Conversation
… a tint Nine list views gave every value of a field a row colour, and each of those fields is already a column that draws its own coloured badge, so a page of colour marked no row. The four lists that keep a tint now colour only the row a user must act on: - Cases (All Cases, Unassigned - triage): is_sla_violated true -> red - Tasks: priority urgent -> red - Event attendees: response declined -> red - Accounts: is_active false -> slate Open Deals, Events, Knowledge Articles and Leads' High Priority carry no rowColor any more. The stage row-colour pins in view-references.test.ts guarded the retired Open Deals map and go with it; the generic "rowColor keys are real option values" guard stays and still reads the Task and Attendee keys. Claude-Session: https://claude.ai/code/session_01P8mZuzuyZAHSrgQKmv6ASv Co-authored-by: Claude <noreply@anthropic.com>
… render Every doc page that described a list's row tint, in all three locales, now says what the lists do: a breached case is the red row in All Cases (and stays red once closed late), an urgent task is the red row, and Open Deals and High Priority leads carry no tint. The priority hex list on the SLA page is gone. The All Accounts and Unassigned - triage tints are declared but paint nothing on 18.0.0-next.1: the console's list fetch selects only the columns, and neither list has a column for its tint's field. A comment beside each says so, and the changeset tells the release-notes reader. Claude-Session: https://claude.ai/code/session_01P8mZuzuyZAHSrgQKmv6ASv Co-authored-by: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
席位核对复核人:repo:hotcrm 执行席(#1353)· 判决 ACCEPT · 钉 head 形态:一卡一 PR, 前提实测:diff 逐项对裁决「只给例外行上色(推荐)」的表:All Cases 与 Unassigned — triage → 门禁 check-runs(钉 head):Build and Test (22.x) ✓ · Typecheck and Build ✓ · Quality Checks ✓ · Check Changeset ✓ · Playwright ✓ · link-check ✓ · CodeQL ✓ · Analyze Code (javascript) ✓ · Label Pull Request ✓ · Vercel Preview Comments ✓ — 10/10 success,mergeable_state 接受的偏差:① 范围外去向:dev 实测 All Accounts 与 Unassigned — triage 两处保留的行色在 18.0.0-next.1 上不出色——console 列表 落地条款:席位经中继 |
Brings the finished picklist migration onto main 4de5343 (@objectstack 18.0.0-next.1, the two-package artifact, the suites on @objectstack/verify and SQL). Conflicts, each resolved toward main's behaviour plus the migration: - objectstack.config.ts: main's composeStacks artifact. The picklists register with the app package instead: objectstack.composition.ts gains appPicklists (sales + revenue barrels) and hands it to createHotCrmAppStack. Every picklist-bound field is an app-package field; the service package references none. - src/sales/objects/_picklists.ts: stays deleted. Main's two comment edits (#2035, #2040) are carried to where the comments moved: payment_terms.picklist.ts now names quote_accepted_contract_draft. - contract.object.ts: main's hook name, the branch's picklist reference. - opportunity.view.ts: main's (the stage rowColor map is gone, #2108). - executive.dashboard.ts, mappings/_shared.ts: the branch's comments. - 14 suites: main's imports, drivers and syncSchemas(), plus the branch's picklist lines. Engine suites still built with ObjectQL.create register the app's lists (the factory takes no picklists on 18.0.0-next.1). global-actions reads related_to_type off the booted registry's served field; i18n-references checks picklist translation keys against the lists the booted registry holds. actions-flows-integrity keeps both non-vacuity guards. view-references drops the retired rowColor pins and keeps the mass_update_stage pin. - test/helpers/stack-picklists.ts reads the composed view (the artifact carries packages[] only) and resolves a field's options through the platform's SchemaRegistry.resolvePicklistOptions instead of a local lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8mZuzuyZAHSrgQKmv6ASv
Part of #2107. Everything in the card's table is done here; the half left open is the render check of two kept tints (All Accounts, Unassigned — triage), which paint nothing on the 18.0.0-next.1 pin because of a platform fetch gap (measured below, reported upstream through the seat). The card stays open so they can be measured again once the pin carries the platform fix; no HotCRM change is expected then.
Clause-②: no
What changed
The maintainer chose 「只给例外行上色(推荐)」. Nine list views gave every value of a field a row colour, and each of those fields already draws its own coloured badge in its column, so a page of colour marked no row. Now only the row a user must act on is tinted:
crm_caseAll Cases, Unassigned — triagepriority: critical red, high orange, medium yellow, low slateis_sla_violated:true→ redcrm_taskAll Taskspriority: urgent red, high orange, normal green, low slateurgent→ redcrm_event_attendeeEvent Attendeesresponse: four coloursdeclined→ redcrm_accountAll Accountsis_active: true green, false slatefalse→ slaterowColorrowColorrow in dark mode keeps its light-mode fill (bg-*-100) under the dark theme's light text, so the row is unreadable; the tint also skips the frozen columns objectui#12375 and nothing here restyles around it.test/view-references.test.ts: the stage row-colour pins (stageRowColors, "every stage has a row colour …", "stage colours stay distinguishable …") guarded the retired Open Deals map and go with it. The stage-path guard and the generic "rowColor keys on select fields are actual option values" guard stay. No new test.service/cases,service/sla-and-escalation(a breach is now what turns a case row red; the priority hex list is gone),sales/activities,sales/leads,sales/opportunities.sales/accountsalready said "the grey rows are the inactive ones" and is unchanged (see Acceptance notes).is_sla_violated). Theprioritycriticalalternative was not taken: no measured profile loses the field (below), and the triage gap is the platform's fetch, not the key.Measurements (light theme, own dev server on port 4107, fresh seeded DB, DOM probe of each
tbody tr)Row class and computed
background-color, grouped by the row's own key cell:bg-red-100/bg-slate-100)oklch(0.936 0.032 17.717)rgb(246, 246, 249)is_sla_violatedas JSONtrue/false, andcolors: { true: 'red' }paints exactly the 13 flagged rows.pnpm demo:staff, All Cases selectsis_sla_violatedand paints every flagged row: service.agent 2 rows (1 red), service.manager 8 (6 red), sales.manager 38 (13 red), admin 38 (13 red). na.rep reads no case at all (readScope: 'own', owns none), so nothing to tint. No profile loses the field.is_sla_violated = true: 4 open (new 1, in progress 1, escalated 2) and 9 settled (closed 6, resolved 3), the late-close breaches SLA reporting shows 0% violations / 100% met although cases are closed after their SLA due date: is_sla_violated is set only by the open-case sweep, so a late close never records the breach #2070 records. The docs say a closed-late case stays red.task.view.tscolors: { urgent: 'red' }mutated to{ critical: 'red' }(scripts/ablation-replace.mjs, anchor 1 → 0, blob6233b9c4→e3a5aa0f),vitest run test/view-references.test.tswent red:view "all_tasks": rowColor key "critical" is not an option of crm_task.priority(1 failed, 54 passed). Restored: blob equal to HEAD,git diff HEADempty.The platform gap (not routed around)
All Accounts and Unassigned — triage tint by a field that is not one of their columns, and the console's list fetch selects only the columns plus view bindings and predicate operands, never
rowColor.field:select=id,name,industry,type,annual_revenue,number_of_employees,health_score, nois_active.select=id,case_number,subject,crm_account,crm_contact,priority,status,origin,sla_due_date,is_escalated,is_closed,owner_id, nois_sla_violated.is_sla_violatedas a column, selects it, and paints every flagged row.So
useRowColorreadsundefinedand paints nothing. The account tint has painted nothing on this pin before this PR too. Adding a column only to make the tint show would route around the platform (AGENTS.md §2, §4), so it is not done. A comment beside each of the two maps records the measurement.Acceptance notes
/crm_event_attendee). That list is not in the app's navigation. An event's Related tab draws its own related list and reads no list-viewrowColor: the declined attendee on that tab is untinted, before and after this PR. This is an observation only, not filed.content/docs/sales/accounts.mdxsays the grey rows are the inactive ones. That matches the declared tint, but on 18.0.0-next.1 it does not render (gap above). It was untrue on the pin before this PR as well. It is left unchanged and becomes true with the platform fix.Verification (head
d9a5739c)pnpm validate: exit 0,✓ Validation passedpnpm typecheck: exit 0pnpm lint: exit 0,18 suggestion(s), no warnings or errorspnpm lint:i18n-gate: exit 0,✓ i18n lint gate: 0 i18n/missing-* issuespnpm hygiene: exit 0,✓ source hygiene cleanpnpm hygiene:tokens: exit 0,✓ source token ratchet cleanpnpm build: exit 0,✓ Build completepnpm test: exit 0,Test Files 179 passed (179),Tests 3658 passed | 1 skipped (3659)Playwright e2e is left to CI.
Generated by Claude Code