You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surface: record detail page → auto-derived related list tab (master-detail child object)
Phenomenon
An auto-derived related list has no way to declare a default sort. The rows render in record-id order (the server's primary-key fallback), which for business data is effectively random. Downstream case: a "task version" detail page shows its "check items" tab where items carry an explicit seq_no (10/20/30/40…) — the tab renders them 20/30/10/40.
Root cause (verified against 17.2.0 dist)
The console's related-list derivation produces columns / title / summary for the tab, but never produces sort;
The related-list component only appends $orderby to the query when it is handed a sort — so the derived list's query goes out without $orderby and falls to the PK order;
There is no declaration surface anywhere to fill the gap:
the field-level relatedList* keys (relatedList, relatedListTitle, relatedListColumns, relatedListFilter) have no sort key, and the schema is $strict — adding one is rejected;
the child object's own list view sort is not consulted by the derivation (verified: child default view sorted by seq_no, related list still id-order);
view.form.defaultSort was removed in 17.0.0.
Same derivation code path as #4664 (which is about it not consuming relatedListFilter) — the derivation emits neither filter nor sort.
Repro
Master object A, child object B (master_detail lookup to A) with a number field seq_no;
Create 4 B-records under one A in shuffled order so seq_no = 20/30/10/40 by creation sequence;
Open A's record page → B tab: rows show 20/30/10/40 (id order), not 10/20/30/40;
Set B's default list view sort: [{field:'seq_no', order:'asc'}] → B's own list obeys it, the related list tab does not; network shows the related-list request carries no $orderby.
Environment
@objectstack/*@17.2.0(@objectstack/console@17.2.0,@objectstack/spec@17.2.0)Phenomenon
An auto-derived related list has no way to declare a default sort. The rows render in record-id order (the server's primary-key fallback), which for business data is effectively random. Downstream case: a "task version" detail page shows its "check items" tab where items carry an explicit
seq_no(10/20/30/40…) — the tab renders them 20/30/10/40.Root cause (verified against 17.2.0 dist)
columns/title/summaryfor the tab, but never producessort;$orderbyto the query when it is handed asort— so the derived list's query goes out without$orderbyand falls to the PK order;relatedList*keys (relatedList,relatedListTitle,relatedListColumns,relatedListFilter) have no sort key, and the schema is$strict— adding one is rejected;sortis not consulted by the derivation (verified: child default view sorted byseq_no, related list still id-order);view.form.defaultSortwas removed in 17.0.0.Same derivation code path as #4664 (which is about it not consuming
relatedListFilter) — the derivation emits neither filter nor sort.Repro
master_detaillookup to A) with a number fieldseq_no;seq_no= 20/30/10/40 by creation sequence;sort: [{field:'seq_no', order:'asc'}]→ B's own list obeys it, the related list tab does not; network shows the related-list request carries no$orderby.Ask (either)
relatedListSortnext to the existingrelatedList*keys (mirroring how Auto-derived related lists consume the new field-levelrelatedListFilterdeclaration — list query AND-composed, tab badge honors the same filter #4664 asksrelatedListFilterto be consumed), orsort.Either way the related-list query should carry
$orderby, and pagination (if any) should respect it.Blocked-by: objectstack-ai/objectstack#11345
Generated by Claude Code