Skip to content

fix(ui): bound the disabled-reason tooltip width on declared actions and quick actions - #30161

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-29954-disabled-reason-tooltip-width
Nov 5, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-29954-disabled-reason-tooltip-width

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

domain:ui#2 · os-justin · session_01QSeKYnE9YNkSZen7sijLA3

Fixes #29954

维护者速读

  • 改了什么:记录页操作栏、record:quick_actions 以及 action:* 渲染器(按钮/图标/分组/菜单)里置灰操作的「不可用原因」提示框加了最大宽度,长原因会换行。
  • 为什么改:手机宽度(390px)下提示框被渲染成约 727px 一行,右侧被截断,作者写的原因读不全。
  • 风险与回滚:三处各只加一个 Tailwind 类 max-w-xs,与首页同类提示框一致;回滚即删该类。
  • 先看:ui/packages/app-shell/src/views/DeclaredActionsBar.tsx 的 TooltipContent 一行;其次 plugin-detail 的 record-quick-actions.tsx 与 components 的 renderers/action/disabled-reason.tsx 同形各一行。
  • 两分钟验证:在 ui 根目录跑 pnpm exec vitest run packages/app-shell/src/views/tests/DeclaredActionsBar.disabledReason-26619.test.tsx packages/plugin-detail/src/renderers/tests/record-quick-actions.disabledReason-26619.test.tsx packages/components/src/renderers/action/tests/action-disabled-reason-26619.test.tsx,预期全绿。
  • 需要你做的:无,席位落地。

What changes

  • DeclaredActionsBar.tsx: the disabled-reason TooltipContent gets className="max-w-xs".
  • record-quick-actions.tsx: the same-shape record:quick_actions disabled tooltip has the identical gap and gets the identical class.
  • Changeset .changeset/29954-disabled-reason-tooltip-width.md (@object-ui/app-shell, @object-ui/plugin-detail, patch).

Local class instead of the shared TooltipContent primitive: the primitive sits in ui/packages/components and every tooltip in the console inherits it, so a default cap there changes tooltips this card never looked at. The home page already bounds its tooltip locally, so this follows that precedent.

Tests

One new case in each of the three existing disabledReason-26619 test file: hover the greyed action, then assert the tooltip's painted box (the ancestor of Radix's visually-hidden role=tooltip node) carries max-w-xs. Ablation (fix committed first, class removed, test files run): app-shell and plugin-detail 2 failed, 8 passed; components (disabled-reason.tsx) 3 failed, 24 passed (the three button sites). Each restored with git checkout HEAD, git diff HEAD empty. Restored: app-shell + plugin-detail 10 of 10, components 27 of 27.

Acceptance notes

Read: ui/packages/app-shell/src/console/home/HomePage.tsx (the card says HomePage.tsx; the file is under console/home/, line with <TooltipContent className="max-w-xs">{disabledReason}</TooltipContent>, so the PM's unconfirmed max-w-xs assumption holds), DeclaredActionsBar.tsx, ui/packages/plugin-detail/src/renderers/record-quick-actions.tsx, ui/packages/components/src/ui/tooltip.tsx (no width default), ui/packages/components/src/renderers/action/disabled-reason.tsx.

disabled-reason.tsx was first reported as a follow-up and folded into this PR on the coordinator's rework order (file surface widened by that file and its test).

Verification

Dispatch-derived gates: 35 families, 34 run exit 0 each (including node scripts/check-sdui-manifest.mjs), plus pnpm --dir ui exec vitest run scripts/ (170 files passed, 2 skipped). --ran reconciliation: 35 derived, 35 run. Type-check of the three packages: NOT MEASURED locally (the ui dependency closure is not built here; tsc reports TS2307 on workspace imports), left to the Type Check UI check-run.


Generated by Claude Code

…and quick actions

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnE9YNkSZen7sijLA3
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnE9YNkSZen7sijLA3
@github-actions github-actions Bot added size/s 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 4, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#2 · os-justin · session_01QSeKYnE9YNkSZen7sijLA3

维护者速读

  • 改了什么:置灰操作的「不可用原因」提示框加最大宽度(max-w-xs),共三处:记录页操作栏、record:quick_actions、action:* 渲染器。
  • 为什么改:手机宽度下长原因单行溢出屏幕右侧被截断(hotclm 在 18.3 上实测)。
  • 风险与回滚:每处一个 Tailwind 类,与首页同类提示框一致;回滚删类即可。
  • 先看:DeclaredActionsBar.tsx、record-quick-actions.tsx、components/.../disabled-reason.tsx 各一行。
  • 两分钟验证:三个 disabledReason-26619 测试文件,删掉类即转红(dev 已做消融)。
  • 需要你做的:无,席位落地(非受管面,51 行)。

席位意见:ACCEPT。三处同一缺陷同一修法,第三处为第 1 轮返工并入,未另开卡。

席位核对

  • Verdict: ACCEPT · Head-sha: e41976860bbbeedc7a01e7a3aef07ba46949679a · 2026-11-04T18:38Z
  • 形态:draft → main,正文首个非空行后 Fixes #29954,全文无其他闭合关键词。
  • 前提实测:席位在 origin/main 55337f4c 读到 DeclaredActionsBar.tsx 的 <TooltipContent>{disabledReason}</TooltipContent> 无宽度类;第三处 components/src/renderers/action/disabled-reason.tsx:140 同形,席位亲核。
  • 门禁 check-runs(钉上述 head):46 success · 13 skipped · 0 failure;Lint & Repo Gates、TypeScript Type Check、Type Check UI、Test UI 均 success;check-expected-skips --pr 30161 OK(13/13 在 main 名单内)。check-governed-merges --pr 30161:NOT governed,51 行。
  • 接受的偏差:本地 type-check NOT MEASURED(闭包未建),由 CI Type Check UI success 覆盖;文件面扩到 components 一文件,为席位第 1 轮返工令所授。
  • 范围外去向:dev 首轮的 class a 发现(第三处)已并入本 PR;无其他。Skills-docs: 不适用(Metadata-protocol: none)。
  • 落地条款:非受管、≤3000 行 ⇒ 席位经中继 pr_ready + automerge_enable 落地。

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/s 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.

A disabled action's disabledReason tooltip has no max width: on a phone-width viewport the reason runs off-screen

1 participant