fix(app-todo): re-model count-only dashboard tables as ListViews (#1719)#1725
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
The
overdue_tasks_tableanddue_todaywidgets inexamples/app-todo/src/dashboards/task.dashboard.tsweretype: 'table'widgets bound to thetask_metricsdataset selecting only thetask_countcount measure with no dimensions — rendering a single summary row instead of the task listings they intended.objectstack validate/buildemitted thetable-count-onlywarning 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:
due_todaygrid ListView ontodo_task, filtered todue_date = {today}(date macro) andis_completed = false, sorted by priority. TheoverdueListView already existed from the ADR-0021 Phase 2 report conversion.viewName: 'overdue'/viewName: 'due_today'so they land directly on the filtered listings.overdue_tasks/completed_todaymetric widgets.Verification
node packages/cli/bin/run.js validateandbuildinsideexamples/app-todopass with thetable-count-onlywarnings gone (CLI rebuilt locally first — the stale localdistpredated the widget-binding check). Remainingtsc --noEmiterrors in the example are pre-existing onmain(confirmed via stash) and untouched by this change.Closes #1719.
🤖 Generated with Claude Code