Repository navigation
fix(sidebar): show hover on danger buttons and keep a pending PC removal readable in every theme - #1891
Conversation
…oval readable in every theme (#1424, #1416, #1585) - A hovered danger button keeps its tint and border token and draws that border twice as thick, so ConfirmDialog, DevicesPanel and Remove PC show the pointer again (#1424). - A pending PC removal keeps its full strength instead of 0.85: dimmed, its text fell under 4.5:1 in Tokyo Night (3.89:1) and other theme blocks, and still did at 0.9 (4.18:1). The removal regression now measures it in every theme block of its mode, not only the two defaults, and checks that hover draws the button's own border color inside it (#1416). - DESIGN.md: a one-line PC control is --touch-target tall on a coarse pointer (#1424), and the composer's New tab button is for a mouse-driven window wider than 640px, as its query and Settings have it (#1585). The settings test keeps the behavioural checks only (#1585).
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Danger-button styling and regression checks src/components/Machines.css, src/styles.css, scripts/sidebar-machine-removal-demo-regression.ts, DESIGN.md |
Busy danger buttons now remain fully opaque. Hover adds an inset ring while retaining the danger tint and border. The regression script checks hover styling, pending-removal opacity, and danger contrast across matching palettes. |
Responsive control specifications and settings checks DESIGN.md, src/lib/settings.test.ts |
The design documentation specifies touch-target height for coarse-pointer SSH controls and limits the New tab button and its Settings toggle to mouse-driven windows wider than 640px. The settings test removes declaration assertions and retains sanitizer checks. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related issues
devswha/herdr-web-ui#1585: The documentation updates and retained sanitizer checks match the issue’s New tab toggle and settings-test objectives.
Suggested reviewers: snowykr, yoonwoo-ha
Merge Risk: 
Minimal · up to cf9d7
-
The PR is mergeable with no identified functional or operational blocker.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Check name Status Explanation Title check The title clearly summarizes the main changes: restored hover feedback for danger buttons and preserved readability during pending PC removal. Linked Issues check Scope: #1424,#1416and#1585are direct, open links. All coding requirements were checked against the whole-PR diff (merge base 3597f45 to head cf9d7a7).
1. Hover feedback [#1424item 3;#1416item …Out of Scope Changes check Every changed hunk maps to a linked issue or to its direct support:
- src/styles.css: adds the inset hover ring to .btn-danger:hover:not(:disabled). This is#1424item 3 and#1416item 3.
- src/compon…Description check The description follows the template's two sections, Change and Validation. The Change section states the problem and resulting behavior for each linked issue ( #1424,#1416,#1585), and the Validation…Full details: Linked Issues check
-
Explanation
Scope:
#1424,#1416and#1585are direct, open links. All coding requirements were checked against the whole-PR diff (merge base 3597f45 to head cf9d7a7).-
Hover feedback [
#1424item 3;#1416item 3]. Verified in src/styles.css. Inside@media(hover: hover), .btn-danger:hover:not(:disabled) keeps var(--danger-tint) and border-color var(--status-blocked). It adds box-shadow: inset 0 0 0 var(--hairline) var(--status-blocked). The border therefore draws about twice as thick, and the danger color stays. This meets the issue's request for a stronger hover border that keeps the color. -
Pending PC removal contrast [
#1416item 2;#1416item 1]. Verified in src/components/Machines.css. The rule .machine-controls .btn-danger[aria-busy="true"] changes from opacity 0.85 to 1. The base value failed 4.5:1 in several themes, including Tokyo Night. The PR also replaces the DESIGN.md claim 'only lightly dimmed' (per the whole-PR summary). The issue allows either limiting 0.85 to a pending delete or correcting the DESIGN.md sentence. The PR takes both routes for the pending case. Per the PR description and the summary of scripts/sidebar-machine-removal-demo-regression.ts, the regression now measures every theme block of the mode and checks that the confirm button stays at opacity 1 while Rename dims. I did not re-run the script. -
Coarse-pointer height and New tab wording [
#1424item 4;#1585]. The whole-PR summary states that DESIGN.md now gives touch-target height for one-line PC controls on coarse pointers. It also states that the New tab toggle is limited to mouse-driven windows wider than 640px, matching the composer query. I did not read the DESIGN.md hunk directly. This assessment relies on the whole-PR summary. -
Settings test [
#1585]. src/lib/settings.test.ts drops two declaration-restating assertions (DEFAULT_SETTINGS.composerNewTabButton and SETTING_SCOPE). It keeps the behavioural checks: default false, accepts true, rejects the string "true", and is not shared. This matches the issue. -
Items already on main [
#1424items 1 and 2;#1416items 1, 3 and 4 (per PR)]. At head, scripts/sidebar-machine-layout-demo-regression.ts groups buttons by vertical overlap, not by top edge alone. It also asserts a shared Rename row at 520px. The PR does not change this file. I accept these as existing implementation at the reviewed head, per the PR's statement that#1732and#1422fixed them. The opacity-equals-0.85 assertion named in#1416item 4 was not re-verified in this review.
Unresolved: test results and screenshots are reported by the author. I did not run them. The DESIGN.md wording is assessed from the whole-PR summary only.
-
Full details: Out of Scope Changes check
-
Explanation
Every changed hunk maps to a linked issue or to its direct support:
- src/styles.css: adds the inset hover ring to .btn-danger:hover:not(:disabled). This is
#1424item 3 and#1416item 3. - src/components/Machines.css: changes the pending-removal opacity from 0.85 to 1 and updates its comment. This is
#1416items 1 and 2. - scripts/sidebar-machine-removal-demo-regression.ts: adds hover, ring, pending-removal and per-theme contrast checks. This supports
#1416items 1, 2 and 4 and#1424item 3. - src/lib/settings.test.ts: removes two declaration-restating assertions. This is
#1585. - DESIGN.md (per whole-PR summary): updates the wording for
#1424item 4,#1416item 1 and#1585.
No unrelated feature code, refactoring or dependency change appears in the summary. The layout regression script is not modified by this PR. The PR does not add unrelated behaviour.
- src/styles.css: adds the inset hover ring to .btn-danger:hover:not(:disabled). This is
Full details: Description check
-
Explanation
The description follows the template's two sections, Change and Validation. The Change section states the problem and resulting behavior for each linked issue (
#1424,#1416,#1585), and the Validation section lists the checks run and their results. The author also explains which items were already fixed on main. The description is thorough, though it is long and it does not link a maintainer-agreed issue for the New tab feature beyond#1585itself.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (3 skipped: 3 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 2
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Merge pass: the code review passes and the PR is queued; it merges once its browser CI is green. One small request, which needs no push: the PR body gives the issue as the reason for the hover ring. Please add one sentence naming its design precedent, as AGENTS.md asks for a UI fix. DESIGN.md already cites T3 Code's outlined destructive button in that paragraph. |
|
Done, with no push: the hover bullet in the PR body now names its design precedent. That is T3 Code's |
|
Merge pass review-work report. Overall: PASSED. The change is CSS, DESIGN.md and a regression only. Under the maintainer's token rule it merges on the code review, the merge pass's own check and CI, without the gate reviewer.
What was checked
Follow-ups (LOW)
All required checks are green and no review thread is open. |
Fixes #1424
Fixes #1416
Fixes #1585
These three are grouped because they share
DESIGN.mdand the danger-button styles. The parts already fixed on main are left alone:Changes
--status-blockedborder, and draws that border twice as thick (an inset ring in the same color). Before, ConfirmDialog, DevicesPanel and Remove PC showed no hover at all. The change keeps the danger color, as the issue asked, and does not bring back the neutral fill. The design precedent is T3 Code'sdestructive-outlinebutton (button.tsx), which DESIGN.md already cites in this paragraph: on hover it strengthens its border and tint in the destructive color (border-destructive/32,bg-destructive/4) instead of switching to a neutral fill. This ring does the same with herdr's danger tokens; no code is borrowed.--touch-targettall on a coarse pointer, where Rename keeps its own line.--bg-elevated, any dimming that still reads as dimmed fails some theme. Tokyo Night dark is the worst: 3.89:1 at 0.85, 4.18:1 at 0.9, and only 0.97 reaches 4.5:1.aria-busy.DESIGN.mdsays so in place of "only lightly dimmed".(max-width: 640px), (pointer: coarse)query. Settings does not offer the toggle on a touch screen or a narrow window.settings.test.tskeeps only the behavioural checks.Verification
bun test src/lib/settings.test.ts: passes.bun run typecheck: passes.bun scripts/sidebar-machine-removal-demo-regression.ts(throughdori heavy): PASS for dark and light. The pending removal measured in all 22 theme blocks has text at 4.78:1 at the lowest (Tokyo Night dark, Solarized light) and borders at 4.78:1 or above. Hover draws the inset ring in the button's own border color.bun scripts/sidebar-machine-layout-demo-regression.ts: PASS in all 14 scenarios, among them desktop 240px and 520px sidebars, a 320px phone, a 390px phone and an 844×390 landscape, in dark and light, and in Korean, Japanese and Chinese. I looked at the screenshots for desktop 240 dark (armed), phone 320 light (armed) and the dark pending removal: the pending Confirm remove PC stays at full strength and readable while Rename and Disconnect dim beside it, and the phone panel fits a 320px drawer.omo-native-code-reviewerran the regression and caught that 0.9 still failed Tokyo Night (4.18:1); the pending removal now keeps full strength. Its LOWs are applied: the ring uses--hairline, and the check asserts that hover draws the button's own border color, inset. It found no clash with focus rings or other.btnbox-shadows, confirmed the DESIGN.md wording againstComposer.tsxandSettingsDialog.tsx, and found that the settings-test trim loses no behaviour check.bun run check fast(throughdori heavy) on cf9d7a7:status: success, verificationverified.The pending-removal treatment follows T3 Code's outlined destructive button, as DESIGN.md already cites for PC removal: the warning stays fully legible while the action runs, and only the unrelated controls dim. No code is borrowed.