From 36fae8fabf80bd0bee3230c50515a04c540db319 Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Mon, 28 Sep 2026 15:31:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(reports):=20header=20=E3=80=8C=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=8A=A5=E5=91=8A=E3=80=8D=20joins=20the=20report=20d?= =?UTF-8?q?isabled-button=20rule=20(BUG-1078)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generate button renders in SecondaryPageShell's actions slot, outside the report roots, so while submitting it still got the global 45% fade. A report-owned `report-center-generate` class brings it into the disabled rule; SecondaryPageShell and button.tsx unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8 --- docs/BUG_HISTORY.md | 4 ++-- .../PROGRESS-ayanamsa-report-buttons-20260928.md | 5 +++++ frontend/DESIGN.md | 2 +- frontend/src/app/globals.css | 5 ++++- .../generate-personal-report-button.tsx | 2 +- frontend/tests/report-buttons-scope-20260928.test.ts | 12 +++++++++++- 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 4e0384d9..4c8efdee 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -14505,8 +14505,8 @@ - 现象:产品转述真机反馈:导出按钮黑字配深红色背景,看着不舒服。 - 触发条件:浅色主题打开分块导出,「导出选中」是近黑字 #1d1d1f 在 #a9583e 上(3.33:1);深色主题是 #f2f0ea 在 #d78064 上(2.57:1)。未勾选时按钮再被整体淡到 45%。套餐选中态用 `--color-action-soft`,深色下是 #3a2620 深红褐。 - 根因:`globals.css` 顶部未分层的 `button { color: inherit; }` 与 `button:disabled { opacity: .45; }` 压过 Tailwind v4 放在 `@layer utilities` 里的 `text-primary-foreground` 与 `disabled:opacity-50`(未分层声明总是赢分层声明,与选择器权重无关)。所以 `variant="default"` 的 `