Add independent reveal buttons for QR codes in Settings#197
Merged
StephaneDelcroix merged 1 commit intomainfrom Feb 23, 2026
Merged
Conversation
The QR code blur was tied to the token's showToken toggle, so the only way to unblur a QR code was to reveal the token first. Now each QR code (DevTunnel and Direct Sharing) has its own eye-icon reveal button and independent state (showQrCode / showDirectQrCode), matching the UX pattern already used for the access token. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen
added a commit
that referenced
this pull request
Feb 23, 2026
…wQrCode/showDirectQrCode) PR #194 introduced QR blur using showToken, but PR #197 subsequently replaced that with independent showQrCode/showDirectQrCode variables and dedicated qr-reveal-btn buttons. The tests were left asserting the old showToken-based behaviour, causing them to fail against current main. - Update QrCodeImages_UseBlurredClassFromShowTokenToggle to match the two independent variables (showQrCode, showDirectQrCode) with specific patterns per img src, replacing the fragile count-based regex check - Update TokenValue_UsesBlurredClassFromShowTokenToggle to assert the blur expression is specifically on the token-value element (not just anywhere in the file), preventing false positives from QR img tags - Extend ShowToken_DefaultsFalse to also verify showQrCode and showDirectQrCode default to false - Fix settings-qr-code-blur scenario: click .qr-code .qr-reveal-btn (not .tunnel-token .copy-btn) and assert QR+token are independent Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen
added a commit
that referenced
this pull request
Feb 23, 2026
…low-up to #194) (#199) ## Problem PR #194 introduced QR code blur using `showToken`. PR #197 subsequently replaced that with independent `showQrCode`/`showDirectQrCode` variables and dedicated `qr-reveal-btn` buttons. The tests added in #194 were left asserting the old `showToken`-based behaviour, causing them to fail against current `main`. ## Fixes - **`QrCodeImages_UseBlurredClassFromShowTokenToggle`** → renamed to `QrCodeImages_UseBlurredClassFromIndependentQrToggles`: replaces the count-based regex with two specific patterns matching `showQrCode` and `showDirectQrCode` per their respective `src` attributes - **`TokenValue_UsesBlurredClassFromShowTokenToggle`**: changed from `Assert.Contains` anywhere in the file to `Assert.Matches` scoped to the `token-value` element — prevents false positives now that QR `<img>` tags also contain blur expressions - **`ShowToken_DefaultsFalse`**: extended to also assert `showQrCode` and `showDirectQrCode` default to false - **`settings-qr-code-blur` scenario**: updated to click `.qr-code .qr-reveal-btn` (not `.tunnel-token .copy-btn`) and to verify QR and token toggles are independent (QR revealed, token still blurred) --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The QR code blur state was coupled to the token's
showTokentoggle. Users had to reveal the access token just to see the QR code, which is a privacy concern (the token is more sensitive than the QR code).Fix
showQrCodeandshowDirectQrCodeboolean fieldsChanges
Settings.razor: Added reveal buttons next to QR codes, using separate state booleansSettings.razor.css: Added.qr-reveal-btnstyling