diff --git a/workplans/CUST-WP-0030-dashboard-entity-list-ux.md b/workplans/CUST-WP-0030-dashboard-entity-list-ux.md index 323d8ad..f1a4dd0 100644 --- a/workplans/CUST-WP-0030-dashboard-entity-list-ux.md +++ b/workplans/CUST-WP-0030-dashboard-entity-list-ux.md @@ -4,11 +4,11 @@ type: workplan title: "Dashboard Entity List UX" domain: custodian repo: the-custodian -status: done +status: active owner: custodian topic_slug: custodian created: "2026-03-29" -updated: "2026-03-30" +updated: "2026-03-29" state_hub_workstream_id: "9d8e1c33-2067-4593-a5d8-d28dda3b1d21" --- @@ -166,6 +166,62 @@ description: > state_hub_task_id: "3225cc6c-2574-41e9-b8fd-e5e703a9dd7c" ``` +```task +id: T07 +title: "Repo filter dropdown on Token Cost page" +status: done +priority: high +description: > + Add a "Filter by repo" select element directly below the Token Cost page + heading (above all three tables). Populate options from the already-fetched + /repos/ data (plus an "All repos" default at the top). When a repo is selected, + re-render all three tables (By Repo, By Workplan, Top Tasks) showing only rows + whose data is attributed to that repo. The individual-events data (fetched for + wsMap/taskMap) is already keyed by repo_id on each event — use that to filter + By Workplan and Top Tasks rows client-side. By Repo always shows at most the + selected repo (one row). If "All repos" is selected, all rows are shown as + before. Implement filtering as a reactive variable that triggers table redraws. +state_hub_task_id: "c01cead4-ff9c-4533-b3d8-9f7554387771" +``` + +```task +id: T08 +title: "Sort order dropdown on Token Cost page" +status: todo +priority: high +description: > + Add a "Sort by" select element immediately to the right of the repo filter + dropdown. Options (in display order): + "Tokens Total" (default — current server-side order) + "Tokens In" + "Tokens Out" + "Event Count" + "Most Recent" + Implement as a client-side sort applied after filtering and before slicing for + max-results. For the first four options sort descending by the named field. + For "Most Recent", sort each table's rows by the most recent created_at among + the individual token events belonging to that row's group (repo/workstream/task). + Derive a lastEventAt lookup map from the already-fetched /token-events/ data; + rows with no events sort last. The sort applies uniformly to all three tables. +state_hub_task_id: "84183245-5016-4d87-ad6a-9cd5f6873245" +``` + +```task +id: T09 +title: "Max results dropdown on Token Cost page" +status: todo +priority: medium +description: > + Add a "Show" select element immediately to the right of the sort dropdown. + Options: 10, 20, 50, 100, 500. Default: 20. + After filtering and sorting each table's data array, slice to at most N rows + before rendering. Display the total available count beneath or beside each + table when the table is truncated (e.g. "Showing 20 of 47"). The limit applies + independently per table (each table may have different totals). No API change + needed — client-side slice of the already-fetched arrays. +state_hub_task_id: "3ef43135-fb65-4cca-b8c3-4c7eeb52107c" +``` + ```task id: T06 title: "Consistency gate and docs update" @@ -245,6 +301,27 @@ Implementation: - `fieldRow` updated to dispatch to `_linkCell` whenever the field key is in `FIELD_LINKS` and the value is non-null. +### I05 — improvement — Max results dropdown + +A "Show" select (10 / 20 / 50 / 100 / 500, default 20) sits to the right of +the sort dropdown. After filtering and sorting, each table is sliced to at most +N rows. A "Showing M of N" note appears below any truncated table. + +### I04 — improvement — Sort order dropdown + +A "Sort by" select sits to the right of the repo filter. Options: Tokens Total +(default), Tokens In, Tokens Out, Event Count, Most Recent. Sorting is applied +client-side after filtering and before the max-results slice. "Most Recent" +sorts by the maximum `created_at` among the events in each group, derived from +the already-fetched individual events data. + +### I03 — improvement — Repo filter dropdown + +A "Filter by repo" select appears directly below the Token Cost heading. Options +come from the already-fetched `/repos/` list plus "All repos" at the top. +Selecting a repo filters all three tables client-side to show only rows +attributable to that repo. No API change needed. + ### I01 — improvement — Workstream and task Name columns show titles T05 originally showed truncated UUIDs in the Workstream and Task name