Repository navigation
Commit 5517005
fix(app-shell): a Studio list view's date sort reads Oldest → Newest (#28433)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuRPCAezXKfG3G9NsLcWNpYe)_
Part of #27520 (row 7, the Studio half of the date-sort label; the
console half landed in #28423)
Clause-②: no
Metadata-protocol: none
Skills-docs: none
## 维护者速读
- **改了什么**:Studio 列表视图属性面板把每个字段的 `type` 一并传给排序构建器,日期/日期时间字段的排序行显示「最早 →
最新」/「最新 → 最早」,不再是「A → Z」。
- **为什么改**:#28423 让 `SortBuilder` 按字段类型显示时间方向,console 列表已传 `type`;Studio
面板只传了 `{ value, label }`,同一个日期排序在 Studio 里仍写着 A → Z。
- **风险与回滚**:只改一行前端传参,不改保存内容、不加翻译键、不动 spec。回滚即 revert 本 PR。
-
**先看**:`ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx`
中 `<SortBuilder fields=…>`;新测试
`ObjectListViewInspector.dateSortLabel-27520.test.tsx`。
- **两分钟验证**:`pnpm --dir ui exec vitest run
packages/app-shell/src/views/studio-design/ObjectListViewInspector.dateSortLabel-27520.test.tsx`
→ 2 个用例全绿。
- **需要你做的**:无,席位落地。
## What changes
On `main` `5da3a8ce`, the Studio list-view panel handed `SortBuilder`
its fields as `{ value: f.name, label: f.label }`. `SortBuilder` picks
the time wording only from a field's `type`, so a sort on a `date` field
read "A → Z" in Studio while the console list read "Oldest → Newest".
The panel now passes `type: f.type` (the type `useObjectFields` already
returns). What is written to the view's `sort` is unchanged.
## Tests
- New: `ObjectListViewInspector.dateSortLabel-27520.test.tsx` mounts the
real `useObjectListViewDraft`, the real panel, the real
`useObjectFields` over a real `MetadataClient` and the real
`SortBuilder`. A `date` row reads "Oldest → Newest", a `datetime` row
"Newest → Oldest"; CONTROL: a text row still reads "A → Z".
- Red first on `main`'s source: the date case failed with `Received: A →
Z`; the control passed.
- Ablation via `scripts/ablation-replace.mjs` (`type: f.type` → `type:
undefined`): 1 failed / 1 passed, then restored, blob == HEAD and `git
diff HEAD` empty.
- `vitest run packages/app-shell/src/views/studio-design/`: 281 files,
1993 tests passed.
## Verification
Local readings at head `b7745efc` (merge of `origin/main` `4bc077d2`).
- `dispatch-gates --commands`: 34 derived, each run with its exit code
captured; all 34 exit 0. `--ran`: "34 derived, 34 run, 0 NOT-MEASURED, 0
UNRUN".
- `node scripts/check-sdui-manifest.mjs`: exit 0. `eslint` on the
changed source and the new test: exit 0.
- `pnpm --dir ui --filter @object-ui/app-shell run type-check`: exit 0.
- No open PR touches `ObjectListViewInspector.tsx` (REST scan of open
PRs' files).
- Branch name is the harness-assigned `claude/project-thread-t38h8d`,
named in the claim (6544990253).
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes on the changed files.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: n/a.
- [x] 7. No hand edits to generated references, changelogs or release
notes.
- [x] 8. Title, body and comments are in English (the maintainer summary
is in Chinese by the seat's standing order).
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgWQeuFyKF7Jtpi9YZs)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgWQeuFyKF7Jtpi9YZs
Co-authored-by: Claude <noreply@anthropic.com>1 parent 630b407 commit 5517005
3 files changed
Lines changed: 174 additions & 1 deletion
File tree
- .changeset
- ui/packages/app-shell/src/views/studio-design
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 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 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 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 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1487 | 1487 | | |
1488 | 1488 | | |
1489 | 1489 | | |
1490 | | - | |
| 1490 | + | |
| 1491 | + | |
1491 | 1492 | | |
1492 | 1493 | | |
1493 | 1494 | | |
| |||
0 commit comments