Skip to content

fix(web): repair API keys table layout and button styles - #6

Merged
foxzi merged 4 commits into
mainfrom
api-keys-frontend
Sep 9, 2026
Merged

fix(web): repair API keys table layout and button styles#6
foxzi merged 4 commits into
mainfrom
api-keys-frontend

Conversation

@Bafomet111

Copy link
Copy Markdown
Collaborator

исправлена вёрстка апи ключей

- 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)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-expanded state 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.

Comment thread internal/web/static/css/style.css
Comment thread internal/web/views/apikeys_list.html Outdated
- darken btn-warning/btn-success hover colors for 4.5:1 contrast
- add aria-expanded and aria-label to domain disclosure button

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 (--success is 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

Comment thread internal/web/static/css/style.css
Comment thread internal/web/views/apikeys_list.html Outdated
Comment thread internal/web/views/apikeys_list.html
- use dark labels on btn-warning and btn-success in both states
- use primary-dark background for domain badges

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 extraCount is 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

Comment thread CHANGELOG.md Outdated
Comment thread internal/web/views/apikeys_list.html Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

All reviewed changes are focused, and no unresolved issues were found.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@foxzi
foxzi merged commit 8afb58f into main Sep 9, 2026
6 checks passed
@foxzi
foxzi deleted the api-keys-frontend branch September 9, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants