Skip to content

fix(app-todo): re-model count-only dashboard tables as ListViews (#1719)#1725

Merged
os-zhuang merged 1 commit into
mainfrom
fix-1719-app-todo-count-only-tables
Jun 11, 2026
Merged

fix(app-todo): re-model count-only dashboard tables as ListViews (#1719)#1725
os-zhuang merged 1 commit into
mainfrom
fix-1719-app-todo-count-only-tables

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

The overdue_tasks_table and due_today widgets in examples/app-todo/src/dashboards/task.dashboard.ts were type: 'table' widgets bound to the task_metrics dataset selecting only the task_count count measure with no dimensions — rendering a single summary row instead of the task listings they intended. objectstack validate/build emitted the table-count-only warning for both (#1719).

Per ADR-0017 (object has-many view), record listings belong in object-bound ListViews surfaced through app navigation — the same fix class as objectstack-ai/templates#27 downstream:

  • views/task.view.ts — add a due_today grid ListView on todo_task, filtered to due_date = {today} (date macro) and is_completed = false, sorted by priority. The overdue ListView already existed from the ADR-0021 Phase 2 report conversion.
  • apps/todo.app.ts — the existing "Overdue" / "Due Today" nav items now carry viewName: 'overdue' / viewName: 'due_today' so they land directly on the filtered listings.
  • dashboards/task.dashboard.ts — remove the two count-only table widgets; counts remain covered by the existing overdue_tasks / completed_today metric widgets.

Verification

node packages/cli/bin/run.js validate and build inside examples/app-todo pass with the table-count-only warnings gone (CLI rebuilt locally first — the stale local dist predated the widget-binding check). Remaining tsc --noEmit errors in the example are pre-existing on main (confirmed via stash) and untouched by this change.

Closes #1719.

🤖 Generated with Claude Code

The `overdue_tasks_table` and `due_today` dashboard widgets were
`type: 'table'` widgets bound to the `task_metrics` dataset selecting
only the `task_count` count measure with no dimensions — a single
summary row, not the per-record listing they intended. `objectstack
validate`/`build` flagged both with the `table-count-only` warning.

Per ADR-0017, model record listings as object-bound ListViews surfaced
through app navigation (the same fix class as objectstack-ai/templates#27):

- views: add a `due_today` grid ListView on `todo_task` filtered to
  `due_date = {today}` and incomplete; the `overdue` ListView already
  existed from the ADR-0021 Phase 2 report conversion.
- app: point the existing "Overdue" / "Due Today" nav items at the
  views via `viewName`.
- dashboard: drop the two table widgets; counts stay covered by the
  `overdue_tasks` / `completed_today` metric widgets.

`objectstack validate` and `build` now pass with no warnings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 11, 2026 11:44am

Request Review

@os-zhuang
os-zhuang merged commit 119ff49 into main Jun 11, 2026
7 of 8 checks passed
@os-zhuang
os-zhuang deleted the fix-1719-app-todo-count-only-tables branch June 11, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

构建期告警:table/pivot dashboard widget 绑定到「count-only」数据集(很可能是应做成 ListView 的记录列表)

1 participant