Repository navigation
Commit 2ab7601
fix(console): the bare data page opens a record by the list's one rule (#36283)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X6okWxYPWAsooBsJoAhnT1u)_
Fixes #35875
repo:objectstack#4 · os-project-manager ·
session_01FEkQ5oK4fFfnLADcipbEeT
Clause-②: no
Metadata-protocol: none
## 维护者速读
-
控制台的裸数据页上,点记录名称改为进整页;鼠标移到一行时名称旁出现「在侧边打开」小图标,点它才从右侧打开抽屉;从整页点关闭回到原来带条件的数据页。
- 属于「记录详情页重做」专题,让数据页跟上对象列表已定的打开规则,两处入口不再不一样。
- 用数据页看记录的人会碰到;出错时最多是点名称打不开或回不到原页,改动可以整体撤回。
- 无。
## What changes
The bare data page (`ObjectDataPage`, the app's object `data` route) now
opens a record by the list's one rule, the one the object list
(`ObjectView`) follows since the parent card's ruling:
- **The record's name opens the full page** (`.../record/ID`). A card
(kanban, gallery, calendar) and a touch tap on a row open the full page
too; a ⌘/Ctrl or middle click still opens it in a new tab.
- **The name cell's 「Open in side panel」 icon opens the side drawer**
over the list, through `?recordId=`, exactly as before for the drawer
itself. It is the same `OpenInSidePanelButton` the object list draws
(hover/focus revealed, no icon on a coarse pointer), handed to the grid
on the same host channel (`recordLinkAdornment`). A phone
(`usePhoneViewport`) draws no icon, as on the object list.
- **On a phone the page is pushed over the data page**: the name's
navigation state carries `RECORD_PAGE_PUSHED_STATE`, exactly as the
object list's open path adds it on a phone, so the page's 「‹」 goes back
in the history to the data page's entry (its scroll kept, no duplicate
list entry) instead of navigating forward to it.
- **The full page carries the data page as its origin**: the
history-state `from` holds the data page's URL with its conditions
(`filter[...]`, `uf_*`, the source trail), its name (the object's plural
label, the page's own title), the rows it shows and the count it
matched. So the page's top bar counts the record among those rows, its ↑
↓ step through them, and its ✕ returns to the data page with its
conditions.
- **A click on any other cell still opens nothing**: it selects the cell
(the grid's select-first model, unchanged).
- A list-only object's rows still open nothing, and draw no icon. A
`?recordId=` link still opens the drawer.
One builder for the origin, so the two entries cannot drift:
`listOriginOf` (in `objectViewRecordNavigation.ts`) is now what both the
object list's open path and the data page call. The object list's call
is a move of the inline code it replaces, byte-for-byte in what it
produces; `ObjectView`'s behaviour is unchanged (its open-path suites
are in the run below).
Not here: the data page's drawer has no ⤢ 「Open as full page」 (it had
none before either); see Acceptance notes.
## Tests
Added
`ui/packages/app-shell/src/views/ObjectDataPage.openRule-35875.test.tsx`,
driving the real `ObjectDataPage`, `ListView` grid and
`MePermissionsProvider`, with the record route reading the origin
through `useRecordPageReturn` (the hook the page's top bar uses):
- the name opens the full page, whose `from` is the data page's URL with
its condition, its name, its rows and its matched count, and whose
position reads 1 of the matched count;
- the hover icon opens the drawer (`?recordId=`), the list stays;
- a click on another cell opens nothing;
- the page's ✕ returns to the data page with its condition;
- a list-only object draws no icon and its name opens no page;
- on a phone viewport (390 px) the name's navigation state carries the
pushed-page marker; the desktop case asserts it does not.
Migrated: `ObjectView.listOnlyRecordPage-33219.test.tsx`, the data
page's CONTROL case: a touch tap on a cell now opens the record page (it
pinned the drawer, the behaviour this card replaces).
<details><summary>Local runs (final head 3ebee8d; round 1 at fb547c3
below)</summary>
Round 2, head `3ebee8d07` (the phone marker and its pin):
- vitest: the new file, `ObjectView.listOnlyRecordPage-33219`,
`ObjectView.rowOpensNothing-33317`,
`objectViewRecordNavigation.phonePush-29074`: `Test Files 4 passed (4)`,
`Tests 42 passed (42)` (lock VERDICT command-exit 0).
- `pnpm --filter @object-ui/app-shell run type-check`: exit 0.
- Ablation E, the marker dropped: 1 red, the phone case (`Expected:
"true"`, `Received: "false"`); restored to the HEAD blob, `git diff
HEAD` empty.
- `overlap-check` against origin/main 4ab1218: `VERDICT clean`. Gate
re-derivation: the same 38 families; results in the round-2 report on
the card.
Round 1, head `fb547c34b`:
- vitest, final head `fb547c34b`: the new file, the migrated
`ObjectView.listOnlyRecordPage-33219`, `ObjectView.recordOpenPath-35854`
and `ObjectView.rowOpensNothing-33317`: `Test Files 4 passed (4)`,
`Tests 38 passed (38)` (lock VERDICT command-exit 0).
- vitest, head `96bb0fc0c` (the final head differs by one module-top
import in the new test file): every `ObjectDataPage.*`, `ObjectView.*`
and `objectViewRecordNavigation*` test, `recordDrawerStack-26679` and
the console's `recordOpenFromEveryView-27057`: `Test Files 113 passed
(113)`, `Tests 1015 passed (1015)`.
- `pnpm --filter @object-ui/app-shell run type-check` (both `tsc`
programs, the test program included), head `96bb0fc0c`: exit 0.
- Ablations, each through `scripts/ablation-replace.mjs` with the source
restored to the HEAD blob after (subject is `src`, imported relatively,
so no build leg):
- A, the name opens the drawer again (the old behaviour): 2 red, the
page case and the ✕ case. (A first attempt was a no-op the tool refused:
the replacement contained the anchor; re-run with a disjoint anchor.)
- B, `recordLinkAdornment` not handed to the list: 1 red, the icon case.
- C, the origin drops the data page's conditions: 2 red, the page case
(`from.pathname`) and the ✕ case.
- D, the icon drawn for a list-only object: 1 red, the list-only case.
- The 「a click on another cell opens nothing」 case pins the grid's
select-first model, which this diff does not change: not ablated.
- `dispatch-gates --ran`: 38 derived, 37 run, 1 UNRUN. Exit 0 except:
`check:test-source-alias` red on `96bb0fc0c` (the new file lacked the
module-top `@objectstack/lint` import), fixed in `fb547c34b`, then exit
0; `check:type-check-debt` exit 3, a prerequisite (it needs a full
build), NOT MEASURED here; `pnpm --dir ui exec vitest run scripts/`
UNRUN (did not finish within the foreground limit on a shared box;
declared narrowing, Test UI carries it). After the last commit, re-run
on `fb547c34b`: `check:undeclared-dep-imports`,
`check:cross-package-test-inputs`, `check:nul-bytes`,
`check:tier-file-adoption`, `check:test-source-alias`: exit 0.
- `overlap-check`: `VERDICT clean`, origin/main merges cleanly.
</details>
## Acceptance notes
- Read first, by risk:
`ui/packages/app-shell/src/views/ObjectDataPage.tsx`
(`handleRecordClick`, `recordLinkAdornment`),
`ui/packages/app-shell/src/views/objectViewRecordNavigation.ts`
(`listOriginOf` and its one caller in `handleNavOverlayNavigate`).
- Two-minute check: open any object's data page in the Console
(`/apps/APP/OBJECT/data?filter[FIELD]=VALUE`), click a record's name:
the full page opens and its top bar names the object's list; click ✕:
back on the data page with the condition chip. Hover a row and click the
small panel icon after the name: the drawer opens over the list.
- The data page's drawer draws no ⤢ 「Open as full page」, before and
after this change (the object list's drawer has one). Carried by #36300.
- The data page keeps no page number in its address (the object list
does), so a record opened from page 3 and closed with ✕ returns to the
data page's first page, while the page's ↑ ↓ still step through page 3's
rows. New with this change (the drawer used to open over the list and
keep its page). Read from code, not measured on a running page. Carried
by #36299.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01FEkQ5oK4fFfnLADcipbEeT
<!-- signed: repo:objectstack#4 · os-project-manager ·
session_01FEkQ5oK4fFfnLADcipbEeT -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 852270a commit 2ab7601
5 files changed
Lines changed: 469 additions & 33 deletions
File tree
- .changeset
- ui/packages/app-shell/src/views
| 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 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
0 commit comments