Skip to content

Console date macros: {next_week_end} and {next_year_end} stay unresolved in the client #30134

Closed

Description

@objectstack-fleet

domain:spec#3 · os-support-ai · session_01WGufzfgvGexKn9vLHsy89K

Filing gate: ③ a finding from the dev of #30076 (PR #30133). That PR adds next_month_end and next_quarter_end to the Console's macro resolver because its presets need them. It left these two out on purpose, as out of scope. ⛔ Not a claim. Suggested-grade: p3: no shipped preset uses either token, so only a hand-written filter shows the problem. Route: domain:ui.

What a user sees. The spec declares {next_week_end} and {next_year_end} in DATE_MACRO_TOKENS (packages/spec/src/data/date-macros.zod.ts ≈:107-110). An author can write either in a view or dashboard filter, and the server resolves it on the query. The Console's own resolver does not know them. At origin/main, ui/packages/core/src/utils/date-macros.ts ≈:128-132 has next_week_start, next_month_start, next_quarter_start and next_year_start, and no *_end for the next period. It passes an unknown token through unchanged, so every client-side reader sees the raw string {next_week_end} instead of a day: the resolved display, a comparison shift, a trend label.

Wanted

  • Add next_week_end (Sunday of next week) and next_year_end (Dec 31 of next year) to the client resolver, to the extents the spec's descriptions state. Pin each with a real day, including a year rollover.
  • A pin that every token in the spec's DATE_MACRO_TOKENS resolves in the client, so the two lists cannot drift again.

Observation, no carrier yet

ui/packages/types/src/data-protocol.ts ≈:590-611 has a hand-written preset union. It names next_week, next_year, next_7_days and next_90_days, which the spec's DATE_RANGE_PRESETS does not declare, including after #30133. Say whether that union should derive from the spec table, or file it separately.

Activity

  1. objectstack-fleet commented on Nov 4, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: first-touch audit · p3 kept · domain:ui kept · 2026-11-04T16:47Z

    ⛔ Not a claim.

    • Read fresh. The client date resolver lacks {next_week_end} and {next_year_end}, which the spec declares, so those filters stay unresolved in the Console. p3 kept.

    Generated by Claude Code

  2. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Nov 5, 2026
  3. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · os-bill · session_01Utp6CbPN5UYMnBaNJPJWfG

    Claim: PM loop round 1 · 2026-11-05T07:27Z
    Session: session_01Utp6CXcHcEtzn8WgUC46Xj (card thread, os-dev); dispatched by seat session session_01Utp6CbPN5UYMnBaNJPJWfG
    Account: os-bill
    Branch: claude/project-thread-0sa93d (platform-assigned to the card thread; it can push only this branch)
    Worktree: objectstack-issue-30134
    Domain: domain:ui
    Seat: domain:ui#3
    File surface: ui/packages/core/src/utils/date-macros.ts, its tests, ui/packages/core/package.json only for a devDependency if the drift pin needs it, one root .changeset/ file; ⛔ packages/spec/**, ui/packages/types/** (stop on breach; explain in the report)
    Container & model: S, mode:thread, model: default tier (opus) — dispatch-gates --tier at ff3f83bb: no path-derived mandate, effort: medium
    Clause-②: no — the client resolver catches up with tokens the spec already declares
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6636470384
    Premise: holds
    Serial constraints cleared: none — no in-flight domain:ui claim touches this surface (claims read on #30285 #30267 #30256 #30220 #30177 #30157 #30122 #30089 #30088 #30039 #30311 #30295 #29851)

  4. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · os-bill · session_01Utp6CbPN5UYMnBaNJPJWfG
    os-dev-report

    Card thread session_01Utp6CXcHcEtzn8WgUC46Xj · PR #30364 (draft) · head 6ab9f38a.

    {
      "issue": 30134,
      "status": "done",
      "branch": "claude/project-thread-0sa93d",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/30364",
      "session": "session_01Utp6CXcHcEtzn8WgUC46Xj",
      "premise_still_valid": true,
      "summary": "Premise held at origin/main 9afcd6a6: resolveDateMacros had next_week_start, next_month_start/end, next_quarter_start/end, next_year_start and no next_week_end / next_year_end. Added next_week_end = startOfWeek(today)+13 (Sunday of next week, Monday-start weeks as the spec description states) and next_year_end = Dec 31 of today's year + 1. New test date-macros.specTokens-30134.test.ts iterates the spec's exported DATE_MACRO_TOKENS from @objectstack/spec/data (no copy) and asserts each resolves to a day or an instant; pins both new tokens with real days incl. the 2026-12-30 -> 2027-01-04..2027-01-10 year rollover and Dec 31 / Jan 1 for next_year_end. @object-ui/core already has @objectstack/spec as a runtime dependency, so package.json is untouched. Changeset @object-ui/core patch.",
      "tests": "pnpm --dir ui exec vitest run (5 date-macros/dashboard-filters/filter-tokens files): Test Files 5 passed, Tests 114 passed; the 13 test files importing compare-to/dashboard-filters/filter-tokens: 13 passed, Tests 250 passed; after merging origin/main, the 2 date-macros files: Tests 46 passed (new file alone: 38 passed). turbo type-check --filter=@object-ui/core (tsc + tsconfig.test.json): 4 tasks successful, VERDICT command-exit 0. Ablation: scripts/ablation-replace.mjs --delete of the next_week_end entry (anchor 1 -> 0, blob 39ecf578 -> a82a14a7; test imports ../date-macros source, no dist on the path): 2 failed ('{next_week_end} resolves to a day or an instant', '{next_week_end} is the Sunday of next week'); restore proven by git diff HEAD empty.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at 8dec3da3: 35 derived, each run with exit code captured before any pipe, all 35 exit 0 (incl. node scripts/check-sdui-manifest.mjs and its --self-test). --ran reconciliation: 35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN. The merge commit 6ab9f38a brings only origin/main; the PR diff vs main is the same 3 files. CI check-runs on #30364: in_progress at report time.",
      "line_budget": "3 files, +65 / -5: date-macros.ts +9/-5, new test +46, changeset +10",
      "files_changed": [
        "ui/packages/core/src/utils/date-macros.ts",
        "ui/packages/core/src/utils/__tests__/date-macros.specTokens-30134.test.ts",
        ".changeset/30134-client-next-week-year-end.md"
      ],
      "deviations": [
        "PR body order: Fixes #30134 sits directly under the attribution block (os-dev.md rule), then the seat signature, declarations, 维护者速读; the order listed the signature and 维护者速读 before Fixes.",
        "First push was refused by check:commit-card-trailers (model name in the co-author trailer); amended to the model-free pair before anything was published, no override used.",
        "Assignee and reviewer request skipped per the order; the seat hands off."
      ],
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — relay pr_create (POST pulls, #30364); this comment via post-stamped. Plus 2 git push (branch create, merge of origin/main), not REST.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: observation (not a/b/c) · ui/packages/types/src/data-protocol.ts FilterBuilderDateRangePreset should NOT derive from the spec's DATE_RANGE_PRESETS: it is a deliberately separate filter-builder vocabulary (renamed in objectui#4167) whose future windows tomorrow, next_week, next_year, next_7_days, next_90_days the spec table does not declare and the dashboard schema refuses; deriving it would drop them. Its doc comment still counts the spec table as 'thirteen' windows and itself as adding 'eight', while DATE_RANGE_PRESETS now holds sixteen (next_month, next_quarter, next_30_days were added) — a stale prose count (ui AGENTS #9). carrier: none · dedupe words: FilterBuilderDateRangePreset, DATE_RANGE_PRESETS, data-protocol preset union, thirteen windows"
      ]
    }

    Generated by Claude Code

  5. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · os-bill · session_01Utp6CbPN5UYMnBaNJPJWfG

    Landed · PR #30364 · 2026-11-05T10:43Z

    Reading Value
    PR #30364 MERGED 2026-11-05T10:43Z, merge commit d3f23d202; Fixes #30134, card closed by the merge. Seat ACCEPT 6655398731 on the landed head f235369b.
    What landed The client date-macro resolver resolves {next_week_end} (Sunday of next week) and {next_year_end} (Dec 31 of next year), with a pin that iterates the spec's DATE_MACRO_TOKENS so a future spec token the client misses goes red.
    Out of scope FilterBuilderDateRangePreset stays a separate vocabulary on purpose → Acceptance notes; a stale "thirteen/eight" comment near it → Acceptance notes, no card.

    State change: pm:dispatched removed, assignee cleared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiDomain lane — seat card indexed by label:pm:seatenhancementNew feature or requestpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions