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
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