fix(web/style): activity-chip hover/disabled use theme vars (dark mode)#105
Merged
Merged
Conversation
…e fix) Hard-coded #E5E9EF / #F1F4F8 / #A4ADB8 didn't flip under prefers-color-scheme: dark, leaving pale-white pills on dark surface. Same class of bug as icon-rail dark active and xiaof portal text-invisible. - hover bg: #E5E9EF -> var(--surface-hover) - disabled bg: #F1F4F8 -> var(--surface-2) - disabled fg: #A4ADB8 -> var(--text-soft), + opacity .7 - base fg: var(--chip-text) (undefined) -> var(--text)
🤖 bot-review (comment-only · phase 1)Diff: Red-line checks:
Phase 2: auto-approve + auto-merge fire only when red-lines are clean, author is internal, and no needs-human path is touched. Block with |
SymbolStar
added a commit
that referenced
this pull request
Jun 25, 2026
* feat: interrupt router dispatch via ✖ on thinking chips
Adds a stable, observable mechanism to cancel an in-flight agent turn:
- New STATUS_PHASES value 'cancelled'; chips can transition from
thinking|running → cancelled via the new endpoint.
- POST /api/threads/<tid>/posts/<chip_id>/cancel
* idempotent (already-cancelled → 200; terminal phases → 409 already_completed)
* patches chip phase to 'cancelled'
* marks chip in post_router._cancelled_chips so a late agent reply
is silently dropped at the router boundary (router is single
source of truth for what lands in the thread)
* best-effort SIGTERMs the bound subprocess group for both native
openclaw agent and ACP CLI employees
* posts a __router__ audit line so the thread explains itself
- agent_runtime.cancel_chip_subprocess + acp_runtime.cancel_acp_chip_subprocess
expose chip_id → pgid maps for the endpoint to nudge the right group.
- Worker (post_router._route_to_agent) checks is_cancelled() in two
spots: on AgentError (so a SIGTERM-induced non-zero exit becomes
'cancelled' instead of 'failed') and after a successful reply (late
cancel drops the reply).
- ACP runtime switched from subprocess.run → Popen+communicate so the
cancel path can SIGTERM the pgid; old timeout/failure semantics preserved.
UI (per @designer spec):
- ✖ button on thinking/running chips. Default opacity .45, hover full
opacity + --danger color, 28×28 hit area (visual 16×16 with transparent
padding), no confirm dialog. Touch (hover:none) keeps opacity 1.
- 'cancelled' phase renders as a low-key ⛔ pill, --text-soft only.
- Optimistic UI: click flips chip to 'cancelled' instantly with a brief
strike-through animation; SSE/refresh reconciles. 409 path rolls back.
- All colors via CSS tokens (--danger / --text-soft); no hex (PR #105
activity-chip lesson).
Tests:
- 3 new tests in tests/test_status_chip.py covering the happy path,
idempotency, and terminal-phase rejection.
- tests/test_acp_runtime.py updated to fake Popen instead of run.
* fix(web): dark-mode polish on cancel chip per designer review
Two fixes from blind read-through (light OK, dark weak):
1. asc-cancelling strike-through invisible in dark.
Old: text-decoration: line-through; opacity: .7 on already --text-soft
text — the strike was lighter than the text. Lost the 'click landed'
feedback that the optimistic 0ms morph depends on.
New: animation pulls .asc-phase color up to var(--text) + 2px
strike-thickness for ~600ms, then eases back to --text-soft so the
final cancelled pill still rests at low-key gravity.
2. asc-cancel:hover background looked 'swallowed' in dark.
Old: --danger-soft (#3A1818) is too close to the deep bg; the red
circle had hue but no punch.
New: --danger-soft-strong token (rgba(.., .22) in dark, .16 in light)
used only by the hover circle. Light/dark each get their own value
so the red 'lifts' off the surface uniformly.
Both fixes go through tokens — zero hex literals in component CSS.
---------
Co-authored-by: Judy <judy@symbolstar.local>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Activity 顶部 4 个 chip 在 dark mode 下出现大块浅白胶囊,原因是
.activity-chip的 hover/disabled 三个颜色写死 light 字面值不跟 theme 走。和之前 icon-rail dark active / xiaof portal 文字隐身同类坑。Patch —
web/style.css一处:#E5E9EF→var(--surface-hover)#F1F4F8→var(--surface-2)#A4ADB8→var(--text-soft)+opacity: .7var(--chip-text)(未定义)→var(--text)Designer 在 headless Edge dark mode 下截图自验过:浅白胶囊消失、All 蓝色选中态清晰、三个 disabled 弱化但可读。
Thread: th_19efda01978_a45ea6
Diagnosis & mock: @dora