Skip to content

Delete confirm dialog: a record title with a long unbroken token stretches the dialog past the viewport, and Cancel / Delete end up off-screen #37761

Description

@objectstack-fleet

repo:hotcrm#2 · sunhaolin · session_local1adc6fb3954245ba8940a3719cdaea98

Filing gate: ① product defect with a reproduction and a named location. Source: fleet (found in a maintainer-ordered local UI test pass of the HotCRM app, 2026-11-27; filed through the pm-dispatch relay on the maintainer's instruction).
Grading: area:ux · Bug · p3 (triage grades) · severity: Impeded, with a keyboard way out · reach: records whose title holds a token wider than the dialog (a pasted URL, a file name, a hash, an imported value with no spaces) · evidence: measured on the released 18.6.0 packages, zh-CN console, 1440 px wide viewport, with an extreme value; the classes were read on main on 2026-11-27 and are unchanged

维护者速读

  • 做什么:删除确认弹窗的标题要能在长串(无空格的网址、文件名、编号)中间换行,弹窗宽度不能被标题撑开。
  • 谁受益:记录名里带长网址或长编号的用户,以及导入了无空格长文本的组织。
  • 不做会怎样:弹窗被撑到屏幕外,「取消」「删除」两个按钮跑到看不见的地方,鼠标点不到,只能用键盘。
  • 需要你做的:无,分诊定级即可。

What

The record delete confirm puts the record title into the dialog title (「删除线索“{title}”?」). The alert dialog is a CSS grid with w-full max-w-lg, and the title has no wrapping rule for an unbroken token, so the token's width becomes the grid track's minimum width. The dialog grows to the width of the token, and the footer, which is right-aligned inside that track, moves with it.

Measured with a lead whose name is a single 5,000-character token (the lead form accepted it), viewport 1440 px:

what value
title element h2.text-lg.font-semibold, computed overflow-wrap: normal, word-break: normal
title scroll width 49,437 px
dialog client width / scroll width 510 px / 49,461 px, overflow-x: visible
Cancel button x position 49,797 px
Delete button x position 49,867 px

Both buttons are far outside the viewport and cannot be reached with the mouse; the page does not scroll to them. Tab then Enter still reaches Delete, and Escape closes the dialog, so a keyboard user is not stuck.

The same mechanism applies to any token wider than the dialog's content box, which is about 460 px, near 45 Latin characters at this font size: the buttons shift right by the excess. Only the extreme value was measured; a value of URL length was not.

Where

ui/packages/components/src/ui/alert-dialog.tsx on main: the content is grid w-full max-w-lg … p-6 (line 49) and AlertDialogTitle is text-lg font-semibold (line 93), AlertDialogDescription is text-sm text-muted-foreground (line 105). None of them sets break-words or min-w-0. Every caller that interpolates user text into an alert dialog title or description inherits this, the record delete confirm being the one measured.

Reproduction

  1. Create a record whose title field holds one long token with no spaces or hyphens (for a visible effect at 1440 px, 200 characters or more).
  2. Open the record, More actions → Delete.
  3. Result: the dialog extends past the right edge of the viewport and its buttons are not visible.

Acceptance

  • A title or description of any length keeps the alert dialog within max-w-lg and inside the viewport; a long token wraps or is truncated with the full text still available.
  • Cancel and the confirm button stay visible and clickable.
  • Fixed in the shared component, so every alert dialog is covered, with a test or story for a long unbroken title.

Dedupe (open and closed): confirm dialog 12 hits, nearest #27823 and #26580 (closed, the confirm's wording and title), neither about layout; long title overflow 0 hits; unbroken and break-words no related hit (nearest #34609, closed, the AI assistant panel clipping a table).
Batch-of: cleanup of the local UI deep test pass 2026-11-26/27, 2 cards (both in objectstack), after the 14 cards of the pass itself.
Blocked-by: none.

Activity

  1. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ux · domain:ui · Bug · priority:p2 · pm:queue · size XS; rationale: a record title with a long unbroken token stretches the delete-confirm dialog past the viewport. User-facing, so the UX no-p3 rule applies: p2 (filed p3).

  2. added
    domain:ui
    pm:queue
    priority:p2
    and removed on Nov 27, 2026
  3. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgUuauSMJu1nVSQRQri

    Claim: PM loop · 2026-11-27T04:4xZ
    Session: session_01L6bhgV6i8jfWwSXjpWJrjA
    Thread session: session_01L6bhgUuauSMJu1nVSQRQri
    Account: os-sales
    Branch: claude/project-thread-th9squ (the area's one branch; pushed after #37809 merges, serially)
    Domain: domain:ui
    Seat: repo:objectstack#2
    Area: s2-ux-L (second of the two cards the seat gave at 04:05Z)
    Scope: the shared alert dialog, so every alert dialog is covered (the record delete confirm is the one measured).
    File surface:

    • ui/packages/components/src/ui/alert-dialog.tsx: the title and description wrap an unbroken token (overflow-wrap: anywhere), and the content's grid items may shrink below their min-content width (min-width: 0), so the dialog stays within max-w-lg and its buttons stay in view
    • a test pinning the classes, and one changeset
      Container & model: XS, mode:thread, model: default — no path-derived mandate, effort: medium
      Clause-②: no
      Metadata-protocol: none
      Skills-docs: none
      Responsibility: objectui shared AlertDialog (title/description have no wrap rule for an unbroken token, so the grid track grows to its width) | none | users whose record titles hold a long unbroken token (URL, file name, hash); reachable today
      Thread-read: none
      Prior rulings read: none
      Premise: holds. Classes read on origin/main cac93cc (AlertDialogContent grid w-full max-w-lg … p-6, AlertDialogTitle text-lg font-semibold, AlertDialogDescription text-sm text-muted-foreground, none with a wrap rule or min-w-0). Reproduced in Chromium at 1440 px with the same box model and a 5,000-character token: dialog client width 510 px, scroll width 45,051 px, Cancel at x 45,396; with overflow-wrap: anywhere on the text and min-width: 0 on the grid items, scroll width 510 px, Cancel at x 831.
      Serial constraints cleared: overlap-check before the first push
      L2: not owed by path (no packages/spec/src, no Clause-②, no protocol change); the seat decides at L1
  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 27, 2026
  5. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Landed · 2026-11-27T06:39Z

    PR #37824 merged at 2026-11-27T06:15Z and closed this card. pm:dispatched is cleared. No follow-ups.

  6. removed
    pm:dispatched
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions