Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

fix: improve lock icon visibility in API config popover - #12239

Draft
ghost wants to merge 1 commit into
mainfrom
fix/lock-icon-visibility-12237
Draft

fix: improve lock icon visibility in API config popover#12239
ghost wants to merge 1 commit into
mainfrom
fix/lock-icon-visibility-12237

Conversation

@ghost

@ghost ghost commented Apr 30, 2026

Copy link
Copy Markdown

Related GitHub Issue

Closes: #12237

Description

This PR attempts to address the lock icon visibility issues reported in Issue #12237. The user reported that the lock/unlock icon in the API Configuration popover is effectively invisible and provides no hover feedback.

Changes:

  • Replaced the subtle IconButton (which used opacity-60 for the unlocked state) with a more visible Button that includes a text label ("Locked" / "Unlocked") next to the icon
  • Uses text-vscode-descriptionForeground with opacity-90 instead of opacity-60 for the unlocked state, making it visible on all themes
  • Uses text-vscode-focusBorder for the locked state (highlighted)
  • Includes a StandardTooltip explaining the lock function on hover
  • Ensures cursor: pointer is always present via explicit class
  • Added i18n keys for "locked"/"unlocked" labels in all 18 locales
  • Updated tests to match new styling

Feedback and guidance are welcome.

Test Procedure

  • Run cd webview-ui && npx vitest run src/components/chat/__tests__/ApiConfigSelector.spec.tsx -- all 21 tests pass
  • Run cd webview-ui && npx vitest run src/components/chat/__tests__/ChatTextArea.lockApiConfig.spec.tsx -- all 5 tests pass
  • Manual: Open the API Configuration popover in the chat panel. The lock button should now show "Unlocked" (with icon) in a visible muted color, or "Locked" (with icon) in a highlighted color. Hovering should show a tooltip and pointer cursor.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue.
  • Scope: Changes are focused on the linked issue.
  • Self-Review: Performed a thorough self-review.
  • Testing: Updated tests to cover changes.
  • Contribution Guidelines: Read and agree to the Contributor Guidelines.

- Replace subtle IconButton with a visible Button + text label ("Locked"/"Unlocked")
- Use text-vscode-descriptionForeground instead of opacity-60 for unlocked state
- Add StandardTooltip explaining the lock function on hover
- Ensure cursor:pointer is always present
- Add i18n keys for "locked"/"unlocked" labels in all 18 locales
- Update tests to match new styling classes
@ghost
ghost force-pushed the fix/lock-icon-visibility-12237 branch from 556d703 to 650f52a Compare April 30, 2026 13:30
@ghost ghost changed the title fix: improve lock icon visibility in API config popover and add Settings toggle fix: improve lock icon visibility in API config popover Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Selected model should never change unless the end-user changes it (i.e. when switching modes)

1 participant