Skip to content

深色主题下菜单里的「删除」几乎看不见:危险色当文字用,对比度约 1.6:1(列表右键菜单、选中后的「更多」菜单) #35658

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #35547(专题:列表页重做,维护者直派)。⛔ 不是认领。

维护者 2026-11-20 原话:「更新最新的代码,看列表页改动的效果」。这是那次走查里看到的缺陷。

现状(主干 d96c878e33,本机环境,深色主题,浏览器实测)

  • 列表页选中 2 条以上,页面栏右侧「…」菜单里的「删除」;在行上点右键,菜单里的「删除」。两处的字和图标都是暗红色,落在近黑的菜单底上,几乎看不见,像是被禁用了,实际可点。
  • 实测计算样式:文字 rgb(127, 29, 29),菜单底 rgb(26, 26, 30),对比度约 1.6:1(正文文字的最低要求是 4.5:1)。
  • 原因:这些菜单项用 text-destructive(ui/packages/plugin-grid/src/components/RowContextMenu.tsx:112, 125)。深色主题里 --destructive 是 0 62.8% 30.6%(ui/packages/components/src/index.css:247),这个值是给红底按钮当底色用的,不适合当文字色;浅色主题的值 0 84.2% 60.2%(:159)当文字没有问题。
  • 这不是 feat(list): no Actions column on the list page; a selection swaps the page bar; lists load as they scroll #35637 引入的;那次改动把删除从行尾的操作列搬进了这两个菜单,所以现在每个人都会看到。

要做的

  • 深色主题下,危险操作的文字和图标用一个够亮的红(对比度不低于 4.5:1)。做法由实现方定:给文字单独一个语义色,或调整深色主题的取值并核对红底按钮不受影响。
  • 全仓查一遍把 text-destructive 用在深色底上的地方,一并修到,不只修这两个菜单。

不做的

  • 不改浅色主题的取值。
  • 不改删除的位置和确认流程。

验收

  • 深色主题:列表右键菜单和选中后的「…」菜单里,「删除」一眼可读,实测对比度不低于 4.5:1。
  • 浅色主题外观不变。
  • 红底的危险按钮(例如删除确认框里的按钮)在两种主题下外观不变,或同样满足对比度。

Reader: domain:ui 车道。ui/packages/components/src/index.css、ui/packages/plugin-grid/src/components/RowContextMenu.tsx、ui/packages/app-shell/src/views/objectViewPageHeader.tsx。

Dedupe: text-destructive dark、深色 删除 看不清(objectstack,open)→ 0。

Activity

  1. added
    bug
    priority:p2
    domain:ui
    on Nov 19, 2026
  2. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:queue; rationale: area:ux · Bug (in dark theme the menu's Delete is danger-red text on near-black, about 1.6:1, and reads as disabled) · a child of the maintainer's list-page topic #35547, from his own walkthrough → p2 as set.

  3. added
    pm:queue
    on Nov 19, 2026
  4. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Claim: PM loop · 2026-11-20T16:37Z
    Area: b1-L
    Session: session_01L6bhgTTFr43A9SHzSvgUoy (the card thread)
    Account: os-sales
    Branch: claude/project-thread-0wa2pw (this card thread can push only this branch, a measured platform exception to the issue-numbered branch name)
    Seat: repo:objectstack#1
    Domain: domain:ui
    File surface: ui/packages/components/src/index.css, ui/apps/console/src/index.css, ui/packages/runner/src/index.css, ui/packages/cli/src/utils/app-generator.ts (new-app template), ui/packages/plugin-gantt/src/ResourceWorkload.tsx (one inline danger text colour). Approach: a separate dark-theme danger TEXT colour (--text-color-destructive reading --destructive-text, defined only under .dark); light theme byte-identical; bg-/border-/ring-destructive and red-background buttons untouched; no text-destructive call site edited.
    Container & model: S, mode:thread (the seat session can push only its mailbox branch), model: default (opus) — no path-derived mandate, effort: medium
    Clause-②: no (expected: a theme colour value, no published accept set; confirmed from the changeset at PR time)
    Metadata-protocol: none expected
    Premise: re-read on main 8c18a362 by the thread: dark --destructive is 0 62.8% 30.6%, used as text.
    Basis: epic #35547 child; the maintainer took the epic into this seat on 2026-11-20 16:32Z 「接手专题 35547」 and 「专题任务p1p2 都处理」.
    Resume-from: none
    Fold-or-serial: serial, alone.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 20, 2026
  6. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgTTFr43A9SHzSvgUoy
    os-dev-report

    {
      "issue": 35658,
      "status": "done",
      "branch": "claude/project-thread-0wa2pw",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35904",
      "session": "session_01L6bhgTTFr43A9SHzSvgUoy",
      "premise_still_valid": true,
      "summary": "Dark-theme danger text now reads its own token: each shipped @theme (components, console, runner, objectui init template) maps --text-color-destructive to hsl(var(--destructive-text, var(--destructive))), and only .dark defines --destructive-text (0 91% 71%). Light theme falls back to --destructive and renders identically; bg-/border-/ring-destructive and red buttons are untouched; no text-destructive call site edited. The Gantt over-capacity label's inline danger text reads the same token; theming docs name it.",
      "tests": "New packages/components/src/__tests__/dark-danger-text-contrast-35658.test.ts: Tests 13 passed (13) at head; reverse check with the four theme files from origin/main: Tests 7 failed | 6 passed (13), restored by git checkout HEAD, git diff HEAD empty. vitest packages/components/ packages/plugin-gantt/ cli app-generator.test.ts: Test Files 590 passed | 2 skipped, Tests 5587 passed | 138 skipped, exit 0. components type-check exit 0 (test file listed by tsconfig.test.json). Browser, console Vite dev + showcase backend, Chromium light and dark, Accounts list: dark row menu Delete 1.73:1 -> 6.31:1, hovered 1.49:1 -> 5.41:1; selection menu the same; dark red confirm button 9.58:1 unchanged; light readings identical before and after (menu 3.76:1, hovered 3.22:1, red button 3.60:1). No ablation: the diff is theme CSS values, pinned by the reverse check.",
      "gates": "dispatch-gates --ran at head 00cc92e4: 71 derived, 71 run, 0 NOT-MEASURED, all exit 0 (68 run at 05a265c1, same CSS; check:skill-examples, check:doc-formula-expressions and ui vitest scripts/ run at head after check-hand-rolled-comment-mask flagged the test's regex comment strip, now through scripts/js-comment-mask.mjs). overlap-check VERDICT clean exit 0. CI check runs: in_progress at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — fleet-write relay: pr_create (PR 35904, assignee os-sales), pr_request_reviewers (os-sales); plus this report via post-stamped",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · light theme text-destructive is 3.76:1 on white (3.22:1 hovered) and the light red button 3.60:1, under 4.5:1; card forbids touching light values; noted in PR Acceptance notes, not filed · dedupe words: light destructive contrast, text-destructive light 4.5",
        "carrier: none · ObjectGrid and ListView export-error lines use style color var(--destructive, #ef4444), a bare HSL triple, so the text renders in the inherited colour, not red; readable; noted only"
      ]
    }

    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uxbugdomain:uipm:dispatchedpriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions