fix(web): repair API keys table layout and button styles - #6
Conversation
- Collapse long allowed-domains lists to 3 badges with a +N toggle
- Fix invisible domain badges: .badge-info used undefined --accent var
- Keep td.actions a table cell: global .actions{display:flex} broke
row layout on every list page with an actions column
- Add missing .btn-success styles and hover states for
.btn-warning/.btn-success (white-on-white text on hover)
There was a problem hiding this comment.
🟡 Changes recommended
Two moderate accessibility issues must be resolved before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Repairs the API-key table layout and improves domain and action controls.
Changes:
- Collapses excess domain badges behind a toggle.
- Restores table-cell action layout.
- Adds warning and success button styles.
Required fixes:
- Improve the warning button’s hover contrast.
- Add an accessible name and synchronized
aria-expandedstate to domain toggles.
File summaries
| File | Description |
|---|---|
internal/web/views/apikeys_list.html |
Adds domain collapsing and badge styles. |
internal/web/static/css/style.css |
Fixes action cells and adds button variants. |
Review details
Suppressed comments (2)
internal/web/static/css/style.css:792
- The new success button colors do not provide sufficient contrast for white text:
--success(#10b981) is about 2.6:1 and the hover color is about 4.5:1, while normal-size text requires at least 4.5:1. Use darker green shades for both states.
.btn-success {
background: var(--success);
border-color: var(--success);
color: white;
}
.btn-success:hover {
background: #059669;
border-color: #059669;
color: white;
}
internal/web/views/apikeys_list.html:340
- These 12px badge labels render white on
--primary(#3b82f6), which has only about 3.7:1 contrast and misses the 4.5:1 minimum for normal-size text. Use a darker blue so domain names remain readable.
.badge-info {
background: var(--primary);
color: white;
font-size: 0.75rem;
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- darken btn-warning/btn-success hover colors for 4.5:1 contrast - add aria-expanded and aria-label to domain disclosure button
There was a problem hiding this comment.
🟡 Changes recommended
The moderate accessibility and color-contrast issues must be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
internal/web/static/css/style.css:785
- White text on the new success backgrounds does not reach 4.5:1 contrast (
--successis about 2.5:1 and the hover color about 3.8:1). Use a dark label for both states so the API-key Activate action remains readable at its 0.75rem size.
.btn-success {
background: var(--success);
border-color: var(--success);
color: white;
- Files reviewed: 3/3 changed files
- Comments generated: 3
- Review effort level: Balanced
- use dark labels on btn-warning and btn-success in both states - use primary-dark background for domain badges
There was a problem hiding this comment.
🟡 Changes recommended
The changelog claim and singular domain label should be corrected before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
internal/web/views/apikeys_list.html:234
- The expanded label similarly becomes “Hide 1 extra domains” for four-domain keys. Select the singular noun when
extraCountis one.
btn.setAttribute('aria-label', collapsed ? 'Hide ' + extraCount + ' extra domains' : 'Show ' + extraCount + ' more domains');
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Balanced
исправлена вёрстка апи ключей