Skip to content

Commit ff41188

Browse files
os-zhuangclaude
andauthored
test(showcase): exercise the spec bare-string sort form on a real list view (#3174)
The spec/renderer shape-mismatch audit (objectui#2601) found the showcase had ZERO list views using @objectstack/spec ListViewSchema.sort's bare STRING form ('field [asc|desc]') — only the {field,order}[] array form — which is exactly why the 'schema.sort.map is not a function' crash lurked undetected. Add sort: 'estimate_hours desc' to the Task List (tabular) view as a live coverage fixture so the string form is exercised by any browser dogfood / coverage pass. Browser-verified end-to-end on latest main (objectui + framework): the list renders 10 records with no crash, no error boundary, no sort-map error, and the Estimate column is correctly descending (60→40→30→24→20→18→16→16→12→8). Claude-Session: https://claude.ai/code/session_01HG5LQnPbQbjAAyofghzz3Z Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5754a23 commit ff41188

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

examples/app-showcase/src/ui/views/task.view.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ export const TaskViews = defineView({
9898
{ field: 'estimate_hours' },
9999
],
100100

101+
// @objectstack/spec ListViewSchema.sort accepts a bare STRING
102+
// ("field [asc|desc]"), not only the {field,order}[] array form. This
103+
// is the exact shape that used to crash the renderer with
104+
// "schema.sort.map is not a function" (objectui#2601) — kept here as a
105+
// live coverage fixture so a real list view exercises the string form.
106+
sort: 'estimate_hours desc',
107+
101108
// ADR-0053 — NO `userFilters` here: on an object list view ("views"
102109
// mode) the console suppresses them by design (the view switcher is
103110
// the only nav control; objectui warns since #2220). End-user filter

0 commit comments

Comments
 (0)