fix: every selected state uses the neutral selected fill, not the terracotta tint (BUG-2087)
Independent Staging Quality Gate / validate-frontend (push) Successful in 6m32s
Independent Staging Quality Gate / validate-python (push) Successful in 7m54s
Independent Staging Quality Gate / publish (push) Successful in 3m55s

Selected, current and checked states across the chat profile picker,
birth-time options, preset chips, theme and ayanamsa options, gender,
the synastry segment, ephemeris dates, the people archive and the chart
page now use --color-sidebar-selected. Selected text is ink. Hover on
borderless items is a lighter neutral. Rectification-only selectors are
left for their owner.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
This commit is contained in:
2026-11-20 16:32:03 +08:00
co-authored by Claude Fable 5.2
parent ebd8d943f8
commit e69d3d50cc
13 changed files with 168 additions and 41 deletions
+13
View File
@@ -28079,3 +28079,16 @@
- 验证与防复发:`frontend/tests/synastry-picker-unusable-2083.test.tsx`(17 条):三种状态及其与服务端判断的对照、点名哪些人、各链接的地址、下拉的标注、任一选中者不可用时不发请求、两个可用的人时不渲染说明块、名单过期被拒后点名且没有通用提示。用产品样式表渲染真实选择页,在无头浏览器里看过 1280 和 390、浅色和深色的三种情况;登录后的真实页面没有看过。
- 关联记录:BUG-2062(「新增星盘」弹窗)、BUG-2064(生时纠正重新选范围)、BUG-2056(操作结果用系统提示;这里是持续状态,留在页面里)。
- 修复版本:`claude/synastry-picker-2083b`。
## BUG-2087 | 深色模式下很多选中状态是红棕色的底,和侧栏、设置弹窗、报告目录的中性选中底不一致
- 状态:fixed-pending-verify(待测试环境真机确认)。
- 首次发现 / 最近更新:2026-11-20 / 2026-11-20。
- 触发与现象:第十八、十九轮测试环境复测时看到,深色模式下选中的性别、岁差、时间来源、问答里选星盘的那一行、常用问题的小标签等是红棕色的底;BUG-2081 已改了三处(年运范围行、时间来源汇总行、下拉高亮项),其余没有动。
- 触发条件:任何用 `--color-action-soft` 当作选中 / 当前 / 已勾选状态底色的地方;深色下这个颜色是 `#3a2620`,读起来是棕色。
- 根因:选中状态最初用的是强调色的浅底;侧栏、设置弹窗(BUG-2059)和报告目录(BUG-2061)后来改成中性底,其余地方没有跟着统一。
- 修复:产品负责人 2026-11-20 定「所有选中状态统一用中性底色」。`globals.css` 18 条、`chart-board.css` 14 条、`learn.css` 1 条规则的底色由 `--color-action-soft` 改为 `--color-sidebar-selected`:问答选星盘的行、时间来源和不确定程度的选项、生时问答的选项、常用问题的领域和小标签、主题菜单与主题选项、岁差选项、性别选项、合盘分段按钮、星历的当天日期与回看按钮、星盘档案当前的人、学习页的栏目,以及星盘页的标签、开关、周期、选中的宫格、行星行、主题格、大运小标签、格局卡、当前大运行、关系表当前模式列。选中项原来用陶土色写字的七处改为墨色,保证在中性底上的对比度。两处没有边框的项(主题菜单的键盘停留项、星历日期)悬停改为 55% 的中性底,比选中浅一档;带边框的选项保留陶土色描边。
- 没有动的:实心按钮、焦点环、链接、头像底色、徽标、提示块、图表标记、浅色强调按钮(`.report-center-entry-action.is-accent`);生时纠正页面专用的选择器(`.rectification-candidate.is-selected`、`.rectification-range-delivery__column.is-adopted`、`.rectification-ruler-band`、`.rectification-page-mark.is-range`、`.rectification-page-accent`,以及 `birth-time-choice.css`、`chart-choice.css`)归生时纠正窗口,只列出,不改。
- 验证与防复发:`frontend/tests/neutral-selected-2087.test.ts`(4 条):四个样式文件里凡是选中状态的规则,底色或填充不得出现 `--color-action-soft`(白名单逐条写了理由);17 个已改的选择器必须是中性底;选中文字是墨色;无边框项的悬停比选中浅。七个钉着旧值的测试按原值 / 新值 / 原因更新。用产品样式表在无头浏览器里对比了改动前后,深浅两套;没有在真实登录页面上看过。
- 关联记录:BUG-2081(先改的三处)、BUG-2059(设置弹窗的中性选中底)、BUG-2061(报告目录)。
- 修复版本:`claude/neutral-selected-2087`。
+1
View File
@@ -933,6 +933,7 @@ Agent 的 live 标记只有 `InlineSpinner` 一种。曾经并存的 canvas 小
- **没有写成的报告**写「这份报告没有写成,点数已退回」并给「重新生成」。这句话成立的依据:worker 在把报告标成失败之前先释放预留的点数(`releaseBeforeFailure`),释放不成就不标失败。
- 可显示的只有步骤、章节名与章节状态。`attemptCount`、原始错误码、lease、job id、payload 一律不出服务端,与 BUG-043 的边界一致。
- 选中或当前项不用左侧色条(2026-11-20 产品)。
- 选中、当前、已勾选的状态一律用侧栏那一种中性底色 `--color-sidebar-selected`,不用陶土色浅底 `--color-action-soft`;选中项的文字用墨色。带边框的选项可以保留陶土色描边。没有边框的项,悬停用 55% 的中性底,比选中浅一档(2026-11-20 产品,BUG-2087;防线测试 `tests/neutral-selected-2087.test.ts`)。
Admin 的 antd `<Spin>` 是独立设计系统,不在此表。
+19 -19
View File
@@ -1331,7 +1331,7 @@ button.chat-chart-resize-handle:active { position: absolute; top: 0; left: -3px;
.chat-profile-picker-retry { min-height: 44px; margin-top: var(--space-2); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-md); background: transparent; color: var(--color-action); cursor: pointer; font: inherit; font-size: var(--type-caption); }
.chat-profile-picker-options { display: grid; gap: 2px; max-height: min(50vh, 320px); margin: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.chat-profile-picker-row { min-width: 0; min-height: 60px; display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; gap: 2px; padding-right: 6px; border-radius: 12px; transition: background-color 120ms ease-out; }
.chat-profile-picker-row.is-selected { background: var(--color-action-soft); }
.chat-profile-picker-row.is-selected { background: var(--color-sidebar-selected); }
.chat-profile-picker-option { width: 100%; height: auto; min-height: 60px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 20px; align-items: center; gap: 12px; padding: 8px 6px 8px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--color-ink); cursor: pointer; text-align: left; font: inherit; font-weight: 400; white-space: normal; transition: background-color 120ms ease-out, color 120ms ease-out; }
.chat-profile-picker-option[aria-disabled="true"] { cursor: default; color: var(--color-ink-tertiary); }
.chat-profile-picker-option[data-selected] { background: transparent; color: var(--color-ink); }
@@ -1554,7 +1554,7 @@ button.chat-chart-resize-handle:active { position: absolute; top: 0; left: -3px;
.birth-time-uncertainty-list.is-segmented .birth-time-uncertainty-option { min-height: 40px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-ink-secondary); }
.birth-time-uncertainty-list.is-segmented .birth-time-uncertainty-option.is-selected { background: var(--color-canvas); color: var(--color-ink); font-weight: 600; }
.birth-time-source-option { min-height: 64px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-canvas); cursor: pointer; transition: border-color 120ms ease-out, background-color 120ms ease-out, transform 120ms ease-out; }
.birth-time-source-option.is-selected { border-color: var(--color-action); background: var(--color-action-soft); }
.birth-time-source-option.is-selected { border-color: var(--color-action); background: var(--color-sidebar-selected); }
.birth-time-source-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--color-action); }
.birth-time-source-option [data-slot="radio-group-item"] { width: 16px; height: 16px; margin: 0; accent-color: var(--color-action); }
.birth-time-source-option > span { display: grid; gap: 3px; }
@@ -1566,14 +1566,14 @@ button.chat-chart-resize-handle:active { position: absolute; top: 0; left: -3px;
.birth-time-uncertainty-option { min-height: 44px; height: auto; justify-content: center; white-space: normal; padding: 0 var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-canvas); color: var(--color-ink); font-size: var(--type-body-sm); font-weight: 400; cursor: pointer; }
.birth-time-uncertainty-option:hover { background: var(--color-canvas); color: var(--color-ink); }
.birth-time-uncertainty-option.is-selected,
.birth-time-uncertainty-option.is-selected:hover { border-color: var(--color-action); background: var(--color-action-soft); color: var(--color-ink); }
.birth-time-uncertainty-option.is-selected:hover { border-color: var(--color-action); background: var(--color-sidebar-selected); color: var(--color-ink); }
.birth-time-detail-grid { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); align-items: end; gap: var(--space-3); }
.birth-time-detail-grid > label { min-width: 0; }
.birth-time-detail-note { padding-bottom: 12px; }
.birth-time-legacy-note { padding: var(--space-3) 0; border-top: 1px solid var(--color-border); background: transparent; }
.birth-time-rectification { width: 100%; min-width: 0; max-width: 680px; display: grid; box-sizing: border-box; gap: var(--space-5); }
.birth-time-answer-list button.is-selected { border-color: var(--color-action); background: var(--color-action-soft); }
.birth-time-answer-list button.is-selected { border-color: var(--color-action); background: var(--color-sidebar-selected); }
.birth-time-evidence-note { margin: 0; color: var(--color-ink-secondary); font-size: var(--type-caption); line-height: 1.6; word-break: keep-all; overflow-wrap: break-word; }
.birth-time-next-step { box-sizing: border-box; width: 100%; display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-action-soft); }
@@ -2296,7 +2296,7 @@ button.chat-chart-resize-handle:active { position: absolute; top: 0; left: -3px;
.consult-preset-nav { width: auto; min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; overflow: hidden; border-right: 1px solid var(--color-border); }
.consult-preset-domain { height: 32px; flex: none; display: flex; align-items: center; justify-content: flex-start; margin: 0; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--color-ink-secondary); cursor: pointer; font: inherit; font-size: 13px; line-height: 1.2; text-align: left; white-space: nowrap; }
.consult-preset-domain:hover { color: var(--color-ink); }
.consult-preset-domain.is-current { background: var(--color-action-soft); color: var(--color-ink); }
.consult-preset-domain.is-current { background: var(--color-sidebar-selected); color: var(--color-ink); }
.consult-preset-domain:focus-visible, .consult-preset-chip:focus-visible, .consult-preset-question:focus-visible { box-shadow: none; outline: 2px solid color-mix(in srgb, var(--color-focus) 56%, transparent); outline-offset: -2px; }
.consult-preset-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 12px 16px; overflow: hidden; }
.consult-preset-pane-label { margin: 0; padding: 4px 12px 8px; color: var(--color-ink-tertiary); font-size: 13px; line-height: 1.4; }
@@ -2318,7 +2318,7 @@ button.chat-chart-resize-handle:active { position: absolute; top: 0; left: -3px;
.consult-preset-chips::-webkit-scrollbar { display: none; }
.consult-preset-chip { position: relative; height: 36px; flex: none; display: inline-flex; align-items: center; margin: 0; padding: 0 14px; border: 1px solid var(--color-border); border-radius: 999px; background: transparent; color: var(--color-ink-secondary); cursor: pointer; font: inherit; font-size: 13px; line-height: 1; white-space: nowrap; }
.consult-preset-chip::before { content: ""; position: absolute; inset: -5px 0; }
.consult-preset-chip.is-current { border-color: transparent; background: var(--color-action-soft); color: var(--color-ink); }
.consult-preset-chip.is-current { border-color: transparent; background: var(--color-sidebar-selected); color: var(--color-ink); }
/* Fixed: the tallest domain (stress: its note at three lines on a 320px screen, then 5 x 52px rows). */
.consult-preset-sheet-pane { height: 344px; display: flex; flex-direction: column; padding: 4px 8px; overflow: hidden; border-top: 1px solid var(--color-border); }
.consult-preset-sheet-pane .consult-preset-note { padding: 8px 12px; }
@@ -2420,8 +2420,8 @@ button.chat-chart-resize-handle:active { position: absolute; top: 0; left: -3px;
.theme-menu-item { position: relative; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: var(--radius-sm); color: var(--color-ink-tertiary); cursor: pointer; }
.theme-menu-item::before { content: ""; position: absolute; inset: -4px; }
.theme-menu-item > svg { width: 18px; height: 18px; }
.theme-menu-item[data-highlighted] { background: var(--color-canvas-muted); color: var(--color-ink); }
.theme-menu-item:is([data-checked], [aria-checked="true"]) { background: var(--color-action-soft); color: var(--color-action); }
.theme-menu-item[data-highlighted] { background: color-mix(in srgb, var(--color-sidebar-selected) 55%, transparent); color: var(--color-ink); }
.theme-menu-item:is([data-checked], [aria-checked="true"]) { background: var(--color-sidebar-selected); color: var(--color-ink); }
.theme-menu [data-slot="dropdown-menu-radio-item-indicator"] { display: none; }
.account-menu-separator { height: 1px; margin: 6px var(--space-1); background: var(--color-border); }
@@ -2471,7 +2471,7 @@ button.chat-chart-resize-handle:active { position: absolute; top: 0; left: -3px;
.theme-preference-segment > svg { width: 16px; height: 16px; flex: none; color: var(--color-ink-tertiary); }
.theme-preference-segment:is([data-active], [aria-selected="true"]) > svg { color: var(--color-ink); }
.ayanamsa-preference-option { grid-template-columns: minmax(0, 1fr) 18px; }
.ayanamsa-preference-option[aria-checked="true"] { border-color: var(--color-action); background: var(--color-action-soft); }
.ayanamsa-preference-option[aria-checked="true"] { border-color: var(--color-action); background: var(--color-sidebar-selected); }
.ayanamsa-preference-option small { display: block; margin-top: var(--space-1); color: var(--color-ink-tertiary); font-size: var(--type-caption); font-weight: 400; }
/* Optional gender (TASK-consult-gender-optional-20260927): three 44px choices
in one row, same look as the birth-time range choices; the title matches the
@@ -2480,7 +2480,7 @@ button.chat-chart-resize-handle:active { position: absolute; top: 0; left: -3px;
.profile-gender-title { color: var(--color-ink-secondary); font-size: var(--type-overline); font-weight: 600; }
.profile-gender-options { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.profile-gender-option { min-width: 64px; min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-canvas); color: var(--color-ink); font-size: var(--type-body-sm); cursor: pointer; }
.profile-gender-option.is-selected { border-color: var(--color-action); background: var(--color-action-soft); }
.profile-gender-option.is-selected { border-color: var(--color-action); background: var(--color-sidebar-selected); }
.profile-gender-option:disabled { cursor: default; opacity: 0.6; }
/* For portalled tooltip positioners only. The chart's symbol bubble is an inline
@@ -3152,7 +3152,7 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class
.birth-time-source-list { grid-template-columns: 1fr; gap: var(--space-2); }
.birth-time-source-option { min-height: 64px; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-color: var(--color-border); border-radius: var(--radius-md); background: var(--color-canvas); transition: border-color 160ms ease-out, background-color 160ms ease-out; }
.birth-time-source-option:hover { border-color: color-mix(in srgb, var(--color-action) 44%, var(--color-border)); }
.birth-time-source-option.is-selected { border-color: var(--color-action); background: var(--color-action-soft); box-shadow: inset 0 0 0 1px var(--color-action); }
.birth-time-source-option.is-selected { border-color: var(--color-action); background: var(--color-sidebar-selected); box-shadow: inset 0 0 0 1px var(--color-action); }
.birth-time-source-option input { appearance: none; align-self: center; justify-self: center; position: static; box-sizing: border-box; width: 16px; min-width: 16px; max-width: 16px; height: 16px; min-height: 16px; max-height: 16px; margin: 0; overflow: visible; clip: auto; clip-path: none; border: 1.5px solid var(--color-border-strong); border-radius: 50%; background: var(--color-canvas); }
.birth-time-source-option input:checked { border-color: var(--color-action); background: var(--color-action-strong); box-shadow: inset 0 0 0 4px var(--color-action-soft); }
.birth-time-source-option [data-slot="radio-group-item"] { appearance: none; align-self: center; justify-self: center; position: static; box-sizing: border-box; width: 16px; min-width: 16px; max-width: 16px; height: 16px; min-height: 16px; max-height: 16px; margin: 0; overflow: visible; clip: auto; clip-path: none; border: 1.5px solid var(--color-border-strong); border-radius: 50%; background: var(--color-canvas); box-shadow: none; }
@@ -5474,8 +5474,8 @@ button.synastry-dd-add { border-radius: 0 0 var(--radius-md) var(--radius-md); }
}
.synastry-seg button[aria-pressed="true"] {
border-color: var(--color-action);
background: var(--color-action-soft);
color: var(--color-action);
background: var(--color-sidebar-selected);
color: var(--color-ink);
}
/* BUG-2051: the shared birth place picker. The block keeps the height of its tallest state
(legend 25 + two rows of fields 150 + the level link 28 + a two-line status 47; three lines on a phone),
@@ -7305,8 +7305,8 @@ button.report-ask-clear:hover { color: var(--color-ink); }
text-align: left;
cursor: pointer;
}
.ephemeris-events-date:hover { background: var(--color-canvas-muted); }
.ephemeris-events-date[aria-current="date"] { background: var(--color-action-soft); }
.ephemeris-events-date:hover { background: color-mix(in srgb, var(--color-sidebar-selected) 55%, transparent); }
.ephemeris-events-date[aria-current="date"] { background: var(--color-sidebar-selected); }
.ephemeris-events-date small {
color: var(--color-ink-tertiary);
font-size: var(--type-caption);
@@ -7571,7 +7571,7 @@ button.report-ask-clear:hover { color: var(--color-ink); }
}
.ephemeris-lookback-actions [aria-pressed="true"] {
border-color: var(--color-action-strong);
background: var(--color-action-soft);
background: var(--color-sidebar-selected);
}
@media (prefers-reduced-motion: reduce) {
.ephemeris-month-cell,
@@ -7740,7 +7740,7 @@ button.report-ask-clear:hover { color: var(--color-ink); }
.people-archive-row.is-current,
.people-archive-row.is-current:hover {
border-color: var(--color-action-strong);
background: var(--color-action-soft);
background: var(--color-sidebar-selected);
}
.people-archive-row > .people-archive-avatar { grid-row: 1 / span 2; }
.people-archive-row-name {
@@ -8541,10 +8541,10 @@ button.report-ask-clear:hover { color: var(--color-ink); }
.theme-preference-option:hover { border-color: var(--color-border-strong); background: var(--color-canvas-muted); }
.birth-time-source-option:hover { border-color: var(--color-border-strong); background: var(--color-canvas-muted); }
}
.theme-preference-option[aria-checked="true"], .theme-preference-option[aria-checked="true"]:hover { border-color: var(--color-action); background: var(--color-action-soft); }
.theme-preference-option[aria-checked="true"], .theme-preference-option[aria-checked="true"]:hover { border-color: var(--color-action); background: var(--color-sidebar-selected); }
.birth-time-source-option:focus-within { border-color: var(--color-border-strong); box-shadow: none; }
.birth-time-source-option:has(:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-action) 16%, transparent); }
.birth-time-source-option.is-selected, .birth-time-source-option.is-selected:hover, .birth-time-source-option.is-selected:focus-within { border-color: var(--color-action); background: var(--color-action-soft); }
.birth-time-source-option.is-selected, .birth-time-source-option.is-selected:hover, .birth-time-source-option.is-selected:focus-within { border-color: var(--color-action); background: var(--color-sidebar-selected); }
@media (max-width: 640px) {
/* Bottom sheet on a phone (prototype board 「手机:底部抽屉」). */
+1 -1
View File
@@ -22,7 +22,7 @@
.learn-index-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: var(--space-12); }
.learn-columns { position: sticky; top: var(--space-4); display: flex; flex-direction: column; gap: 2px; }
.learn-column-pick { justify-content: space-between; width: 100%; padding: 0 var(--space-3); color: var(--color-ink-strong); font-size: var(--type-body-md); font-weight: 400; }
.learn-column-pick[aria-pressed="true"] { background: var(--color-action-soft); color: var(--color-ink); font-weight: 500; }
.learn-column-pick[aria-pressed="true"] { background: var(--color-sidebar-selected); color: var(--color-ink); font-weight: 500; }
.learn-column-count { color: var(--color-ink-tertiary); font-size: var(--type-caption); font-variant-numeric: tabular-nums; }
.learn-list { display: grid; gap: var(--space-10); min-width: 0; }
@@ -95,13 +95,13 @@
.chart-graha-karaka { font-weight: 600; color: var(--color-ink-strong); }
.chart-graha-table tbody tr.is-now > * { color: var(--color-action); font-weight: 600; }
/* 敌友: the column the board shows is a pale accent wash; the last column reads the other way round. */
.chart-relation-table .is-mode { background: color-mix(in srgb, var(--color-action-soft) 70%, transparent); }
.chart-relation-table .is-mode { background: color-mix(in srgb, var(--color-sidebar-selected) 70%, transparent); }
.chart-relation-table td.chart-relation-back { border-left: 1px solid var(--color-border); }
.chart-relation-chips { margin-top: 0; }
/* 「从运主起算」: a 36px pill whose hit area reaches 44px. */
.chart-data-toggle { position: relative; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; }
.chart-data-toggle::before { content: ""; position: absolute; inset: -4px 0; }
.chart-data-toggle.is-on { border-color: var(--color-action); background: var(--color-action-soft); color: var(--color-action-hover); }
.chart-data-toggle.is-on { border-color: var(--color-action); background: var(--color-sidebar-selected); color: var(--color-ink); }
.chart-type-table { display: grid; gap: var(--space-2); min-width: 0; }
.chart-type-table-title { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.chart-data-now { display: grid; gap: var(--space-1); }
@@ -109,7 +109,7 @@
display: grid; grid-template-columns: 40px 64px minmax(0, 1fr); align-items: center; gap: 2px 8px;
justify-content: stretch; padding: 6px 8px; border-radius: 10px; text-align: left; white-space: nowrap;
}
.chart-data-period.is-on { background: var(--color-action-soft); }
.chart-data-period.is-on { background: var(--color-sidebar-selected); }
.chart-data-period .chart-progress { grid-column: 2 / -1; margin-top: 0; }
.chart-data-period-level { font-size: 13px; color: var(--color-ink-tertiary); }
.chart-data-period-span { font-size: 13px; color: var(--color-ink-secondary); font-variant-numeric: tabular-nums; }
@@ -133,7 +133,7 @@
/* Facts, not actions: one step smaller than the head buttons (prototype chip, BUG-1470). */
.chart-tag { border-radius: 999px; height: 28px; padding: 0 11px; font-size: 13px; }
.chart-tag.is-on,
.chart-tag[aria-pressed="true"] { border-color: var(--color-action); color: var(--color-action); background: var(--color-action-soft); }
.chart-tag[aria-pressed="true"] { border-color: var(--color-action); color: var(--color-ink); background: var(--color-sidebar-selected); }
.chart-tag.is-dasha { color: var(--color-warning); }
/* Row two of direction A: what the board shows on the left, 图层 and 北 / 南 on the right. */
@@ -178,7 +178,7 @@
.chart-board-cell:hover polygon,
.chart-board-cell:hover rect { fill: var(--color-canvas-soft); }
.chart-board-cell.is-selected polygon,
.chart-board-cell.is-selected rect { fill: var(--color-action-soft); stroke: var(--color-action); stroke-width: 1.5; }
.chart-board-cell.is-selected rect { fill: var(--color-sidebar-selected); stroke: var(--color-action); stroke-width: 1.5; }
.chart-board-cell.is-related polygon,
.chart-board-cell.is-related rect { fill: var(--color-canvas-soft); }
.chart-board-center rect { fill: var(--color-canvas-soft); stroke: var(--color-border-strong); }
@@ -333,7 +333,7 @@
.chart-inspector-grahas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.chart-inspector-graha[data-slot="button"] { height: 50px; min-width: 0; justify-content: flex-start; gap: 6px; padding: 0 8px; border-radius: 10px; background: color-mix(in srgb, var(--color-canvas-soft) 60%, var(--color-canvas)); color: var(--color-ink); font-weight: 400; text-align: left; }
.chart-inspector-graha[data-slot="button"]:hover { background: var(--color-canvas-soft); }
.chart-inspector-graha.is-on[data-slot="button"] { background: var(--color-action-soft); }
.chart-inspector-graha.is-on[data-slot="button"] { background: var(--color-sidebar-selected); }
.chart-inspector-graha-glyph { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--color-canvas-muted); color: var(--color-ink-secondary); font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.chart-inspector-graha.is-on .chart-inspector-graha-glyph { background: color-mix(in srgb, var(--color-action-strong) 24%, var(--color-action-soft)); color: var(--color-action-hover); }
.chart-inspector-graha-copy { min-width: 0; display: grid; line-height: 1.25; }
@@ -384,7 +384,7 @@
.chart-graha-table thead th { font-size: 13px; color: var(--color-ink-tertiary); }
.chart-graha-table tbody tr { cursor: pointer; }
.chart-graha-table tbody tr:hover > * { background: var(--color-canvas-soft); }
.chart-graha-table tbody tr.is-selected > * { background: var(--color-action-soft); }
.chart-graha-table tbody tr.is-selected > * { background: var(--color-sidebar-selected); }
.chart-graha-num { font-variant-numeric: tabular-nums; }
.chart-graha-name { gap: 6px; font-weight: 400; min-height: 0; }
.chart-graha-name small { color: var(--color-ink-tertiary); font-size: 13px; }
@@ -398,7 +398,7 @@
border: 1px solid var(--color-canvas-muted); border-radius: 10px; background: var(--color-canvas);
color: var(--color-ink); font-weight: 400;
}
.chart-theme-cell.is-on[data-slot="button"] { border-color: color-mix(in srgb, var(--color-focus) 45%, var(--color-canvas)); background: var(--color-action-soft); color: var(--color-action-hover); }
.chart-theme-cell.is-on[data-slot="button"] { border-color: color-mix(in srgb, var(--color-focus) 45%, var(--color-canvas)); background: var(--color-sidebar-selected); color: var(--color-ink); }
.chart-theme-num { flex: none; width: 30px; font-size: 13px; color: var(--color-ink-tertiary); text-align: left; }
.chart-theme-name { min-width: 0; font-size: 13px; }
.chart-theme-dot { flex: none; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--color-focus); }
@@ -409,11 +409,11 @@
.chart-dasha-chip strong { font-family: var(--font-display); font-size: 16px; }
.chart-dasha-chip.is-now { border-color: var(--color-action); }
.chart-dasha-chip.is-now strong { color: var(--color-action); }
.chart-dasha-chip.is-open { background: var(--color-action-soft); }
.chart-dasha-chip.is-open { background: var(--color-sidebar-selected); }
.chart-dasha-antars { margin-top: var(--space-3); }
.chart-chip.is-on { border-color: var(--color-action); background: var(--color-action-soft); color: var(--color-action); }
.chart-chip.is-on { border-color: var(--color-action); background: var(--color-sidebar-selected); color: var(--color-ink); }
/* What a 盘面数据 tab shows on the board (which relationship, a changed house reference). */
.chart-chip.is-focus { border-color: color-mix(in srgb, var(--color-action) 45%, var(--color-border)); background: var(--color-action-soft); color: var(--color-action-hover); }
.chart-chip.is-focus { border-color: color-mix(in srgb, var(--color-action) 45%, var(--color-border)); background: var(--color-sidebar-selected); color: var(--color-ink); }
/* 命盘速览: six facts, three across (two on a phone); each still locates on the board. */
.chart-glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; align-content: start; }
@@ -461,7 +461,7 @@
.chart-yoga .chart-yoga-text strong { padding-right: 64px; }
.chart-yoga.is-unmet { background: transparent; }
.chart-yoga.is-unmet .chart-yoga-text strong { color: var(--color-ink-secondary); }
.chart-yoga.is-on { border-color: var(--color-action); background: var(--color-action-soft); }
.chart-yoga.is-on { border-color: var(--color-action); background: var(--color-sidebar-selected); }
.chart-yoga-text { display: grid; gap: 6px; }
.chart-yoga-text strong { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.chart-yoga-text small { font-size: 13px; line-height: 1.6; color: var(--color-ink-secondary); font-weight: 400; }
@@ -512,7 +512,7 @@
.chart-book-tabs { max-width: 100%; overflow-x: auto; }
.chart-graha-table.is-sticky tbody th,
.chart-graha-table.is-sticky thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--color-canvas); }
.chart-graha-table.is-sticky tbody tr.is-selected > th { background: var(--color-action-soft); }
.chart-graha-table.is-sticky tbody tr.is-selected > th { background: var(--color-sidebar-selected); }
.chart-graha-name small { margin-left: 4px; }
.chart-point-tag { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 5px; margin-right: 6px; border-radius: 9px; border: 1px solid var(--color-action); background: var(--color-action-soft); color: var(--color-action); font-size: 13px; font-weight: 600; }
.chart-point-note { white-space: normal; min-width: 12em; color: var(--color-ink-secondary); font-size: 13px; }
@@ -782,7 +782,7 @@
.chart-dasha .chart-dasha-table tbody tr:hover > * { background: transparent; }
.chart-dasha .chart-dasha-table tbody tr.is-past > th,
.chart-dasha .chart-dasha-table tbody tr.is-past > td { color: var(--color-ink-tertiary); font-weight: 400; }
.chart-dasha .chart-dasha-table tbody tr.is-now > * { background: var(--color-action-soft); color: var(--color-ink); font-weight: 400; }
.chart-dasha .chart-dasha-table tbody tr.is-now > * { background: var(--color-sidebar-selected); color: var(--color-ink); font-weight: 400; }
.chart-dasha .chart-dasha-table tbody tr.is-now > th { font-weight: 600; }
.chart-dasha .chart-dasha-table tbody tr.is-zero > th,
.chart-dasha .chart-dasha-table tbody tr.is-zero > td { color: var(--color-ink-tertiary); }
@@ -229,7 +229,8 @@ test("第二条运法: a pill switch, one 「现在」 line, the age ruler and a
await h.close();
}
// Quiet colours: the current row is a pale accent wash, past rows muted, 44px targets.
assert.match(cssDeclarations(".chart-dasha .chart-dasha-table tbody tr.is-now > *"), /background: var\(--color-action-soft\)/);
// 原值:var(--color-action-soft)(陶土色浅底);新值:var(--color-sidebar-selected)(中性选中底);原因:负责人 2026-11-20 定所有选中状态用中性底色,不用红棕色(BUG-2087)。
assert.match(cssDeclarations(".chart-dasha .chart-dasha-table tbody tr.is-now > *"), /background: var\(--color-sidebar-selected\)/);
assert.match(cssDeclarations(".chart-dasha-pill.is-now"), /background: var\(--deep-now\)/);
assert.match(cssDeclarations(".chart-dasha .chart-dasha-table tbody tr.is-past > td"), /color: var\(--color-ink-tertiary\)/);
assert.match(cssDeclarations(".chart-dasha .chart-dasha-table td"), /height: 44px/);
@@ -64,7 +64,8 @@ test("only the house column in frozen natal and Moon tables overrides centering"
// 原因:2026-11-02 第二条运法改成紧凑表格,「当前」统一用浅色强调色,不用黑色
test("the current dasha row keeps a pale tint and no accent line", () => {
const current = cssDeclarations(".chart-dasha .chart-dasha-table tbody tr.is-now > *", boardStyles);
assert.match(current, /background:\s*var\(--color-action-soft\)/);
// 原值:var(--color-action-soft)(陶土色浅底);新值:var(--color-sidebar-selected)(中性选中底);原因:负责人 2026-11-20 定所有选中状态用中性底色,不用红棕色(BUG-2087)。
assert.match(current, /background:\s*var\(--color-sidebar-selected\)/);
assert.match(current, /color:\s*var\(--color-ink\)/);
assert.doesNotMatch(current, /box-shadow|border-left/);
});
@@ -79,7 +79,8 @@ test("选择星盘: a row is avatar, name + badge over the date line, the check,
const other = renderToStaticMarkup(<ProfileRow row={row()} locked={false} requestInFlight={false} pending={false} onChoose={noop} onEdit={noop} onDelete={noop} />);
assert.match(other, /^<div class="chat-profile-picker-row">/);
// The look: no box on the selected row, ≥60px rows, the check only on it, one line with an ellipsis.
assert.match(cssDeclarations(".chat-profile-picker-row.is-selected", globalStyles), /background: var\(--color-action-soft\)/);
// 原值:var(--color-action-soft)(陶土色浅底);新值:var(--color-sidebar-selected)(中性选中底);原因:负责人 2026-11-20 定所有选中状态用中性底色,不用红棕色(BUG-2087)。
assert.match(cssDeclarations(".chat-profile-picker-row.is-selected", globalStyles), /background: var\(--color-sidebar-selected\)/);
assert.match(cssDeclarations(".chat-profile-picker-option[data-selected]", globalStyles), /background: transparent/);
assert.doesNotMatch(cssDeclarations(".chat-profile-picker-option[data-selected]", globalStyles), /border-color/);
assert.match(cssDeclarations(".chat-profile-picker-row", globalStyles), /min-height: 60px/);
@@ -241,7 +241,8 @@ test("the phone sheet shows a title, the 12 domain chips and the current domain'
}
const chip = rule(".consult-preset-chip");
assert.equal(chip.height, "36px");
assert.equal(rule(".consult-preset-chip.is-current").background, "var(--color-action-soft)");
// 原值:var(--color-action-soft)(陶土色浅底);新值:var(--color-sidebar-selected)(中性选中底);原因:负责人 2026-11-20 定所有选中状态用中性底色,不用红棕色(BUG-2087)。
assert.equal(rule(".consult-preset-chip.is-current").background, "var(--color-sidebar-selected)");
assert.equal(rule(".consult-preset-chips")["overflow-x"], "auto");
const title = rule(".consult-preset-title");
assert.equal(title["font-size"], "16px");
@@ -0,0 +1,106 @@
// BUG-2087: a selected / current / checked state never uses the terracotta tint
// (--color-action-soft) as its fill; it uses the neutral selected fill the
// sidebar rows use (--color-sidebar-selected). Owner rule, 2026-11-20.
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import path from "node:path";
import test from "node:test";
import { fileURLToPath } from "node:url";
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
const files = [
"src/app/globals.css",
"src/app/annual-report.css",
"src/app/learn/learn.css",
"src/components/chart-board/chart-board.css",
];
type Rule = { file: string; selector: string; body: string };
function rules(file: string): Rule[] {
const css = readFileSync(path.join(root, file), "utf8").replace(/\/\*[\s\S]*?\*\//g, "");
const out: Rule[] = [];
const pattern = /([^{}]+)\{([^{}]*)\}/g;
let match: RegExpExecArray | null;
while ((match = pattern.exec(css))) {
const selector = match[1].trim().replace(/\s+/g, " ");
if (!selector || selector.startsWith("@")) continue;
out.push({ file, selector, body: match[2] });
}
return out;
}
const all = files.flatMap(rules);
// What marks a selected state in this code base.
const SELECTED = /\.is-selected|\.is-current|\.is-on\b|\.is-open\b|\.is-now\b|\.is-mode\b|\[aria-checked="true"\]|\[aria-pressed="true"\]|\[aria-selected="true"\]|\[aria-current|\[data-checked\]|\[data-pressed\]|\[data-active\]/;
const TINT_FILL = /(?:background|background-color|fill)\s*:[^;]*--color-action-soft/;
// Selected-looking selectors that keep the tint, each with its reason. Pages of the
// birth-time rectification flow belong to another owner and are listed, not changed.
const ALLOW: Array<{ selector: RegExp; reason: string }> = [
{ selector: /^\.chat-profile-picker-row\.is-selected \.chat-profile-picker-row-avatar$/, reason: "the person's avatar disc inside the row, not the row's fill" },
{ selector: /^\.chart-inspector-graha\.is-on \.chart-inspector-graha-glyph$/, reason: "the planet glyph disc inside the row, not the row's fill" },
{ selector: /^\.rectification-/, reason: "rectification pages (other owner): candidate, adopted column, ruler band, page marks" },
{ selector: /^\.report-center-entry-action\.is-accent/, reason: "a pale accent button, not a selected state" },
];
test("no selected state is filled with the terracotta tint", () => {
const offenders = all
.filter((rule) => SELECTED.test(rule.selector) && TINT_FILL.test(rule.body))
.filter((rule) => !ALLOW.some((entry) => rule.selector.split(",").every((part) => entry.selector.test(part.trim()))))
.map((rule) => `${rule.file}: ${rule.selector}`);
assert.deepEqual(offenders, []);
});
test("the converted places use the neutral selected fill", () => {
const expected = [
".chat-profile-picker-row.is-selected",
".birth-time-answer-list button.is-selected",
".consult-preset-domain.is-current",
".consult-preset-chip.is-current",
".ayanamsa-preference-option[aria-checked=\"true\"]",
".profile-gender-option.is-selected",
".synastry-seg button[aria-pressed=\"true\"]",
".ephemeris-events-date[aria-current=\"date\"]",
".ephemeris-lookback-actions [aria-pressed=\"true\"]",
".learn-column-pick[aria-pressed=\"true\"]",
".chart-data-toggle.is-on",
".chart-tag[aria-pressed=\"true\"]",
".chart-chip.is-on",
".chart-yoga.is-on",
".chart-graha-table tbody tr.is-selected > *",
".chart-dasha .chart-dasha-table tbody tr.is-now > *",
".chart-board-cell.is-selected rect",
];
for (const selector of expected) {
const found = all.filter((rule) => rule.selector.split(",").some((part) => part.trim() === selector));
assert.ok(found.length > 0, `missing rule ${selector}`);
assert.ok(
found.some((rule) => /(?:background|fill)\s*:[^;]*--color-sidebar-selected/.test(rule.body)),
`${selector} is not on the neutral selected fill`,
);
}
});
test("selected text on the neutral fill is ink, not the accent", () => {
for (const selector of [
".theme-menu-item:is([data-checked], [aria-checked=\"true\"])",
".synastry-seg button[aria-pressed=\"true\"]",
".chart-chip.is-on",
".chart-tag[aria-pressed=\"true\"]",
".chart-data-toggle.is-on",
]) {
const found = all.filter((entry) => entry.selector === selector || entry.selector.split(",").some((part) => part.trim() === selector));
assert.ok(found.length > 0, `missing rule ${selector}`);
assert.ok(found.some((entry) => /(?:^|[;\s])color:\s*var\(--color-ink\)/.test(entry.body)), selector);
}
});
test("hover on an unselected borderless item is lighter than the selected fill", () => {
for (const selector of [".theme-menu-item[data-highlighted]", ".ephemeris-events-date:hover"]) {
const rule = all.find((entry) => entry.selector === selector);
assert.ok(rule, `missing rule ${selector}`);
assert.match(rule.body, /color-mix\(in srgb, var\(--color-sidebar-selected\) 55%, transparent\)/, selector);
}
});
+2 -1
View File
@@ -319,7 +319,8 @@ test("CSS: touch targets, list/detail switch below 1024, two columns at 1024", (
assert.ok(minHeight(".people-archive-secondary") >= 44);
assert.match(css, /@media \(max-width: 1023px\) \{[\s\S]*?\.people-archive\[data-view="list"\] \.people-archive-detail,\s*\.people-archive\[data-view="detail"\] \.people-archive-list \{ display: none; \}/);
assert.match(css, /@media \(min-width: 1024px\) \{\s*\.people-archive \{ grid-template-columns:/);
assert.match(cssDeclarations(".people-archive-row.is-current", css), /var\(--color-action-strong\)[\s\S]*var\(--color-action-soft\)/);
// 原值:var(--color-action-soft)(陶土色浅底);新值:var(--color-sidebar-selected)(中性选中底);原因:负责人 2026-11-20 定所有选中状态用中性底色,不用红棕色(BUG-2087)。
assert.match(cssDeclarations(".people-archive-row.is-current", css), /var\(--color-action-strong\)[\s\S]*var\(--color-sidebar-selected\)/);
assert.match(cssDeclarations(".people-archive-time.is-rectified", css), /var\(--color-success\)/);
for (const tone of PEOPLE_AVATAR_TONES) {
assert.match(cssDeclarations(`.people-archive-avatar.is-${tone}`, css), new RegExp(`var\\(--color-element-${tone}\\)`));
@@ -204,5 +204,6 @@ test("CSS: the choices are 44px touch targets and every new class has a rule", (
assert.match(css, new RegExp(`\\.${name}(?![a-z-])[^{]*\\{`), name);
}
assert.match(css, /\.profile-gender-option \{[^}]*min-height: 44px/);
assert.match(css, /\.profile-gender-option\.is-selected \{[^}]*var\(--color-action-soft\)/);
// 原值:var(--color-action-soft)(陶土色浅底);新值:var(--color-sidebar-selected)(中性选中底);原因:负责人 2026-11-20 定所有选中状态用中性底色,不用红棕色(BUG-2087)。
assert.match(css, /\.profile-gender-option\.is-selected \{[^}]*var\(--color-sidebar-selected\)/);
});
@@ -87,7 +87,8 @@ test("the control lives in the account menu and keeps menu semantics", async ()
// 新值:勾不画出来,当前项是浅主题色底、图标主题色;每格用 aria-label 叫出名字。
// 原因:2026-11-03 头像菜单改版原型,外观改成一行三个图标的分段控件,单选语义不变。
assert.match(globalStyles, /\.theme-menu \[data-slot="dropdown-menu-radio-item-indicator"\] \{[^}]*display: none/);
assert.match(globalStyles, /\.theme-menu-item:is\(\[data-checked\], \[aria-checked="true"\]\) \{[^}]*background: var\(--color-action-soft\)[^}]*color: var\(--color-action\)/);
// 原值:var(--color-action-soft)(陶土色浅底);新值:var(--color-sidebar-selected)(中性选中底);原因:负责人 2026-11-20 定所有选中状态用中性底色,不用红棕色(BUG-2087)。
assert.match(globalStyles, /\.theme-menu-item:is\(\[data-checked\], \[aria-checked="true"\]\) \{[^}]*background: var\(--color-sidebar-selected\)[^}]*color: var\(--color-ink\)/);
for (const label of ["浅色", "深色", "跟随系统"]) assert.match(menu, /aria-label=\{option\.label\}/, label);
const h = createClientLifecycleHarness();