Repository navigation
Commit 8ef2a96
fix(app-showcase): scope the command center work queue to in-review tasks (#25534)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuACdPWFJTLDcTrByFCHLzqb)_
Fixes #25503
Clause-②: no
Metadata-protocol: none
## What changed
On the showcase command center
(`examples/app-showcase/src/ui/pages/command-center.page.ts`), the
bottom panel `cc_queue_g` is titled 待审核列表 · Work Queue and carries the
badge 审批中, but its `object-grid` had no filter and listed all 10 seeded
tasks, done ones included. The KPI tile `cc_k3` (待复审 Review) above it
counts only `status = in_review`.
Both blocks now read one module constant, `IN_REVIEW = [{ field:
'status', operator: 'equals', value: 'in_review' }]`. The tile passes it
to `kpi()` as before, and the grid gets `filter: IN_REVIEW`, so the
panel lists the set the tile counts (2 rows on the stock seed).
Landing: the file the claim names. No `packages/spec` edit.
## Which key object-grid reads
`filter`, singular, as a `ViewFilterRule` array:
- **Spec:** `ObjectGridPropsSchema` in
`packages/spec/src/ui/component.zod.ts` (the `filter:
z.array(ViewFilterRuleSchema, …)` member, line 5055 at base
`1ff43b67ea`) is described as "lowered to the wire `$filter`. THE key,
singular — not the plural misspelling". `filters` is declared only as an
alias of `filter` (`FILTERS_TO_FILTER`), and `defaultFilters` is a
retired key.
- **Renderer inputs:** the committed `sdui.manifest.json`, generated
from objectui's built tree at the `.objectui-sha` pin `6fb31dc`, lists
`filter` (type `array`) among `object-grid`'s inputs. It has no
`filters` input.
- **Showcase precedent:**
`examples/app-showcase/src/ui/pages/my-work.page.ts` filters its
`object-grid` the same way. That page is the one #7750 was about: the
plural `filters:` was written there but never read.
The renderer's own read point (objectui `plugin-grid/src/ObjectGrid.tsx`
reading `schema.filter`) is cited from that page's comment. This session
can only read this repository, so I did not open it at the pin myself.
## Pin
`examples/app-showcase/test/command-center-metric-filter.test.ts` gains
a `describe` block. It finds `cc_queue_g` and `cc_k3` anywhere in the
page as authored, helpers included, and asserts four things:
- the queue's `filter` equals the in_review rule array;
- the queue's `filter` equals the tile's `filter`;
- both blocks read the same `objectName`;
- the whole `cc_queue_g` properties bag passes
`ComponentPropsMap['object-grid'].safeParse`.
## Tests (head `15ef279240`)
- `pnpm --filter @objectstack/example-showcase exec vitest run
--maxWorkers=2 test/command-center-metric-filter.test.ts`: Test Files 1
passed, Tests 7 passed.
- `pnpm --filter @objectstack/example-showcase test`: Test Files 38
passed (38), Tests 465 passed (465), lock VERDICT command-exit 0.
- `pnpm --filter @objectstack/example-showcase typecheck`: exit 0. `tsc
--listFiles` includes the test file (count 1).
- `pnpm --filter @objectstack/example-showcase validate` (`os
validate`): Validation passed, exit 0.
- **Ablation:** `node scripts/ablation-replace.mjs` replaced the anchor
`'due_date'], filter: IN_REVIEW } },` with `'due_date'] } },` (anchor x1
to x0, blob a98af74 to 8af132bc2407).
- Red: 2 of 7 failed, "scopes the queue to in_review tasks through
`filter`" and "carries the same rules as the tile `cc_k3`".
- Restore: blob == HEAD (a98af74), `git diff HEAD` empty.
- No build leg: the test imports the page from the package's own `src`.
## Gates
`node scripts/pm/dispatch-gates.mjs --commands` derived 45 commands at
`15ef279240`. 44 exited 0. `pnpm check:dual-build-cjs-loads` exited 3
with PREREQUISITE NOT MET because the worktree built only the showcase's
dependency closure, so that one is NOT MEASURED locally and CI's Lint &
Repo Gates covers it. `--ran` reconciliation: "45 derived famil(ies)
accounted for — 44 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit
3)".
## Changeset
None, with `skip-changeset`. `@objectstack/example-showcase` is
`private: true`, so nothing in this diff publishes.
## Acceptance notes
- `cc_k3`'s filter is now read through the shared constant rather than
written inline. The value it counts is unchanged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016g7nYP9wdNx1GDa5XDr7Uy
Co-authored-by: Claude <noreply@anthropic.com>1 parent 74496c6 commit 8ef2a96
2 files changed
Lines changed: 74 additions & 2 deletions
File tree
- examples/app-showcase
- src/ui/pages
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
101 | 111 | | |
102 | 112 | | |
103 | 113 | | |
| |||
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
149 | | - | |
| 159 | + | |
150 | 160 | | |
151 | 161 | | |
152 | 162 | | |
| |||
169 | 179 | | |
170 | 180 | | |
171 | 181 | | |
172 | | - | |
| 182 | + | |
173 | 183 | | |
174 | 184 | | |
175 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
0 commit comments