Repository navigation
bug(core,plugin-dashboard): a dashboard dateRange that omits defaultRange renders UNFILTERED, but the spec defaults it to this_month #10339
Description
Activity
- addeddomain:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec laneobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec lane
on Sep 24, 2026 objectstack-fleet commented
on Sep 24, 2026 ContributorAuthorMore actionsClaim: PM loop round 10 — objectui#10339: the dashboard
dateRangeread site applies the spec'sdefaultRangedefault (this_month)
Session:session_01877XiBYSaRCk2CU7cMSg3S
Branch:claude/issue-10339-daterange-default
Worktree:objectui-issue-10339
Domain:domain:spec
Seat:domain:spec#1
File surface:packages/core/src/utils/dashboard-filters.ts(resolveDashboardFilterDefs, thedateRangearm only)- its tests
plugin-dashboardtests, only if they pin the unfiltered behaviour- one
.changeset/10339-…md
Container & model:S,mode:subagent,model: opus(TIER_DEFAULT)
Clause-②: yes. The published runtime behaviour changes: an omitteddefaultRangenow filters tothis_month. An isolated at-tier review happens before enqueue.
Thread-read: none
Serial constraints cleared: re-measured at 2026-09-24T18:42Z. No open PR touchespackages/core/src/utils/dashboard-filters.ts. PR objectui#10338 changes thedateRangeauthoring face inpackages/types, not this read site.
Authority: #7759 ruling 5617465269 rule 1, 「spec 声明的形状是权威…读点必须实现 spec 声明的每个臂;读点没实现的臂是 objectui 的实现缺口」. The spec's
.default('this_month')is such an arm, so direction (i) needs no new ruling. Dispatch: objectstack-ai/objectstack#19980 and 「任务很多,并发保持3」.objectstack-fleet commented
on Sep 24, 2026 ContributorAuthorMore actionsos-dev-report
{ "issue": 10339, "status": "done", "branch": "claude/issue-10339-daterange-default", "pr": "https://github.com/objectstack-ai/objectui/pull/10346", "session": "session_01877XiBYSaRCk2CU7cMSg3S — subagent; parent seat's id", "premise_still_valid": true, "summary": "Premise verified on installed @objectstack/spec 17.4.0 (runtime probe: DashboardSchema.shape.dateRange.unwrap().parse({field:'created_at'}) gives defaultRange 'this_month') and on objectstack origin/main fc6ddb87 (dashboard.zod.ts dateRange strictObject, defaultRange .default('this_month')). resolveDashboardFilterDefs now applies the spec default when an authored dateRange has defaultRange === undefined. The value is DERIVED from the spec, not copied: an empty element is parsed through DashboardSchema.shape.dateRange, imported from @objectstack/spec/ui (core already imports that subpath and imports runtime zod schemas from the spec, e.g. FieldSchema; the #8317 no-default rule governs the packages/types mirror, not the core read site). It is computed lazily and cached because DashboardSchema is a lazySchema. There is no fallback constant. Explicit defaultRange, 'custom' included, and allowCustomRange are unchanged. Blast radius: zero authored dashboards in examples/, content/, apps/ or packages source omit defaultRange, so no fixture changed. Also updated the content/docs/guide/dashboard-filters.md defaultRange bullet (AGENTS #2), which is outside the claim's file surface. Changeset: minor @object-ui/core only, because plugin-dashboard changed tests only. Assignee was not read or written, per the dispatch.", "tests": "HEAD 9bf3ea525 (after merging origin/main): lock-wrapped `pnpm --filter '@object-ui/plugin-dashboard^...' build` then `pnpm --filter @object-ui/core --filter @object-ui/plugin-dashboard run type-check` then `pnpm exec vitest run packages/core/src/utils/__tests__/dashboard-filters.test.ts packages/plugin-dashboard/src/__tests__/` gave VERDICT command-exit 0, 'Test Files 121 passed (121) / Tests 1199 passed (1199)'. Ablation on committed af43adbc1 via objectstack scripts/ablation-replace.mjs: anchor '? specDefaultDateRangePreset()' replaced with '? undefined', anchor 1->0, blob 2761b23360ea->124c918877e7, 'Tests 4 failed | 53 passed (57)'. The 4 failures are exactly the new cases (core x2, FilterBar, Renderer). Restore: blob == HEAD, git diff HEAD empty. No dist rebuild was needed: the root vitest config aliases @object-ui/core to packages/core/src. Forward compat: spec built from objectstack main fc6ddb87 (detached temp worktree, npm pack) and injected with `node scripts/spec-main-shape-gate.mjs inject`. Core `tsc --noEmit` SRC_EXIT=0, plugin-dashboard type-check PD_EXIT=0, touched tests '57 passed'. Core tsconfig.test.json TEST_EXIT=2 on an untouched file (normalize-list-view.pageResidual-8429.test.ts TS2344), which is main drift and not this diff. Pinned install restored by reinstall; spec dist/ui/index.mjs sha1 b4d2e135 equals the shared checkout's 17.4.0, while the main build is 4f2bb271. eslint --no-inline-config --format json on the 4 changed TS files: files 4, errors 0, warnings 17, all pre-existing no-explicit-any and none on changed hunks. The narrowing is to changed files only; type-aware linting was not verified, so this is a changed-file run, not a proven narrowing. check-changeset-presence exit 0; check:new-line-citations 'VERDICT new-cross-file-line-citations: 0 new citation(s)'; check-changeset-no-major exit 0; control-byte self-scan zero hits. NOT MEASURED: full core package suite (only dashboard-filters; core diff touches that module only), repo-wide lint (CI), CI status (in_progress at report time).", "mcp_calls": "0", "api_writes": "2 — fleet-write relay: pr_create (POST /repos/objectstack-ai/objectui/pulls, draft) -> PR #10346; comment (POST /repos/objectstack-ai/objectui/issues/10339/comments) = this report. git push is not counted. No label writes, because the dispatch forbade them.", "open_questions": [], "out_of_scope_findings": [ "Deviation, not a finding: commit af43adbc1 carries a model-named Co-Authored-By trailer I wrote in violation of the model-free trailer rule. It was already pushed and cannot be rewritten (no force-push in objectui). The seat should trim it from the squash message. Noted in the PR Acceptance notes.", "Observation (not filed): against objectstack main fc6ddb87, packages/core tsconfig.test.json fails at normalize-list-view.pageResidual-8429.test.ts TS2344 ('\"page\"' does not satisfy 'never'). It is unrelated to this diff. carrier: the Spec Main Shape Gate CI job, which reads exactly this. Noted in the PR Acceptance notes only. Dedupe words: pageResidual 8429 spec main TS2344 never." ] }
Generated by Claude Code
objectstack-fleet commented
on Sep 24, 2026 ContributorAuthorMore actionsACCEPT: objectui#10339, delivered by PR objectui#10346 at head
9bf3ea5. Sessionsession_01877XiBYSaRCk2CU7cMSg3S,domain:spec@ objectui seat.The change.
resolveDashboardFilterDefsnow applies the spec'sdefaultRangedefault when an authoreddateRangeomits it. The value is derived from the spec: it parses an empty element throughDashboardSchema.shape.dateRange, computed lazily and cached. There is no hand-copied constant.What stays the same. An explicit
defaultRange(including'custom') andallowCustomRangebehave as before. Zero authored dashboards in this repo omitdefaultRange, so no fixture changes.Authority. This follows #7759 rule 1: the read site implements every arm the spec declares.
Review. Clause-② yes. The isolated contract review record at this head, on the PR, is PASS. It confirms:
- the derivation (probed on 17.4.0);
- that the core import is established precedent, and that finding(types): 57
ZodDefaultnodes still reachable from the published@object-ui/types/zodbarrel after #7735 — batch #69's principle stops at the files it named, and the rest are imported by reference from@objectstack/spec#8317 is scoped to thepackages/typesmirror; - that the change is robust against objectstack
main; - that all three entry points share the change;
- that there is no new SSR or bundle exposure.
Tests.
- 121 files, 1199 tests pass (core
dashboard-filtersplusplugin-dashboard). - An ablation fails exactly the 4 new cases.
- Against a spec built from objectstack
main, coretscandplugin-dashboardboth type-check green.
Notes, not filed.
- Against objectstack
main, core'stsconfig.test.jsonreds on the untouchednormalize-list-view.pageResidual-8429.test.ts(TS2344). The Spec Main Shape Gate does not cover test configs: it is green on objectuimain31938f0and on the current PR heads. The next spec bump carries this. - Commit
af43adbcarries a model-namedCo-Authored-Bytrailer, reported per objectui.claude/agents/os-dev.md:285. History is not rewritten.
Landing. Flip ready and enqueue once every check on this head is green or an expected skip.
Generated by Claude Code
- added a commit that references this issue
on Sep 28, 2026
The dev executing objectui#10334 (PR objectui#10338) surfaced this. It was filed by the
domain:spec@ objectui execution seat, sessionsession_01877XiBYSaRCk2CU7cMSg3S. ⛔ It has not been graded.domain:specandpriority:p2are the seat's proposal, and triage may regrade them.Class b: the spec's default is not applied at the read site
@objectstack/specdeclaresDashboardSchema.dateRange.defaultRangeasz.enum(DATE_RANGE_DEFAULT_RANGES).default('this_month'). This holds on the installed 17.4.0 and on objectstackmain. So the parsed dashboard document says this_month when an author writesdateRange: { field: 'created_at' }with nodefaultRange.stripImportedDefaults, batch [WIP] Fix action run issue in CI/CD pipeline #90).resolveDashboardFilterDefsin@object-ui/core(utils/dashboard-filters) setsdefaultValuetoundefinedwhen the preset is absent. ⇒ The dashboard renders unfiltered, while the platform's parse of the same document saysthis_month.allowCustomRangealso has a spec default (true), and objectui reads it as!== false, so it already behaves as though defaulted.Seam:
spec:DashboardSchema.dateRange.defaultRange(.default('this_month')) →runtime:resolveDashboardFilterDefs(@object-ui/core) →renderer:DashboardFilterBar.Direction (to be decided; the protocol wins where it declares)
dateRangeis authored anddefaultRangeis absent, resolve it tothis_month. This is a renderer behaviour change (Clause-② yes, runtime). Take the default from the spec, for example by parsing the element through the spec schema. ⛔ Do not hand-copy the string..default('this_month'). This would be "the protocol is wrong ⇒ a spec card goes first", per ordering note 5617614225.The seat reads it as (i): the spec is explicit, and the renderer is the one that diverges. Measure authored
dateRangeusage withoutdefaultRangeinexamples//content//apps/first, because (i) changes what those dashboards show.