Uh oh!
There was an error while loading. Please reload this page.
Scope the by-unit lens to open work - #91
Conversation
`by_unit` carried no filter, so it rendered all 186 tasks — 151 of them `done` — against a `top=100` request. The grid groups client-side over the fetched page and computes its per-group counts over that same array, so every group header read a page slice as a total and one of the five business units had no group on the screen at all, with nothing saying a unit was missing. Measured in a browser on the seeded app, same server and session, with only this filter reverted: before Operations 33 · Plant 3 · Quality 46 · Riverside 18 = 100, "Showing first 100 records", Central Office ABSENT after Central Office 1 · Operations 7 · Plant 1 · Quality 18 · Riverside 6 = 33 records, five groups, no truncation It is also the better lens on its merits — nobody wants a by-unit breakdown of work that finished six months ago. Not a bigger page size, which moves the cliff instead of removing it. The residual is stated rather than papered over: this stays structurally page-scoped, so the view's `description` says the dashboard is the authoritative by-unit surface and this lens is for browsing. That description is served but NOT rendered today — the console's ObjectView relay never copies a per-view `description` onto the ListView schema — filed as objectstack-ai/objectui#7199 and said plainly in the view comment so nobody believes the caveat is in front of users yet. The guard pins the decision and inventories the other grouped grids, in the same file and idiom as #85's — `catalog_tree` is measured at 31 duties and deliberately not required to carry a filter. Upstream: objectstack-ai/objectui#7189. Closes#86 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SqkTcrxUFci7nqXdbBSe2p
os-warren
commented
Sep 1, 2026
Reviewed — merging. One labelling correction, and the work itself is right.First, a note on the evidence, because I nearly misread it. The report points at Five groups, Central Office present where it was absent before, every row The code carries the filter: Gates, re-run by me on the head merged with current The narrowing is right, againThe guard is a pin on the And the residual is honest
The environment friction you reported at the end — Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
A manager opens the schedule to see an overloaded fortnight before it arrives; nothing about that question involves work that is already done. On the demo seed 151 of the 186 scheduled tasks are `done`, so the lens spent nearly all of its height drawing finished bars. Extends #91's grouped-lens scope inventory rather than adding a second mechanism: the walk now covers the kanban/gantt/timeline `groupByField` lenses alongside the grid `grouping` block, names which mechanism each line is about, and pins the two lenses whose scope is a decision. It is still a pin-and-inventory, not a rule that every grouped view must be filtered — that rule fires on `catalog_tree` and on `board`, both fine. The card's diagnosis was checked in a browser first and does NOT hold: the gantt is not page-scoped. Its chart is served by the non-grid fetch, which sends no `top`, so it drew all 186 rows and all 12 owner groups over the full span, while a separate `top=100` fetch fed the footer beneath it. No owner group was missing before this change. The view comment and the guard message say so, so that neither is later cited as evidence for something that was not measured. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SqkTcrxUFci7nqXdbBSe2p
151 of the 186 scheduled tasks are done, and a gantt of finished work answers no question this screen is opened with. Filtering to open work also removes a "more data may be available" footer that was printed under a complete chart. The card's diagnosed mechanism is falsified and the correction is recorded in the view comment and the guard's message: the gantt is NOT page-scoped. One page load issues two fetches — a paged one feeding only the footer, and an unbounded one feeding the chart — so all 186 rows and all 12 owner groups were already drawn. Nothing was being dropped. Owen Pryce's one scheduled task falls outside the paged fetch, so he is the owner who would have vanished had the chart consumed it. #91's scope inventory is extended rather than duplicated. Upstream: objectstack-ai/objectui#7210. Closes#96
Fixes#86
Implements the triage decision on the card, not the three options in its body: the lens is paging because it is showing the wrong rows, so it gets a scope rather than a bigger page.
The change
duly_task › by_unitcarried no filter and rendered all 186 tasks, 151 of themdone, against atop=100request. It now carriesstatus in ('open','in_progress').Two things beyond the one-line filter, and they are the reason the card exists:
Page size deliberately not raised: it moves the cliff instead of removing it, and hides the next occurrence.
Measured, in a browser, on the seeded app
Same server, same session, same seed — only this filter reverted between the two runs (
git checkout origin/main -- src/views/task.view.ts, restored through a trap). Console at/_console/apps/duly_app/duly_task/view/by_unit.Before — four groups, and the counts are page slices:
Footer:
100 records · Showing first 100 records. More data may be available.— reproducing the card's measurement exactly.After — five groups, every count true:
Footer:
33 records(no truncation notice). Header counts sum to 33, visible data rows 33, and the request the grid issues is:Counted independently off the seed and matching row for row: 27
open+ 6in_progress= 33, spread 18 / 7 / 6 / 1 / 1 across all five units.The guard
In
test/metadata-bindings.test.ts, alongside#85's grouping-projection guard and in its idiom — not a second mechanism. It pins the decision (by_unitcarries the open-work scope) and inventories every grouped grid with the scope it carries, which doubles as the non-vacuity counter.Scoped to a pin rather than a rule, by measurement: a "grouped grids must be filtered" rule would fire on
duly_duty › catalog_tree, which groups two levels deep, carries no filter, and measurably does not need one — the seed holds 31 duties, one page, all groups present. That is the same false-positive trap #85's file narrows away from.Proven red before the fix, both assertions:
Nine cases in total, including synthetic self-tests that pin both directions (widened scope, a
not_inre-spelling, a filter on another field, and a view that does not group).What stays broken — please do not read this as a full fix
Even filtered, this lens is structurally page-scoped. A deployment with more open tasks than a page hits exactly this again, with the same silent missing group. The filter buys a correct lens at this product's realistic scale, not a correct mechanism. The durable answer is upstream: objectstack-ai/objectui#7189 (server-side grouping and true per-group counts for a grid; the platform already does this for the dashboard through a dataset, just not on this surface).
So the honest position — and the view's
descriptionnow says it — is that the dashboard is the authoritative by-unit surface and this lens is for browsing.One caveat found while verifying, and it matters for that sentence: the
descriptionis authored, validated, built and served (GET /api/v1/meta/view/duly_taskcarries it), but it does not render. The console'sObjectViewrelay copieslabel,sort,filterand friends off the active view onto the ListView schema and never copiesdescription, so the branch inListViewthat would display it (data-testid="view-description") never receives a value. Nothing errors. Filed as objectstack-ai/objectui#7199, and the view comment says so plainly so nobody believes the caveat is in front of users yet. The key stays authored: it is the spec's home for this sentence, it is served to API/MCP callers today, and it starts rendering the moment the relay is fixed.Gates
All four green on
b780718(the commit this PR points at):validateprints the one expectedhierarchy-securitycapability warning thatAGENTS.mddocuments as this repo's normal state.No changeset — this repo has no changeset mechanism; the four gates are the whole contract.
Generated by Claude Code