Skip to content

Fix: QR code should be blurred by default in settings (matching token)#194

Merged
StephaneDelcroix merged 1 commit intomainfrom
fix/in-the-settings-the-token-is-blurred-by-20260223-1438
Feb 23, 2026
Merged

Fix: QR code should be blurred by default in settings (matching token)#194
StephaneDelcroix merged 1 commit intomainfrom
fix/in-the-settings-the-token-is-blurred-by-20260223-1438

Conversation

@StephaneDelcroix
Copy link
Collaborator

Problem

In the settings page, the token value is correctly blurred by default (when showToken is false), but the QR code images are always shown unblurred. Since the QR code encodes the token, this defeats the purpose of blurring the token.

Fix

  • Added the same showToken-based blurred CSS class to both QR code <img> elements (tunnel and direct sharing)
  • Added CSS blur styles for .qr-code img.blurred with transition and hover partial-reveal (matching the token's blur UX)

Changes

  • Settings.razor: Both QR code img tags now use class="@(showToken ? "" : "blurred")"
  • Settings.razor.css: New .qr-code img.blurred and :hover rules with filter: blur()
  • QrCodeBlurTests.cs: 6 unit tests verifying the blur markup and CSS contracts
  • mode-switch-scenarios.json: UI scenario for QR code blur toggle

The token value was correctly blurred by default (showToken=false), but the
QR code images (tunnel and direct) were always shown unblurred, exposing the
encoded token. Now both QR code images use the same showToken toggle to apply
a CSS blur filter, matching the token's behavior.

Changes:
- Settings.razor: Add blurred class to both QR code img elements based on showToken
- Settings.razor.css: Add blur styles for .qr-code img.blurred with hover reveal
- QrCodeBlurTests.cs: 6 tests verifying blur markup and CSS contracts
- mode-switch-scenarios.json: UI scenario for QR code blur toggle

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@StephaneDelcroix StephaneDelcroix merged commit 6ecb48a into main Feb 23, 2026
@StephaneDelcroix StephaneDelcroix deleted the fix/in-the-settings-the-token-is-blurred-by-20260223-1438 branch February 23, 2026 15:18
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
## Summary

Two changes to improve the Squad-based PR review workflow.

### How to use

1. Click **+** in the sidebar → select **PR Review Squad** from "📂 From
Repo"
2. Click the **orchestrator** session
3. Send: `Review PRs #194, #193, #191, #192, #190`
4. The orchestrator assigns 1 PR per worker, each worker dispatches 5
sub-agents across different models, and the orchestrator produces a
summary table with verdicts

The mode is automatically set to **Orchestrator** via `mode:
orchestrator` in `team.md` — no manual mode selection needed.

### Example output

The orchestrator produces a summary table like:

| PR | Verdict | Key Issues |
|----|---------|------------|
| #194 | ⚠️ Needs changes | cursor:pointer without click handler,
brittle test regex |
| #193 | ⚠️ Needs changes | Incomplete state sync → infinite unthrottled
renders |
| #191 | ✅ Ready to merge | Clean — concerns were pre-existing patterns
|
| #192 | ⚠️ Needs changes | GC-finalization test unreliable, flaky IP
test |
| #190 | ⚠️ Needs changes | Tests don't guard actual regression |

Each worker's detailed report includes only issues flagged by 2+ models
(consensus filter), with file:line references and severity ratings.

---

### 1. Restructure PR Review Squad for multi-model consensus

Replaces 5 specialized reviewers (bug-hunter, security-analyst, etc.)
with 5 generic reviewers that each independently perform a full
multi-model consensus review.

Each worker:
1. Fetches the PR diff via `gh pr diff` / `gh pr view`
2. Dispatches 5 parallel sub-agent reviews across different models:
   - 2× `claude-opus-4.6` (deep bug analysis + architecture review)
   - 1× `claude-sonnet-4.6` (correctness + edge cases)
   - 1× `gemini-3-pro-preview` (security focus)
   - 1× `gpt-5.3-codex` (code quality + logic errors)
3. Synthesizes findings using a consensus filter (2+ models must flag an
issue)
4. Produces a severity-ranked report with file:line references and a
verdict

### 2. Support `mode:` field in team.md

`SquadDiscovery` now reads an optional `mode:` line from `team.md` to
set the multi-agent mode automatically. Previously hardcoded to
`OrchestratorReflect`.

Supported values: `broadcast`, `sequential`, `orchestrator`,
`orchestrator-reflect`

```markdown
# My Team
mode: orchestrator
```

### Tests
- 6 new tests for `ParseMode` covering all modes + case insensitivity +
default behavior
- All tests pass

---------

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

1 participant