This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit 7f2a5f4
committed
fix(plugin-grid): header arrows read the ONE declared
Executes the maintainer ruling of 2026-09-15, director batch #135 item 5,
letter A. Not a decision; execution.
## What a user saw
A view authored `sort: "name desc"` lit a descending arrow on the `name`
header before anyone clicked anything, while the query that fetched those
rows carried no ordering at all. The arrow stated something about the list
that was not true of the rows beside it, and the first click on that column
then asked for `asc` on a list that was in no declared order. The only
signal was a `console.error` no end user reads.
## Why the two halves disagreed
objectui#8221 retired the legacy string clause — one spelling, the array,
everywhere — and objectui#8767 (route C) made this block's fetch path
REFUSE a string `sort` and send no `$orderby`. That ruling deliberately
left the other reader of the same key alone: `parseSchemaSort`, which feeds
the header indicators, went on parsing `"name desc"` and
`["name desc", ...]`. One key, two readers, opposite answers.
## What this does
`parseSchemaSort` admits only `[{ field, order }, ...]` — the spelling
`@objectstack/spec` declares for `ObjectGridPropsSchema.sort` and the only
one the fetch path still lowers. A retired string yields nothing, so it
lights no arrow. The refusal is per entry: a mixed array still lights the
arrows for the keys spelled in the declared form.
No second diagnostic is added. The author is already told once per spelling
by PR #8758's reporter at the fetch path, which quotes the offending value
and prescribes the array form; a second voice here would only restore the
arrow the wire cannot honour.
## What is deliberately unchanged
The wire shape. The array arm still lowers to this block's own
`"field order"` join string; routing the key through the shared sink's
`{field: direction}` map is route B on objectui#8767, which stays declined
until the protocol declares that shape. Measured while here: the
server-side export path reads `schema.sort` itself rather than through
`parseSchemaSort`, so it was already array-only and does not move — the
retired docblock claim that narrowing this reader "takes the export path
with it" was not borne out.
## Pins, both directions
`serverSorting.test.tsx`: the declared array lights the arrow (the case
that already existed); a retired string lights NEITHER direction while the
query carries no `$orderby` and the one diagnostic still fires once. That
case previously pinned the divergence — the arrow drawn beside an empty
query — so the arrow half is what flips. Its non-vacuity control is the
neutral sort indicator, still rendered, so "no arrow" cannot pass by the
column having quietly stopped offering sorting. The unit block re-judges
every spelling it used to admit, each refusal paired with a declared-array
control.
`gridArrayArmOrderby-8973.test.tsx`'s docblock cited this card by a label
that had already moved; it now names the ruling, which does not move.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCpmqvacV4BypY48QdoxcEsort spelling (objectui#8961)1 parent f0f4d6c commit 7f2a5f4
4 files changed
Lines changed: 179 additions & 74 deletions
File tree
- .changeset
- packages/plugin-grid/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 81 | | |
103 | 82 | | |
104 | 83 | | |
| |||
131 | 110 | | |
132 | 111 | | |
133 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
134 | 146 | | |
135 | | - | |
| 147 | + | |
136 | 148 | | |
137 | 149 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 150 | + | |
142 | 151 | | |
143 | 152 | | |
144 | 153 | | |
| |||
2008 | 2017 | | |
2009 | 2018 | | |
2010 | 2019 | | |
2011 | | - | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
2015 | 2027 | | |
2016 | 2028 | | |
2017 | 2029 | | |
| |||
4263 | 4275 | | |
4264 | 4276 | | |
4265 | 4277 | | |
4266 | | - | |
4267 | | - | |
4268 | | - | |
4269 | | - | |
| 4278 | + | |
| 4279 | + | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
| 4285 | + | |
| 4286 | + | |
| 4287 | + | |
| 4288 | + | |
4270 | 4289 | | |
4271 | 4290 | | |
4272 | 4291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
187 | 188 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
206 | 213 | | |
207 | 214 | | |
208 | 215 | | |
209 | 216 | | |
210 | 217 | | |
211 | 218 | | |
212 | 219 | | |
213 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
214 | 223 | | |
215 | 224 | | |
216 | 225 | | |
| |||
237 | 246 | | |
238 | 247 | | |
239 | 248 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
247 | 263 | | |
248 | | - | |
249 | | - | |
250 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
251 | 269 | | |
252 | 270 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
260 | 276 | | |
261 | 277 | | |
262 | 278 | | |
263 | 279 | | |
264 | | - | |
| 280 | + | |
265 | 281 | | |
266 | 282 | | |
267 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
268 | 301 | | |
269 | 302 | | |
270 | 303 | | |
| |||
0 commit comments