Skip to content

feat(app-shell): a Studio item header keeps the item name readable; chips, tools and labels give way first - #29765

Merged
objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/project-thread-dp2ngo
Nov 3, 2026
Merged

objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/project-thread-dp2ngo

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y

Requested by Steedos · project thread

Fixes #29693

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:Studio 条目标题行在窄栏(约 1024 px 窗口、右侧面板打开)不再把条目名挤没。标题至少保留前 12 个字符(名称更短则整名);先让芯片和五个条目工具收进 ⋯ 菜单,再让「自定义」、流程开关、设计/运行按钮只留图标;轨道上的定制标记改为单个图标。
  • 为什么改:实测 main 上 Interfaces 报表、对象切片和流程三个条目标题宽度为 0 px,⋯ 按钮落在右侧面板下面点不到;流程轨道选中的定制行只剩「已定制(ObjectStack Showcase)」。
  • 风险与回滚:只动 app-shell 前端展示,无元数据与接口变化;没传 foldMenu 的标题行行为不变。回滚即 revert 本 PR。
  • 先看:StudioItemHeader.tsx(折叠测量 useTitleRowFold 与菜单内容 StudioItemHeaderFoldedItems)、StudioItemTools.tsx(工具交出菜单形态)、StudioDesignSurface.tsx(三个标题行的 foldMenu)。
  • 两分钟验证:浏览器窗口 1024 px,打开 Studio 界面支柱里一个已定制且有草稿的报表(右侧属性面板打开):标题显示完整名称,⋯ 可点开,菜单顶部依次是芯片、层次/引用关系/历史/审计日志/源码。
  • 需要你做的:无,席位落地。

What changes

The item header's title row (StudioItemHeader) now keeps the item's name readable, measured on the header's own row, never the viewport:

  • The readable width is the width of the title's first twelve visible characters (a text range over the title, the reader-only kind suffix excluded), capped at the whole name.
  • Stage 1. When the room the row leaves the title is below that width, the identity chips (api-name chip and the pillar's chips: kind, override, pair) and the five item tools leave the row. They read at the top of the ⋯ menu: the chips as one menu entry whose choice keeps the menu open, then the tools as menu items with the same test ids as the buttons, opening the same sheets. StudioItemTools hands its menu form to the header through useStudioItemHeaderFold.
  • Stage 2. If the title is still short, labelled actions show their icon alone: the Customize button, the flow ledger switch and definition switch, and the Interfaces Design/Run buttons. The label stays in the DOM as the accessible name (STUDIO_FOLD_LABEL, a group-data variant of sr-only keyed on the actions slot's data-fold attribute). Customize keeps the first slot of the actions.
  • Last. Only then is the title cut, with its whole text in its tooltip as before (objectui#12897). The ⋯ trigger stays inside the row in every stage.
  • Giving back. Each stage records the room it freed and is undone only once the title would keep its readable width without that room, so a stage never undoes itself the moment it is taken.
  • Where folded things go is the pillar's call (foldMenu): 'pillar' for Interfaces and Automations, whose own ⋯ menus mount StudioItemHeaderFoldedItems; an object for the Data header (and for an Interfaces or flow item while its own menu is not drawn), where the header draws a ⋯ of its own while something is folded. A header without foldMenu (Access, the permission matrix) is unchanged.
  • Rail mark. RailCustomizationMark draws CustomizationMark with compact: the glyph alone (violet pencil-ruler for customized, emerald plus for added), the text as its accessible name and the first line of its tooltip. The All metadata lists keep the text mark.

Files beyond the claim's first surface (StudioCustomizeControls.tsx, FlowLedgerSwitch.tsx, StudioItemTools.tsx, FlowItemMoreMenu.tsx) are covered by the seat's amendment record 6593712299.

For the cards that build on this header

Tests

  • StudioItemHeader.titleRowFold-12897.test.tsx (shared stubbed-geometry harness), two new describes: stage 1 at 330 px, the menu's contents and a tool firing its action, following the row both ways, a 470 px CONTROL that stays folded, a 632 px CONTROL with nothing folded, and a CONTROL header without foldMenu; then the order: stage 1 alone at 560 px, stage 2 at 420 px, the title cut last at 300 px with the ⋯ still there, unfolding in reverse, icon-only Customize and ledger switch keeping their labels as accessible names and firing the same handlers, and the chips as one menu entry.
  • StudioDesignSurface.itemTools-28239.test.tsx: the real StudioItemTools folded into the header's ⋯; each of Layers, References, History, Audit and Source opens its sheet from the menu and reads the same door as its button.
  • StudioDesignSurface.oneSurface-28572.test.tsx: the Interfaces rail's customized and added marks are glyph-only with their text as accessible name and tooltip lead.
Readings
  • New and touched files: titleRowFold-12897 17/17, itemTools-28239 9/9, oneSurface-28572 13/13.
  • Ablation (fold hook made to return stage 0, through scripts/ablation-replace.mjs, restored to the HEAD blob): titleRowFold-12897 10 failed, 7 passed; the 7 are the five objectui#12897 cases and the two no-fold CONTROLs.
  • Every app-shell test file naming a touched module (git grep -l over StudioItemHeader, StudioItemTools, CustomizationMark, StudioRailCustomizations, FlowItemMoreMenu, FlowLedgerSwitch, StudioCustomizeControls, studio-tokens, StudioDesignSurface): 228 files, 1713 tests, all passed, in five locked batches at head 08039a0. The later commits are the changeset text, a test prop the type-check asked for, and the merge of main.
  • After merging main (head eaea6c6, 23 incoming commits, one touching StudioDesignSurface.tsx's Access banner, no overlap): app-shell type-check (src and tests) exit 0; check-sdui-manifest exit 0; the three pin files plus the two incoming Studio tests that touch StudioDesignSurface (accessPairCopy-29674, customizePublish-28562): 5 files, 49 tests passed. Merged main again right before opening (head 205c453, six incoming commits; one changes StudioDesignSurface.tsx's field-name helpers only): app-shell type-check exit 0, check-sdui-manifest exit 0, the three pin files 39/39.
  • pnpm --dir ui exec vitest run scripts/: 170 files passed, 2 skipped.
  • Derived gates (dispatch-gates --commands): 35 derived, 35 run, all exit 0; --ran reconciles 0 NOT-MEASURED.
  • eslint on the touched files: 0 errors.
  • Live E2E (studio-customize-journey.spec.ts, seat amendment record 6595035315): at the job's 1280 x 720 window with the Interfaces inspector open, the header folds its identity chips, so the published pair's override chip is looked for in the row, else in studio-item-header-folded-chips after opening if-item-more, and the menu is closed again. Run locally against the showcase backend (ui/e2e/live/ci/start-backend.sh, Console built with VITE_BASE_PATH=/ and served by vite preview): the spec at 205c453 fails at L137 exactly as CI job 125715096807 did (studio-override-chip not found); with the fix (b0949a5) 3 of 3 runs pass (19.3 s, 17.3 s, 17.8 s). Derived gates on b0949a5: 35 derived, 35 run, all exit 0; --ran 0 NOT-MEASURED; eslint on the spec 0.

Acceptance notes

  • At 1024 px with the right panel open the Data object header did not need to fold: "Account (Success Overlay)" shows 13 characters beside its tools, above the 12-character floor, so the tools stay in the row.
  • The Access set header has no foldMenu: it has no chips or tools to fold, and its name was whole before and after.

Verification

Live, on the showcase app (objectstack dev --seed-admin --fresh) with the Console on Vite, Chromium at 1024 x 768, zh-CN, right panel open. The report and the flow were customized, published, and edited again, so each header carries its kind chip, override chip, draft status, the five tools and ⋯. Before = this branch with the nine changed source files swapped back to origin/main; after = this branch.

Header Row Title before Title after ⋯ before ⋯ after
Interfaces report 工时按状态分布 436 px 0 of 125 px 125 px, whole x 875 to 907, under the panel, not hittable x 668 to 700, hittable
Interfaces slice 进行中的任务 436 px 0 of 107 px 107 px, whole x 790 to 822, not hittable x 668 to 700, hittable
Automations Project Budget Approval 436 px 0 of 207 px 145 px ("Project Budget…", 14 characters) x 863 to 895, not hittable x 668 to 700, hittable
Data Account (Success Overlay), field panel open 436 px 153 of 233 px 153 px, unchanged none none
Access 示例贡献者 736 px 89 px, whole 89 px, whole hittable hittable

Before, the three folding rows were wider than the row (scroll widths 643, 558 and 631 px for a 436 px row). After, the ⋯ menus list the folded chips entry, then Layers, References, History, Audit, Source, then the pillar's own items. The flow rail's selected customized row reads "Project Budget …" with the glyph mark. Screenshots and the raw readings are with the seat.


Generated by Claude Code

The title keeps its first twelve characters readable; on a narrower row the
identity chips and the item tools fold into the item's more menu (the
pillar's own, or one the header draws), so the menu trigger stays inside the
column. The pillar rails draw the customization mark as its glyph alone.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUYXmZ6DQBWc6piyyF
… actions icon-only

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUYXmZ6DQBWc6piyyF
@github-actions github-actions Bot added size/l 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 3, 2026
…r in the item's folded menu

At the live job's 1280 px window with the Interfaces inspector open, the
item header folds its identity chips into the item's more menu so the
item's name stays readable, so the published pair's override chip is
looked for in the row first, then in the menu's chips entry, and the
menu is closed again before the next step.

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

Copy link
Copy Markdown
Contributor Author

domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y

席位核对 · ACCEPT · 2026-11-03T04:59Z

Head-sha: b0949a59bc7b56cc882f27bab77137b081cb7403

  • Shape: draft → main, Fixes #29693 in the body only. 14 files, +842 / −46 (888 lines ≤ 3000). No governed path (check-governed-merges --pr 29765 on the final file list: 0 of 14 hit the register). Clause-②: no and Metadata-protocol: none are line-initial in the body and the changeset, so no review face applies and no contract review is owed.
  • Premise, measured: it holds. On main before this change, the report title was 0 px, the slice 0 px and the flow 0 px at about 1024 px with the right panel open, and ⋯ sat at x 863–907, under the panel (before-*.png, readings.jsonl).
  • File surface: as claimed and amended once. 6593712299 adds StudioCustomizeControls.tsx, FlowLedgerSwitch.tsx, StudioItemTools.tsx and FlowItemMoreMenu.tsx. CustomizationMark.tsx and studio-tokens.ts sit within the claim's "rails' customization mark" and header surfaces. Studio: a Chinese name yields no identifier at any create door; derive one by pinyin, by one rule everywhere #29690's addedFieldName and addedExtensionFieldName came in from main and are untouched.
  • Read in the diff:
    • StudioItemHeader takes a foldMenu prop. The title keeps its first 12 characters, or the whole name when shorter, with the full name as its tooltip.
    • The row folds in two stages before the title gives way:
      1. The identity chips go into the menu as one entry, studio-item-header-folded-chips, which keeps the menu open when chosen. The five item tools go in as menu items with the same test ids, opening the same sheets.
      2. Customize, the flow switches and Design/Run go icon-only, with each label kept as its accessible name.
    • Customize keeps its first slot. A header without foldMenu is unchanged. The rail mark is drawn as its glyph alone, with its text as the accessible name and tooltip.
  • Measured (screenshots under /mnt/project-files/issue-29693/shots/, readings in readings.jsonl):
    • At 1024 px with the right panel open, the title widths go from 0 to 125 px (report), 0 to 107 px (slice) and 0 to 145 px (flow).
    • The ⋯ trigger moves from under the panel to x 668–700 and can be clicked.
    • Every pillar has before and after shots. The seat read the flow before and after (the name Project Budget… replaces a row of chips and a cut switch) and the report's open menu (the chips entry with the override chip at the top, then the five tools and Restore package original).
  • Serial notes in the body (the slot itself is added by Studio: name where a customization is saved on the surface that made it, and stop listing the .custom pair as its own landing card #29691 PR 2, agreed with seat 1):
  • Live E2E fix: under amendment 6595035315, studio-customize-journey.spec.ts L137 looks for the override chip in the row, else inside studio-item-header-folded-chips (the 1280×720 job window folds the chips). It failed at 205c4531 locally as in CI job 125715096807, and passed 3 of 3 runs with the fix (b0949a59). Nothing else in the spec changed.
  • Tests: 228 files / 1,713 tests green. Ablating the fold turns 10 red. 35 of 35 derived gates exit 0.
  • Out of scope: the report lists none (out_of_scope_findings: []). The PR's two Acceptance notes are measured non-findings, not defects: the Data header did not need to fold (13 characters), and the Access header has nothing to fold. Skills-docs: is not owed (Metadata-protocol: none, no narrowing arm).
  • Gates (check-runs on this head): 46 success, 13 skipped (opt-in, path-filtered or matrix placeholders), 0 failed or pending, including Live E2E UI (job 125732746978) and all 16 Test UI shards. All ten required contexts succeeded.
  • Landing: ordinary queue landing, pr_ready then automerge_enable. Fixes #29693 closes the card on merge.

Generated by Claude Code

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/l tests 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: an item header keeps the item name readable; chips and tools collapse first

1 participant