Skip to content

fix(studio): 流程页头信息条按顺序逐个让位,不再整排缩成单字 (#36745) - #36781

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-xd0g5m
Nov 23, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-xd0g5m

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

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.
Local gates

Generated by Claude Code

The Studio flow header's meta row (Trigger, Status, Run as, version,
On error) shrank every item at once, to one character each, when the
row was short of room (property panel open). Items now keep their whole
text and drop from the end; the row's hover text names the dropped
items; Trigger + Status are the floor, below which the row hides.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXxhLfnaEFoHNkAeGh
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 23, 2026
check:test-source-alias: the source under test reaches a dynamic
import of @objectstack/lint; a module-top side-effect import pays that
load during collection, outside any clocked case.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbXxhLfnaEFoHNkAeGh
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

维护者速读

Studio 流程页头的信息条,空间不够时不再整排缩成单字:「触发」和「状态」始终完整,放不下时从后往前依次收起「出错时」「版本」「运行身份」,收起的内容鼠标悬停可见;连前两项都放不下时整条隐藏。
要你做的:无(普通改动,席位自动合并)。

席位核对 — ACCEPT (L1) · repo:objectstack#1 · head d37f9470 · 2026-11-23T22:45Z

  • Shape: Fixes #36745. ui/packages/app-shell/src/views/metadata-admin/previews/FlowPreview.tsx (header variant of FlowMetaPills, a new FlowMetaHeaderRow and fitFlowMetaItems), one class in studio-design/StudioDesignSurface.tsx (the meta wrapper becomes flex so the row reads the slot width), the superseded FlowPreview.headerMetaTruncate-13135.test.tsx removed, a new FlowPreview.headerMetaGiveWay-36745.test.tsx, a patch changeset. Clause-②: no (FlowPreview is not re-exported from the package index). Metadata-protocol: none.
  • Read: items keep their whole text and drop from the end (On error, version, Run as); Trigger and Status are the floor, below which the row shows nothing; dropped items are named one per line in the row's hover text and stay laid out (invisible) so they are measured and return when the row widens. The panel layout (non-header) is unchanged.
  • Reading on the card's open point: the floor is two items (the slot hides when Trigger and Status do not both fit whole), the thread's reading of "when not even one fits", recorded in the PR body.
  • Tests: 11 new cases plus 9 neighbours; the thread's reverse run turns 6 of 11 red. Browser readings on the showcase at 441, 301, 221 and 81 px are in the PR body.
  • Gates: 39 success, 15 expected skip, 0 failed on d37f9470; mergeable_state clean.
  • Landing: the seat readies the PR and arms auto-merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 23, 2026 22:46
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit d139c7a Nov 23, 2026
57 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-xd0g5m branch November 23, 2026 23:06
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…k default view id (objectstack-ai#36787)

<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8UNMg9RsSwRntqJjhmPv5uR)_

Fixes objectstack-ai#36750

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户无感:在 Studio 打开一个还没有默认列表视图的对象时,浏览器不再记一条服务器 404 报错;面板显示和保存都不变。
- 属于 Studio 评审 9 张卡中的一张(列表视图的多余请求),替开发者清掉控制台里的假报错。
- 出错时最坏是面板对一个真实存在的默认视图显示「尚未创建」;只在元数据已加载完成时才跳过请求,可直接撤回这个 PR。
- 无。

## What changes

With no view of an object flagged default, the Studio list-view buffer
edits the fallback id `OBJECT.default` (`listViewTargetOf`). Nothing is
published under it until the panel's first edit creates it, yet the
buffer read its published layer on every open and the server answered
404 (the client maps that to an empty envelope, but the browser logs the
failed request). The draft-only guard (objectui#12508) no longer covers
this since a new object is published at once.

- `ObjectListViewInspector.tsx`: new `isFallbackListView(target, views)`
and a `targetIsFallback` field on the hook's result. The target is the
fallback when it is the default target and no key of the object's merged
`listViews` (every served view item, by qualified name, via
`mergeViewsIntoObjects`) nor of the package's drafted list views
resolves to its id. The layered read is skipped for it when there is no
draft. It is read only off an answer that can say so: the package's view
drafts have answered AND `getTypeStatus('object') === 'ready'` (the
registry composed with the `/meta/view` list). While loading, refetching
after a publish, or under a context that reports no status, the layer is
read as before. The flag is a load-effect dependency, so a view that
appears once metadata lands is re-read.
- `StudioCustomizeControls.tsx` + `StudioDesignSurface.tsx`: the other
caller of the layered read for the same id, the Customize
served-override read on a read-only base. `useServedOverride` takes
`item.unpublished`; it still reads the pair's draft first, then answers
`{ declaration: null, state: null, shipped: 'none' }` without the
layered read, exactly what the 404 envelope produced.
- Other layered-read callers checked: `authoredDraft.ts` runs only on a
served draft; `ViewConfigPanel` and the runtime use real tab ids (the
runtime fallback tab is `all`, not this id).

## Tests

- New `ObjectListViewInspector.fallbackNoLayers-36750.test.tsx` (real
hook over a real `MetadataClient`, in-memory server): fallback id sends
no `/layers` and reads "not created yet"; CONTROLS: a flagged published
default still reads its layer; a view held under bare `default`
unflagged still reads it; while objects are `loading` the layer is read,
then not again once `ready`; a context without `getTypeStatus` reads as
before; `useServedOverride` with `unpublished` skips the layered read
after the pair draft read, and without it still reads.
- `ObjectListViewInspector.layersUnsaved-11799.test.tsx`: docblock
updated to say its 404 case holds because its context reports no status.
- Both suites import `@objectstack/lint` at module top
(`check:test-source-alias`).

## Acceptance notes

- Ablation (committed fix first, `scripts/ablation-replace.mjs`,
restored to HEAD blob each time): dropping `(!draft &&
targetIsFallback)` from the layered-read guard turns 2 of 7 new cases
red; deleting the `unpublished` early return turns 1 red.
- Existing fixtures across the list-view suites serve a published
`OBJECT.default` their object definition does not list. They use
hand-rolled contexts without `getTypeStatus`, so they keep the old read;
none was edited.
- Not checked: whether the runtime ViewConfigPanel on the `all` fallback
tab issues its own `/layers` 404 (different id, runtime surface).

## Verification

<details><summary>Local runs on 31dfa88 (fix on e4a8007)</summary>

- `vitest run` ObjectListViewInspector*, StudioDesignSurface.listView*,
InterfacesPillar* : Test Files 38 passed (38), Tests 222 passed (222)
(verify-lock VERDICT command-exit 0).
- Two touched suites after the lint import: Test Files 2 passed, Tests
11 passed.
- `pnpm --filter @object-ui/app-shell run type-check`: VERDICT
command-exit 0.
- `dispatch-gates.mjs --commands` derived 38 commands: all exit 0
(`check:test-source-alias` first failed on the two touched suites,
fixed, re-run exit 0).
- `overlap-check.mjs`: VERDICT clean (origin/main, objectstack-ai#36774, objectstack-ai#36781,
objectstack-ai#36784).

</details>

Two-minute check: open Studio, Interfaces, pick an object that has no
list view flagged default; the Network tab shows no `GET
…/meta/view/OBJECT.default/layers`, and the panel shows the default view
to create as before.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbWBvGf6TP6P9XT1tuo)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Studio 流程页头信息条:空间不够时整排缩成单字,改成按顺序逐个让位

2 participants