fix(platform-objects): stop the System Overview date bar from windowing the Organizations and Packages Installed tiles - #7703
Merged
os-zhuang merged 1 commit intoAug 11, 2026
Conversation
…ng the Organizations and Packages Installed tiles Finishes Row 1 of the System Overview board. #7531 fixed "Total Users" and "Active Sessions"; the identical defect was still live on the other two tiles of the same inventory row. The board declares a `created_at` global filter defaulting to `last_7_days`, and a dashboard-level filter is broadcast into every widget's analytics query (#2501). A `created_at` column exists on `sys_organization` and `sys_package_installation` alike, so the broadcast landed on both: the "Organizations" tile counted organizations created in the last 7 days under a description reading "Total organizations on the platform", and "Packages Installed" counted installations created in the last 7 days under one reading "Active package installations across projects". Both tiles now opt out with `filterBindings: { created_at: false }`. On "Packages Installed" that opt-out is orthogonal to the existing `filter: { status: 'installed' }` and both stand. The tile-semantics pin gains two fixture sets and two blocks, in the shape the file already establishes: invariance across windows, fixtures that straddle the 7-day boundary, and each claim's opposite direction in the same block. Every "still bound" control stays an audit widget, deliberately -- a Row 1 tile that is still bound is bound by this defect, not by intent. Fixes #7613 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GvsNM43jua7yR67dF3Mp4j
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
August 11, 2026 12:04
os-zhuang
deleted the
claude/issue-7613-system-overview-remaining-tiles
branch
August 11, 2026 12:16
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 #7613
Finishes Row 1 of the shipped System Overview board. #7531 (PR #7614,
8c20f755b) fixed "Total Users" and "Active Sessions"; this is the identical defect on the two tiles of the same inventory row that were deliberately left out of that card's scope.Premise, re-verified before implementing
Checked against
origin/mainat19bca8c, not taken from the dispatch:origin/mainwidget_organizationslacksfilterBindingswidget_total_users(line 54) andwidget_active_sessions(line 96)widget_packages_installedlacksfilterBindingsglobalFiltersblock is unchangedfield: 'created_at',scope: 'dashboard',defaultValue: 'last_7_days'widget_packages_installedcarriesfilter: { status: 'installed' }Both tiles are still defective, so this is not a no-op.
The defect
The board declares one dashboard-level filter,
created_atdefaulting tolast_7_days, and a dashboard-level filter is broadcast into every widget's analytics query (#2501). Acreated_atcolumn exists onsys_organizationandsys_package_installationalike, so the broadcast landed on both:status: 'installed', under one reading "Active package installations across projects".Both are stocks, not flows. An organization founded last year has not stopped existing because the date bar says
last_7_days, and a package installed a year ago is still installed. On a fresh datastore every row is recent, so the windowed count and the true total coincide — which is why both read as correct in a demo and under-report on any instance older than the window.Fix, one line per tile:
On "Packages Installed" that opt-out is orthogonal to the widget's existing
filter: { status: 'installed' }and both stand: the predicate decides which installations count, the opt-out decides how many. The source now says so at the site, so the next author does not read one as replacing the other.The date bar still does its job
All six
sys_audit_logwidgets (rows 2-4) still inherit it — the pin asserts that explicitly, and it is what the filter was added for. No labels or descriptions changed, so no translation key moves.The pin: two fixture sets, two blocks
Extends
system-overview-tile-semantics.test.tsin the shape that file already establishes — property, not snapshot. 7 new cases, 8 to 15.Fixtures straddle the 7-day boundary deliberately: an all-recent fixture makes every assertion in the file pass for free, which is the exact trap that let this ship.
ORGANIZATIONSis 400 / 200 / 2 days old;PACKAGE_INSTALLATIONSadds two non-installed rows, one of them inside the window on purpose.statuspredicate still appliesThe installed-only count the tile is compared against is derived from the fixture directly, never from the widget's own filter — deriving it from the filter would make the comparison a tautology.
Every "still bound" control is an audit widget, deliberately. An audit tile is correctly windowed, so it is bound by intent and is a legitimate control.
widget_organizationswas "still bound" too before this PR and would have worked perfectly well as one — which is exactly the problem: pinning it that way would have written this bug into the suite as expected behaviour. The file header now carries that reasoning as a standing note for whoever extends it next. The two new controls arewidget_recent_eventsandwidget_login_events, distinct from thewidget_events_by_typethe #7531 block already uses.Reverse verification
Direction predicted before running: red. Reverting the board file to
origin/mainwith the tests in place turns exactly 3 of the 7 new cases red, naming the defect rather than a shape:The other 4 stay green, which is their expected direction: the two
ignoreOptOutlegs and the two audit controls describe the pre-fix board on purpose. The 8 cases from #7531 also stay green, correctly — that revert restoresorigin/main, which already carries their opt-outs.Third case worth flagging: it goes red on its
toContain('p_legacy')leg rather than on astatusleg. That is the honest reading — the block pins that both the predicate and the opt-out stand, so removing either breaks it. Itsnot.toContainlegs stay green under the revert, because thestatuspredicate is untouched by this PR.Verification
pnpm --filter @objectstack/platform-objects testpnpm --filter @objectstack/platform-objects typecheckpnpm --filter '@objectstack/platform-objects^...' builddistrulepnpm exec eslint packages/platform-objects/src/apps/dashboardsnode scripts/check-nul-bytes.mjspnpm check:i18npnpm check:empty-changesetvalidateWidgetBindingsover the real boardcheck:i18nfirst refused withPREREQUISITE NOT MET - the workspace CLI is not builtand named its own fix; the workspace CLI was built and the gate then ran for real. TheEXIT=$?reading is the one quoted above, not a piped one.The
validateWidgetBindingsrun reports 2 pre-existingchart-config-missingadvisories onwidget_events_by_typeandwidget_events_by_user— the same two PR #7614 already recorded as live onmain. Neither widget is touched here and neither advisory is introduced by this diff.Scope
setup-nav.contributions.tswas not touched, per the #7544 serialization constraint. Nopackages/specchange was needed: this is board-metadata authoring, andfilterBindingsis an existing authorable key the contract already declares.Out-of-scope findings
None new. #7568 remains open as the same class on a different surface (the showcase ops dashboard) and is untouched.
Generated by Claude Code