Repository navigation
Commit d139c7a
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8CSSa72mrtYoeegnZzNftqp)_
Fixes #36745
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 在 Studio 自动化里打开一个流程,标题旁那排「触发 · 状态 · 运行身份 · 版本 ·
出错时」在右侧属性面板打开、位置变窄时,不再整排挤成一个字一个省略号;放不下的从后往前整项收起,鼠标悬停这一排能看到收起的内容。
- 来自你 11-23 的 Studio 评审(第 r07 项),属于界面体验缺陷修复。
- 出错的话最多是这一排显示的项目多一个或少一个,不影响流程本身和任何数据,可直接撤回。
- 无。
## What changes
`FlowMetaPills`' header variant laid its items on a one-row grid whose
columns could all shrink to zero (objectui#13135), so a short meta slot
(about 80 px with the property panel open) shrank every item at once, to
one character each.
-
`ui/packages/app-shell/src/views/metadata-admin/previews/FlowPreview.tsx`
- New `FlowMetaHeaderRow`: every item is laid out whole (`shrink-0`,
`whitespace-nowrap`), each after its `·` separator, in a row that takes
the slot's width and clips. After each render and on resize
(`ResizeObserver` on the row) it measures each item's width and the
row's, keeps the first N whole items, and makes the rest `invisible` +
`aria-hidden` (still laid out, so still measured: they come back when
the row widens). The row's `title` names each hidden item's whole
`Label: value`, one per line, in row order; with nothing hidden there is
no `title`.
- New `fitFlowMetaItems(widths, available, floor = 2)`: as many whole
items from the front as fit (half-pixel slack). Fewer than the floor
(Trigger + Status) ⇒ 0: the row shows nothing.
- Drop order is the row order from the end: On error, then version, then
Run as. Trigger and Status are the floor.
- The header `Pill` no longer truncates (`min-w-0 truncate` →
`whitespace-nowrap`), and the per-pill cut measurement (`useCutText`,
objectui#13135) is removed: nothing in the header can be cut any more. A
shown pill keeps its own hover text (Status: the run status's reason;
Trigger: the object's API name).
- The designer's info bar (`variant="bar"`) is unchanged.
-
`ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx`:
the `auto-flow-meta` wrapper goes `inline-flex` → `flex` (plus a comment
line), so the row reads the meta slot's whole width rather than its own
content width.
- Tests: `FlowPreview.headerMetaTruncate-13135.test.tsx` is deleted (it
pinned the `truncate` class this card replaces);
`FlowPreview.headerMetaGiveWay-36745.test.tsx` is added.
- Changeset: `@object-ui/app-shell` patch. `fitFlowMetaItems` is a
module export, not on the package index.
Reading taken on the card: "Keep Status and Trigger whole … hide the
slot when not even one item fits". The card names On error, version and
Run as as the items that drop, so Trigger + Status are read as the
floor: when those two do not both fit whole, the row hides. (The other
reading, dropping Status and then Trigger one by one, would drop an item
the card says stays.)
## Tests
- `FlowPreview.headerMetaGiveWay-36745.test.tsx`, 11 tests, widths
stubbed per element (each item 120/110/80/30/60 px):
- 400 px: all five shown, no row title;
- 320 px: version and On error hidden, title = `v3` + `On error: …`;
- 240 px: Run as hidden too, Trigger and Status stay;
- 200 px (below the floor): every item hidden and `aria-hidden`, title
names all five;
- re-render wider: items come back; no header item carries `truncate`;
- CONTROLS: a shown Status keeps its run-status hover text; the `bar`
variant has no give-way row;
- `fitFlowMetaItems` at the boundaries (399/400, 229/230) and fractional
widths.
- Ablation (`fitFlowMetaItems` returning every item regardless of
width): 6 of 11 red; restored, `git diff HEAD` empty.
- The test file imports `@objectstack/lint` at module top
(`check:test-source-alias`: the source under test reaches its dynamic
import; the load is paid at collection, not inside a clocked case).
- Also run: `AutomationsPillar.tabs-12454.test.tsx`,
`StudioItemHeader.statusPlace-12524.test.tsx` (they read
`auto-flow-meta`): 20/20 with the new file. `pnpm --filter
@object-ui/app-shell type-check`: exit 0.
## Acceptance notes
Browser run on the showcase app (Studio › Automations › "Notify on Task
Completed", zh-CN, 1440×900 unless named; its meta has four items, no On
error). Shots are attached on the project thread (GitHub image upload is
browser-only). Readings are the row's own `data-shown`, item widths and
`title`:
| Frame | Slot width | Items shown | Row hover text |
|---|---|---|---|
| Property panel open (the r07 case) | 81 px | none (Trigger 123 +
Status 82 = 205 px do not fit) | 触发 / 状态 / 运行身份 / v1, one per line |
| Panel closed | 441 px | all four, whole | none |
| Panel closed, 1300 px viewport | 301 px | Trigger, Status, Run as |
`v1` |
| Panel closed, 1220 px viewport | 221 px | Trigger, Status | 运行身份: 用户 /
v1 |
| Panel closed, 1150 px viewport | 151 px | none | all four |
No frame shows a cut or single-character item. Native `title` tooltips
do not render headless, so the hover text is evidenced by the attribute.
## Verification
- Two-minute check: in Studio › Automations, open a flow with the
property panel closed (wide header: every item shows whole), then open
the property panel: the row keeps Trigger and Status whole or hides,
never single characters; hover the row to read what was dropped.
<details><summary>Local gates</summary>
- `node scripts/pm/dispatch-gates.mjs --commands`: 38 derived families,
all run; 37 exit 0 at `9f6fc4fa`. `check:test-source-alias` exited 1
there (the module-top lint import above), fixed and re-run at
`d37f9470`: exit 0. `--ran` reconciliation: `38 run, 0 NOT-MEASURED (a
DERIVED zero — all 38 recorded an exit code and none of them is 3)`.
Results: project file `issue-36745/gate-results-d37f9470.tsv`.
- `node scripts/pm/overlap-check.mjs` at `d37f9470`: `VERDICT clean exit
0` against `origin/main`, #36774 and #36784 (both share
`StudioDesignSurface.tsx`, merge cleanly).
- Every other family is CI's: read from this PR's check-runs, not re-run
locally.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbXxhLfnaEFoHNkAeGh)_
<!-- signed: repo:objectstack#1 · os-warren ·
session_01JQwxbXxhLfnaEFoHNkAeGh -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 368deee commit d139c7a
5 files changed
Lines changed: 294 additions & 177 deletions
File tree
- .changeset
- ui/packages/app-shell/src/views
- metadata-admin/previews
- studio-design
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 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 | + | |
0 commit comments