Skip to content

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

Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
fix/lock-icon-visibility-12237
Draft

fix: improve lock icon visibility in API config popover#12239
roomote-v0[bot] wants to merge 1 commit intomainfrom
fix/lock-icon-visibility-12237

Conversation

@roomote-v0
Copy link
Copy Markdown
Contributor

@roomote-v0 roomote-v0 Bot commented Apr 30, 2026

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
@roomote-v0 roomote-v0 Bot force-pushed the fix/lock-icon-visibility-12237 branch from 556d703 to 650f52a Compare April 30, 2026 13:30
@roomote-v0 roomote-v0 Bot 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 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.

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

1 participant