UpsellDialog: open the ProfileSwitcher upsell in it, close it on Escape (#451) #493

Merged
maximus merged 5 commits from issue-451-upsell-dialog-escape into main 2026-10-24 18:11:05 +00:00
Owner

Resolves #451

Generated autonomously by /autopilot run of 2026-10-23

Stack

Link 4 of 4 (head of the stack) of milestone planned-2026-10-23-gardes-tests-front: #480 (PR #490) → #478 (PR #491) → #467 (PR #492) → #451 (this PR). Base: issue-467-confirm-behaviour-tests (PR #492, head 719588f). Merge bottom-up.

Summary

  • ProfileSwitcher no longer has its own copy of the upsell window: a locked profile opens <UpsellDialog feature="multi-profile" onClose={() => setShowUpsell(false)} />. Same feature, same required tier (requiredTierFor inside UpsellDialog), same closings (the X, and « J'ai déjà une clé » through onNavigate; the purchase button leaves it open, a click on the backdrop does not close it), same classes. What it gains: role="dialog", aria-modal, an accessible name (upsell.title), a close button with type="button" and aria-label (common.close), and Escape. Imports X, requiredTierFor and UpsellGate gone; Lock, ChevronDown, Settings kept.
  • UpsellDialog closes on Escape: a useEffect with a keydown listener on document, removed in the cleanup, dependency [onClose], the pattern of TransactionDetailModal. Its docblock names both hosts; the onNavigate comment of UpsellGate.tsx names UpsellDialog as the modal host.
  • No i18n key added or changed (upsell.title, common.close, license.editions.*, upsell.features.multi-profile exist in both files).

Files

File Change
src/components/profile/ProfileSwitcher.tsx upsell window replaced by UpsellDialog, three imports dropped
src/components/shared/UpsellDialog.tsx Escape effect, docblock
src/components/shared/UpsellGate.tsx comment of onNavigate (modal hosts)
src/components/shared/UpsellDialog.render.test.tsx onto the harness (vi.mock("react", …fakeReact…), direct calls wrapped in harness.render), shared find, five Escape tests
src/components/profile/ProfileSwitcher.wiring.test.ts new, on the harness
CHANGELOG.md, CHANGELOG.fr.md one Changed / Modifié line
docs/architecture.md UpsellDialog row of the gating table; harness users 25 → 27; elementTree paragraph (two new users, fifteen local copies left)
STATE.md one sub-bullet under « Vérifications dues à la release suivante »

Tests

UpsellDialog.render.test.tsx (3 → 8 tests):

  • the three existing tests kept: the static render (role, aria-modal, accessible name, texts, aria-label of the X), still by renderToStaticMarkup under the harness mock; the X and onNavigate = onClose; balance → premium;
  • Escape, without DOM: vi.stubGlobal("document", { addEventListener: vi.fn(), removeEventListener: vi.fn() }), harness.commit(), then the captured listener called with a key. The listener is added at commit, not during the render, on keydown; Escape → onClose once; Enter, space, Tab, a → never; harness.unmount() → removeEventListener("keydown", <the same function>); a new onClose at the next render → the old listener removed, the new one calls the new onClose and not the old one (the [onClose] dependency). Globals unstubbed after each test.

ProfileSwitcher.wiring.test.ts (new, 3 tests): mocks ProfileContext (useProfile), useEntitlement and react-i18next (i18nMock); react-router-dom needs no mock, since no hook of it is called (children stay elements). Nothing opens before a click. In Free, a click on the toggle (the button that holds the ChevronDown), then on the locked profile (keyed second, titled t(nav.locked)), renders one UpsellDialog element with feature="multi-profile", no UpsellGate element, the menu closed and no switch; its onClose closes it. In Base, the same click switches to second and opens nothing. No harness.commit(): the switcher's effect would add a mousedown listener to a document the node environment does not have.

Counts: vitest 161 files / 2610 tests on the base → 162 files / 2618 tests on this head. npm run build green. Probe: sonde rc=1 (src/zz_tmp_probe.test.ts, one failing expect, deleted). i18n-mock-guard and native-dialog-guard green in the full run.

Mutation proofs

Implementation committed first (1a0070b, b8637c6); one mutation at a time, restored by git checkout -- <file>, git status --short empty after each. Run on the two test files above (11 tests), M16 on ProfileSwitcher.wiring.test.ts alone (3 tests).

# File Mutation Failing tests Exit
M1 UpsellDialog.tsx document.addEventListener("keydown", …) removed (listener never added) 5 / 11 1
M2 UpsellDialog.tsx cleanup return () => document.removeEventListener(…) removed 2 / 11 1
M3 UpsellDialog.tsx if (e.key === "Escape") removed (any key closes) 1 / 11 1
M4 UpsellDialog.tsx dependency [onClose] → [] (stale onClose) 1 / 11 1
M5 UpsellDialog.tsx "keydown" → "keyup" 5 / 11 1
M6 UpsellDialog.tsx role="dialog" removed (the static render is still read under the harness) 1 / 11 1
M7 UpsellDialog.tsx the X gets onClick={() => {}} 1 / 11 1
M8 UpsellDialog.tsx onNavigate={() => {}} 1 / 11 1
M9 ProfileSwitcher.tsx the base file back (old markup, with a direct UpsellGate) 1 / 11 1
M10 ProfileSwitcher.tsx feature="adjustments" 1 / 11 1
M11 ProfileSwitcher.tsx onClose={() => {}} 1 / 11 1
M12 ProfileSwitcher.tsx a locked profile no longer calls setShowUpsell(true) 1 / 11 1
M13 ProfileSwitcher.tsx handleSelect no longer closes the menu 1 / 11 1
M14 ProfileSwitcher.tsx a direct UpsellGate rendered next to the UpsellDialog (red on « no UpsellGate element ») 1 / 11 1
M15 UpsellDialog.tsx listener added during the render, only its removal left in an effect 4 / 11 1
M16 ProfileSwitcher.tsx if (isLocked(profile)) → if (true) 1 / 3 1

The four mutations the plan names (listener never added, cleanup removed, Escape condition removed, ProfileSwitcher back to the old markup) are M1, M2, M3 and M9.

Decisions

  • [MEDIUM] The wiring test opens the dialog by clicks in the rendered tree (the toggle, then the locked profile), not by presetting showUpsell through harness.slots[3] as the plan wrote. It proves more (a locked profile opens it, through handleSelect and isProfileSwitchLocked, and its onClose closes it) and does not depend on the order of the switcher's hooks; same choice as link 3 (#467) and TransactionTable.wiring.test.ts. Hence no entry in « Préréglages actuels » of docs/architecture.md « Limites connues (#437) ». Rejected: the slot preset (one more hook-order dependency, and the click path left unproved).
  • [MEDIUM] UpsellDialog.render.test.tsx, rewritten onto the harness, uses the shared find of src/test/elementTree.ts instead of its local copy (one of the sixteen link 3 left). No other file migrated. The elementTree paragraph of architecture.md now says fifteen local copies, the count of the grep -rlE "function (find|holding)\(" src --include='*.test.*' it cites.
  • [HIGH] The UpsellDialog element is read by find(tree, (el) => el.type === UpsellDialog), not by holding, which returns the elements that hold one of that type (the plan's « holding … sert à trouver l'élément » is imprecise). holding(tree, ChevronDown) finds the toggle button.
  • [HIGH] Two assertions beyond the plan's three Escape tests, each red under its own mutation: the listener follows the latest onClose (M4), and it is added at commit, not during the render (M15). A Base-edition test is the negative control of the Free one (M16).
  • [MEDIUM] docs/guide-utilisateur.md and the docs.* keys left as they are: the guide describes neither how this window closes nor the Escape of the other windows, and nothing in it becomes false; the plan's doc work is architecture.md. Rejected: one more sentence in the guide and in both docs.* translations.
  • [HIGH] CHANGELOG wording on the plan's content (Escape from the profile switcher and from the Split button; the switcher's window a dialog for screen readers), with two corrections from the self-review (196207e): the window is named « the unlock screen that opens in a window » / « l'écran de déverrouillage qui s'ouvre dans une fenêtre », the term of the user guide and of the #369 entry, since « édition requise » is no visible label (the title reads « Fonctionnalité Base »); and screen readers « identify » / « reconnaissent » it as a dialog rather than « announce » it, since no focus moves into it on open. « the Split button » as in the #369 entry.

Vérifications manuelles dues (prochaine release)

In the Free edition (no key), in French and in English, light and dark themes:

  1. Transactions → the locked Répartition (Split adjustment) button of any row → the « Fonctionnalité Base » window opens; Escape closes it.
  2. Sidebar → profile switcher → a profile other than the active one (lock icon) → the same window: title « Fonctionnalité Base », the X at the top right closes it, Escape closes it, « J'ai déjà une clé » closes it and opens the License card (Settings → Users), « Obtenir Base » opens the product page in the browser and leaves the window open, a click on the dark backdrop does nothing.
  3. With a screen reader (Orca on Linux, Narrator on Windows), on that profile switcher window, once the reader reaches it (the focus does not move into it on open, see « Hors périmètre »): read as a dialog with its name (« Fonctionnalité Base », « Base feature »), its X read as « Fermer », « Close ».
  4. In Base, the profile switcher still switches to another profile (PIN asked when that profile has one).

Hors périmètre

  • Focus (comment 24139 of #451, 2026-10-17): on open, the focus does not move into the window, and on close it does not go back to the button that opened it, in both hosts. Neither /analyze (2026-10-19) nor /plan-run (2026-10-23) carried it into the body: not implemented here (no autoFocus, no focus return). Max decides a follow-up.

For the reviewer

  • renderToStaticMarkup under the harness mock: react-dom/server and react-router-dom are external dependencies and keep the real React (a useContext of MemoryRouter reaching the harness would throw); only the repository's components (UpsellDialog, UpsellGate, the CTA buttons) get the harness hooks, so the static render still works, and M6 shows it is read. The useEffect of UpsellDialog is captured and never run there, as in React's server render.
  • TransactionTable.wiring.test.ts counts UpsellDialog elements without calling them: untouched and green.
  • Minor case accepted by the analysis, unchanged: in TransactionTable, if the upsell opens while the keyword field has the focus, one Escape closes both (no stopPropagation).

🤖 Generated with Claude Code

Resolves #451 Generated autonomously by /autopilot run of 2026-10-23 ## Stack Link 4 of 4 (head of the stack) of milestone `planned-2026-10-23-gardes-tests-front`: #480 (PR #490) → #478 (PR #491) → #467 (PR #492) → **#451 (this PR)**. Base: `issue-467-confirm-behaviour-tests` (PR #492, head `719588f`). Merge bottom-up. ## Summary - `ProfileSwitcher` no longer has its own copy of the upsell window: a locked profile opens `<UpsellDialog feature="multi-profile" onClose={() => setShowUpsell(false)} />`. Same feature, same required tier (`requiredTierFor` inside `UpsellDialog`), same closings (the X, and « J'ai déjà une clé » through `onNavigate`; the purchase button leaves it open, a click on the backdrop does not close it), same classes. What it gains: `role="dialog"`, `aria-modal`, an accessible name (`upsell.title`), a close button with `type="button"` and `aria-label` (`common.close`), and Escape. Imports `X`, `requiredTierFor` and `UpsellGate` gone; `Lock`, `ChevronDown`, `Settings` kept. - `UpsellDialog` closes on Escape: a `useEffect` with a `keydown` listener on `document`, removed in the cleanup, dependency `[onClose]`, the pattern of `TransactionDetailModal`. Its docblock names both hosts; the `onNavigate` comment of `UpsellGate.tsx` names `UpsellDialog` as the modal host. - No i18n key added or changed (`upsell.title`, `common.close`, `license.editions.*`, `upsell.features.multi-profile` exist in both files). ## Files | File | Change | |---|---| | `src/components/profile/ProfileSwitcher.tsx` | upsell window replaced by `UpsellDialog`, three imports dropped | | `src/components/shared/UpsellDialog.tsx` | Escape effect, docblock | | `src/components/shared/UpsellGate.tsx` | comment of `onNavigate` (modal hosts) | | `src/components/shared/UpsellDialog.render.test.tsx` | onto the harness (`vi.mock("react", …fakeReact…)`, direct calls wrapped in `harness.render`), shared `find`, five Escape tests | | `src/components/profile/ProfileSwitcher.wiring.test.ts` | new, on the harness | | `CHANGELOG.md`, `CHANGELOG.fr.md` | one Changed / Modifié line | | `docs/architecture.md` | `UpsellDialog` row of the gating table; harness users 25 → 27; `elementTree` paragraph (two new users, fifteen local copies left) | | `STATE.md` | one sub-bullet under « Vérifications dues à la release suivante » | ## Tests `UpsellDialog.render.test.tsx` (3 → 8 tests): - the three existing tests kept: the static render (`role`, `aria-modal`, accessible name, texts, `aria-label` of the X), still by `renderToStaticMarkup` under the harness mock; the X and `onNavigate` = `onClose`; `balance` → `premium`; - Escape, without DOM: `vi.stubGlobal("document", { addEventListener: vi.fn(), removeEventListener: vi.fn() })`, `harness.commit()`, then the captured listener called with a key. The listener is added at commit, not during the render, on `keydown`; Escape → `onClose` once; Enter, space, Tab, `a` → never; `harness.unmount()` → `removeEventListener("keydown", <the same function>)`; a new `onClose` at the next render → the old listener removed, the new one calls the new `onClose` and not the old one (the `[onClose]` dependency). Globals unstubbed after each test. `ProfileSwitcher.wiring.test.ts` (new, 3 tests): mocks `ProfileContext` (`useProfile`), `useEntitlement` and `react-i18next` (`i18nMock`); `react-router-dom` needs no mock, since no hook of it is called (children stay elements). Nothing opens before a click. In Free, a click on the toggle (the button that holds the `ChevronDown`), then on the locked profile (keyed `second`, titled `t(nav.locked)`), renders one `UpsellDialog` element with `feature="multi-profile"`, no `UpsellGate` element, the menu closed and no switch; its `onClose` closes it. In Base, the same click switches to `second` and opens nothing. No `harness.commit()`: the switcher's effect would add a `mousedown` listener to a `document` the node environment does not have. Counts: vitest 161 files / 2610 tests on the base → 162 files / 2618 tests on this head. `npm run build` green. Probe: sonde rc=1 (`src/zz_tmp_probe.test.ts`, one failing `expect`, deleted). `i18n-mock-guard` and `native-dialog-guard` green in the full run. ## Mutation proofs Implementation committed first (`1a0070b`, `b8637c6`); one mutation at a time, restored by `git checkout -- <file>`, `git status --short` empty after each. Run on the two test files above (11 tests), M16 on `ProfileSwitcher.wiring.test.ts` alone (3 tests). | # | File | Mutation | Failing tests | Exit | |---|---|---|---|---| | M1 | `UpsellDialog.tsx` | `document.addEventListener("keydown", …)` removed (listener never added) | 5 / 11 | 1 | | M2 | `UpsellDialog.tsx` | cleanup `return () => document.removeEventListener(…)` removed | 2 / 11 | 1 | | M3 | `UpsellDialog.tsx` | `if (e.key === "Escape")` removed (any key closes) | 1 / 11 | 1 | | M4 | `UpsellDialog.tsx` | dependency `[onClose]` → `[]` (stale `onClose`) | 1 / 11 | 1 | | M5 | `UpsellDialog.tsx` | `"keydown"` → `"keyup"` | 5 / 11 | 1 | | M6 | `UpsellDialog.tsx` | `role="dialog"` removed (the static render is still read under the harness) | 1 / 11 | 1 | | M7 | `UpsellDialog.tsx` | the X gets `onClick={() => {}}` | 1 / 11 | 1 | | M8 | `UpsellDialog.tsx` | `onNavigate={() => {}}` | 1 / 11 | 1 | | M9 | `ProfileSwitcher.tsx` | the base file back (old markup, with a direct `UpsellGate`) | 1 / 11 | 1 | | M10 | `ProfileSwitcher.tsx` | `feature="adjustments"` | 1 / 11 | 1 | | M11 | `ProfileSwitcher.tsx` | `onClose={() => {}}` | 1 / 11 | 1 | | M12 | `ProfileSwitcher.tsx` | a locked profile no longer calls `setShowUpsell(true)` | 1 / 11 | 1 | | M13 | `ProfileSwitcher.tsx` | `handleSelect` no longer closes the menu | 1 / 11 | 1 | | M14 | `ProfileSwitcher.tsx` | a direct `UpsellGate` rendered next to the `UpsellDialog` (red on « no `UpsellGate` element ») | 1 / 11 | 1 | | M15 | `UpsellDialog.tsx` | listener added during the render, only its removal left in an effect | 4 / 11 | 1 | | M16 | `ProfileSwitcher.tsx` | `if (isLocked(profile))` → `if (true)` | 1 / 3 | 1 | The four mutations the plan names (listener never added, cleanup removed, Escape condition removed, ProfileSwitcher back to the old markup) are M1, M2, M3 and M9. ## Decisions - [MEDIUM] The wiring test opens the dialog by clicks in the rendered tree (the toggle, then the locked profile), not by presetting `showUpsell` through `harness.slots[3]` as the plan wrote. It proves more (a locked profile opens it, through `handleSelect` and `isProfileSwitchLocked`, and its `onClose` closes it) and does not depend on the order of the switcher's hooks; same choice as link 3 (#467) and `TransactionTable.wiring.test.ts`. Hence no entry in « Préréglages actuels » of `docs/architecture.md` « Limites connues (#437) ». Rejected: the slot preset (one more hook-order dependency, and the click path left unproved). - [MEDIUM] `UpsellDialog.render.test.tsx`, rewritten onto the harness, uses the shared `find` of `src/test/elementTree.ts` instead of its local copy (one of the sixteen link 3 left). No other file migrated. The `elementTree` paragraph of `architecture.md` now says fifteen local copies, the count of the `grep -rlE "function (find|holding)\(" src --include='*.test.*'` it cites. - [HIGH] The `UpsellDialog` element is read by `find(tree, (el) => el.type === UpsellDialog)`, not by `holding`, which returns the elements that hold one of that type (the plan's « `holding` … sert à trouver l'élément » is imprecise). `holding(tree, ChevronDown)` finds the toggle button. - [HIGH] Two assertions beyond the plan's three Escape tests, each red under its own mutation: the listener follows the latest `onClose` (M4), and it is added at commit, not during the render (M15). A Base-edition test is the negative control of the Free one (M16). - [MEDIUM] `docs/guide-utilisateur.md` and the `docs.*` keys left as they are: the guide describes neither how this window closes nor the Escape of the other windows, and nothing in it becomes false; the plan's doc work is `architecture.md`. Rejected: one more sentence in the guide and in both `docs.*` translations. - [HIGH] CHANGELOG wording on the plan's content (Escape from the profile switcher and from the Split button; the switcher's window a dialog for screen readers), with two corrections from the self-review (`196207e`): the window is named « the unlock screen that opens in a window » / « l'écran de déverrouillage qui s'ouvre dans une fenêtre », the term of the user guide and of the #369 entry, since « édition requise » is no visible label (the title reads « Fonctionnalité Base »); and screen readers « identify » / « reconnaissent » it as a dialog rather than « announce » it, since no focus moves into it on open. « the Split button » as in the #369 entry. ## Vérifications manuelles dues (prochaine release) In the Free edition (no key), in French and in English, light and dark themes: 1. Transactions → the locked Répartition (Split adjustment) button of any row → the « Fonctionnalité Base » window opens; Escape closes it. 2. Sidebar → profile switcher → a profile other than the active one (lock icon) → the same window: title « Fonctionnalité Base », the X at the top right closes it, Escape closes it, « J'ai déjà une clé » closes it and opens the License card (Settings → Users), « Obtenir Base » opens the product page in the browser and leaves the window open, a click on the dark backdrop does nothing. 3. With a screen reader (Orca on Linux, Narrator on Windows), on that profile switcher window, once the reader reaches it (the focus does not move into it on open, see « Hors périmètre »): read as a dialog with its name (« Fonctionnalité Base », « Base feature »), its X read as « Fermer », « Close ». 4. In Base, the profile switcher still switches to another profile (PIN asked when that profile has one). ## Hors périmètre - Focus (comment 24139 of #451, 2026-10-17): on open, the focus does not move into the window, and on close it does not go back to the button that opened it, in both hosts. Neither /analyze (2026-10-19) nor /plan-run (2026-10-23) carried it into the body: not implemented here (no `autoFocus`, no focus return). Max decides a follow-up. ## For the reviewer - `renderToStaticMarkup` under the harness mock: react-dom/server and react-router-dom are external dependencies and keep the real React (a `useContext` of `MemoryRouter` reaching the harness would throw); only the repository's components (`UpsellDialog`, `UpsellGate`, the CTA buttons) get the harness hooks, so the static render still works, and M6 shows it is read. The `useEffect` of `UpsellDialog` is captured and never run there, as in React's server render. - `TransactionTable.wiring.test.ts` counts `UpsellDialog` elements without calling them: untouched and green. - Minor case accepted by the analysis, unchanged: in `TransactionTable`, if the upsell opens while the keyword field has the focus, one Escape closes both (no `stopPropagation`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A keydown listener on the document, added once the dialog is mounted and
removed when it goes away, closes it on Escape, as TransactionDetailModal
does; it follows the latest onClose, since hosts pass an inline arrow.
UpsellDialog.render.test.tsx moves onto the shared hook harness (a
direct call of the component would now hit an Invalid hook call) and the
shared find of src/test/elementTree.ts, and pins the listener: added at
commit and not during the render, Escape closes once, any other key does
not, the same function is removed at unmount, and a new onClose replaces
the old listener.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The switcher's own copy of the upsell window (same layout, same feature,
same required tier, onNavigate closing it) becomes
<UpsellDialog feature="multi-profile" />, which also gives it the dialog
role, aria-modal, an accessible name, a named close button and Escape.
The X and requiredTierFor imports go; UpsellGate's comment names
UpsellDialog as the modal host.

ProfileSwitcher.wiring.test.ts, on the shared hook harness, opens the
menu and clicks the locked profile through the rendered tree (no slot
preset): one UpsellDialog element for multi-profile, no UpsellGate of
its own, the menu closed, and onClose closes it; in Base the same click
switches profile and opens nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs: describe the shared upsell dialog and its Escape (#451)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m13s
85ac30eb37
architecture.md: the UpsellDialog row names its two hosts (the
Répartition button of TransactionTable and a locked profile of
ProfileSwitcher), says what closes it (X, Escape, I already have a key;
not the backdrop, not the purchase button) and that it takes no focus;
harness users recounted with the grep the section cites (27), and the
elementTree paragraph names its two new users, fifteen local copies
left. CHANGELOG: one Changed / Modifie line in both files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(state): list the manual checks of #451 for the next release (#451)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m11s
6c34b905be
One sub-bullet under the checks due at the release after v0.17.2: in
Free, the edition-required window closes with Escape from the Split
button and from a locked profile of the profile switcher, the
switcher's window keeps its title and closings and is announced as a
named dialog by a screen reader, and switching still works in Base.

Resolves #451

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs: name the unlock screen as the app does, claim no announcement (#451)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m14s
196207e300
Self-review findings. The CHANGELOG lines, shown in the app, quoted
"edition required" as if it were the window's name, while its title
reads "Base feature": they now say "the unlock screen that opens in a
window", the term of the user guide and of the #369 entry. And the
dialog takes no focus on open (out of scope), so a screen reader only
reads it as a named dialog once it reaches it: "identify" instead of
"announce" in both CHANGELOGs, and the STATE.md check says so. Also a
lighter list in the elementTree paragraph of architecture.md.

Resolves #451

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Niveau : normal
Verdict : APPROVE

Auto-revue de l'auteur (worker /autopilot du 2026-10-23), pas une revue indépendante : la checklist de /pr-review appliquée au diff complet de la PR contre sa base issue-467-confirm-behaviour-tests, à la profondeur du niveau normal. status:approved n'est pas posé : l'issue reste en status:review.

Résumé. La fenêtre d'incitation de ProfileSwitcher passe sur UpsellDialog, à comportement égal (mêmes classes, même fonctionnalité, même édition requise, mêmes fermetures), et gagne le rôle de dialogue, son nom, un X nommé et Échap ; UpsellDialog se ferme sur Échap selon le motif de TransactionDetailModal. Deux constats de texte, corrigés dans 196207e.

Niveau (Step 0bis, REVIEW.md de main)

  • src/components/shared/UpsellDialog.tsx, src/components/profile/ProfileSwitcher.tsx, src/components/shared/UpsellGate.tsx : désignés par « code livré : src/** », condition non remplie. Aucun appel réseau ajouté ni changé : le bouton d'achat et son URL (purchaseUrl de la langue) sont ceux d'avant, rendus par le même UpsellGate ; aucune URL qui porte une donnée de l'utilisateur ; aucun consentement touché. Aucune autre ligne Haut ne les désigne (zone licence : licenseService.ts, authService.ts et les commandes Rust seulement) → normal.
  • src/components/profile/ProfileSwitcher.wiring.test.ts, src/components/shared/UpsellDialog.render.test.tsx : src/**, tests, même condition non remplie → normal.
  • docs/architecture.md : « Restent au moins normaux » → normal.
  • CHANGELOG.md, CHANGELOG.fr.md, STATE.md : **/*.md, hors des exceptions → bas.

PR : normal.

Vérifié

  • Équivalence de la fenêtre de ProfileSwitcher : classes identiques (voile, carte, en-tête, X, corps), feature="multi-profile", requiredTierFor appliqué dans UpsellDialog, X et onNavigate = onClose = setShowUpsell(false). Imports X, requiredTierFor et UpsellGate retirés, tsc vert.
  • Échap : écouteur keydown sur document, retiré au nettoyage, dépendance [onClose]. Pas de second Échap concurrent : le menu de ProfileSwitcher ne se ferme qu'au mousedown extérieur et se ferme avant l'ouverture de la fenêtre ; aucun écouteur keydown de document dans Sidebar, AppShell ni TransactionsPage ; dans TransactionTable, seul l'Échap du champ mot-clé (cas accepté par l'analyse, inchangé).
  • Tests : 16 mutations de l'auteur, toutes rouges, arbre propre après chacune (tableau du corps) ; les quatre du plan sont M1, M2, M3 et M9. Sonde rc=1. Suite complète sur 196207e : 162 fichiers, 2618 tests (161 fichiers, 2610 tests sur la base), npm run build vert, i18n-mock-guard et native-dialog-guard verts.
  • Rendu statique sous le faux react du harnais : react-dom/server et react-router-dom gardent le vrai React (un useContext de MemoryRouter qui atteindrait le harnais lèverait) ; M6 prouve que le rendu est lu.
  • i18n : aucune chaîne nouvelle, les clés citées existent dans les deux fichiers.
  • Fermeture : la timeline de l'issue porte une seule entrée pull_ref dont l'action est la fermeture, et elle vient de cette PR ; aucun mot-clé de fermeture hors de la première ligne du corps (les PR 490 à 492 citent l'issue sans action).
  • Docs : architecture.md (fiche UpsellDialog ; 27 utilisateurs du harnais par le grep cité ; 15 copies locales de find / holding par le grep cité) ; ADR 0017 relu, rien n'y devient faux ; guide non touché (décision MEDIUM du corps : il ne décrit la fermeture d'aucune fenêtre, rien n'y devient faux).

Constats corrigés (196207e, qui reprend le mot-clé de fermeture de la branche)

  1. CHANGELOG.md:16, CHANGELOG.fr.md:16 : la ligne citait « édition requise » / “edition required” comme le nom de la fenêtre, alors qu'aucun libellé de l'application ne le porte (le titre affiché est « Fonctionnalité Base »), et ce texte s'affiche dans l'application (historique des versions). Désormais « l'écran de déverrouillage qui s'ouvre dans une fenêtre », le terme du guide et de l'entrée de la Répartition.
  2. Même ligne, STATE.md (vérification due) et vérification 3 du corps : « annoncée aux lecteurs d'écran » promettait une annonce à l'ouverture, alors que le focus n'entre pas dans la fenêtre (hors périmètre) : un lecteur d'écran la lit comme une boîte de dialogue nommée une fois qu'il l'atteint. Désormais « reconnaissent » / « identify », et la vérification le dit.

Après ces corrections : build et suite rejoués (162 fichiers, 2618 tests), arbre propre, tête 196207e poussée.

Suggestions (non bloquantes)

  • Focus (commentaire 24139 de l'issue) : hors périmètre par décision de l'orchestrateur, listé sous « Hors périmètre ». C'est lui qui rendrait l'annonce automatique à l'ouverture ; suivi à décider par Max.
  • Six composants posent désormais un écouteur keydown sur document (TransactionDetailModal, FeedbackConsentDialog, FeedbackDialog, CategoriesMigrationRestoreModal, ContextMenu, UpsellDialog), et seul celui-ci est testé : le modèle de UpsellDialog.render.test.tsx (document factice, commit(), écouteur capturé) pourrait couvrir les autres, ou un hook partagé les réunir, dans un suivi.
Niveau : normal Verdict : APPROVE Auto-revue de l'auteur (worker `/autopilot` du 2026-10-23), pas une revue indépendante : la checklist de `/pr-review` appliquée au diff complet de la PR contre sa base `issue-467-confirm-behaviour-tests`, à la profondeur du niveau normal. `status:approved` n'est pas posé : l'issue reste en `status:review`. **Résumé.** La fenêtre d'incitation de `ProfileSwitcher` passe sur `UpsellDialog`, à comportement égal (mêmes classes, même fonctionnalité, même édition requise, mêmes fermetures), et gagne le rôle de dialogue, son nom, un X nommé et Échap ; `UpsellDialog` se ferme sur Échap selon le motif de `TransactionDetailModal`. Deux constats de texte, corrigés dans `196207e`. ## Niveau (Step 0bis, `REVIEW.md` de `main`) - `src/components/shared/UpsellDialog.tsx`, `src/components/profile/ProfileSwitcher.tsx`, `src/components/shared/UpsellGate.tsx` : désignés par « code livré : `src/**` », condition non remplie. Aucun appel réseau ajouté ni changé : le bouton d'achat et son URL (`purchaseUrl` de la langue) sont ceux d'avant, rendus par le même `UpsellGate` ; aucune URL qui porte une donnée de l'utilisateur ; aucun consentement touché. Aucune autre ligne Haut ne les désigne (zone licence : `licenseService.ts`, `authService.ts` et les commandes Rust seulement) → normal. - `src/components/profile/ProfileSwitcher.wiring.test.ts`, `src/components/shared/UpsellDialog.render.test.tsx` : `src/**`, tests, même condition non remplie → normal. - `docs/architecture.md` : « Restent au moins normaux » → normal. - `CHANGELOG.md`, `CHANGELOG.fr.md`, `STATE.md` : `**/*.md`, hors des exceptions → bas. PR : normal. ## Vérifié - Équivalence de la fenêtre de `ProfileSwitcher` : classes identiques (voile, carte, en-tête, X, corps), `feature="multi-profile"`, `requiredTierFor` appliqué dans `UpsellDialog`, X et `onNavigate` = `onClose` = `setShowUpsell(false)`. Imports `X`, `requiredTierFor` et `UpsellGate` retirés, `tsc` vert. - Échap : écouteur `keydown` sur `document`, retiré au nettoyage, dépendance `[onClose]`. Pas de second Échap concurrent : le menu de `ProfileSwitcher` ne se ferme qu'au `mousedown` extérieur et se ferme avant l'ouverture de la fenêtre ; aucun écouteur `keydown` de document dans `Sidebar`, `AppShell` ni `TransactionsPage` ; dans `TransactionTable`, seul l'Échap du champ mot-clé (cas accepté par l'analyse, inchangé). - Tests : 16 mutations de l'auteur, toutes rouges, arbre propre après chacune (tableau du corps) ; les quatre du plan sont M1, M2, M3 et M9. Sonde rc=1. Suite complète sur `196207e` : 162 fichiers, 2618 tests (161 fichiers, 2610 tests sur la base), `npm run build` vert, `i18n-mock-guard` et `native-dialog-guard` verts. - Rendu statique sous le faux `react` du harnais : react-dom/server et react-router-dom gardent le vrai React (un `useContext` de `MemoryRouter` qui atteindrait le harnais lèverait) ; M6 prouve que le rendu est lu. - i18n : aucune chaîne nouvelle, les clés citées existent dans les deux fichiers. - Fermeture : la timeline de l'issue porte une seule entrée `pull_ref` dont l'action est la fermeture, et elle vient de cette PR ; aucun mot-clé de fermeture hors de la première ligne du corps (les PR 490 à 492 citent l'issue sans action). - Docs : `architecture.md` (fiche `UpsellDialog` ; 27 utilisateurs du harnais par le `grep` cité ; 15 copies locales de `find` / `holding` par le `grep` cité) ; ADR 0017 relu, rien n'y devient faux ; guide non touché (décision MEDIUM du corps : il ne décrit la fermeture d'aucune fenêtre, rien n'y devient faux). ## Constats corrigés (`196207e`, qui reprend le mot-clé de fermeture de la branche) 1. `CHANGELOG.md:16`, `CHANGELOG.fr.md:16` : la ligne citait « édition requise » / “edition required” comme le nom de la fenêtre, alors qu'aucun libellé de l'application ne le porte (le titre affiché est « Fonctionnalité Base »), et ce texte s'affiche dans l'application (historique des versions). Désormais « l'écran de déverrouillage qui s'ouvre dans une fenêtre », le terme du guide et de l'entrée de la Répartition. 2. Même ligne, `STATE.md` (vérification due) et vérification 3 du corps : « annoncée aux lecteurs d'écran » promettait une annonce à l'ouverture, alors que le focus n'entre pas dans la fenêtre (hors périmètre) : un lecteur d'écran la lit comme une boîte de dialogue nommée une fois qu'il l'atteint. Désormais « reconnaissent » / « identify », et la vérification le dit. Après ces corrections : build et suite rejoués (162 fichiers, 2618 tests), arbre propre, tête `196207e` poussée. ## Suggestions (non bloquantes) - Focus (commentaire 24139 de l'issue) : hors périmètre par décision de l'orchestrateur, listé sous « Hors périmètre ». C'est lui qui rendrait l'annonce automatique à l'ouverture ; suivi à décider par Max. - Six composants posent désormais un écouteur `keydown` sur `document` (`TransactionDetailModal`, `FeedbackConsentDialog`, `FeedbackDialog`, `CategoriesMigrationRestoreModal`, `ContextMenu`, `UpsellDialog`), et seul celui-ci est testé : le modèle de `UpsellDialog.render.test.tsx` (document factice, `commit()`, écouteur capturé) pourrait couvrir les autres, ou un hook partagé les réunir, dans un suivi.
Author
Owner

CI lue par l'orchestrateur /autopilot du 2026-10-23 (pas une revue).

  • Tête : 196207e, run 624 PR Check — Frontend, statut combiné success. C'est la tête de la pile #490 → #491 → #492 → #493 : la partie frontend de la pile cumulée est validée.
  • Journal : npm ci (176 paquets), ✓ built in 13.03s, UpsellDialog.render.test.tsx (8 tests), ProfileSwitcher.wiring.test.ts (3 tests), locales.keys.test.ts (18), gardes native-dialog-guard.test.ts (34) et i18n-mock-guard.test.ts (5) vertes.
  • Test Files 162 passed (162), Tests 2618 passed (2618), Job succeeded : les comptes du corps de la PR (162 / 2618, contre 161 / 2610 sur la base 719588f).
CI lue par l'orchestrateur `/autopilot` du 2026-10-23 (pas une revue). - Tête : `196207e`, run 624 `PR Check — Frontend`, statut combiné `success`. C'est la tête de la pile #490 → #491 → #492 → #493 : la partie frontend de la pile cumulée est validée. - Journal : `npm ci` (176 paquets), `✓ built in 13.03s`, `UpsellDialog.render.test.tsx` (8 tests), `ProfileSwitcher.wiring.test.ts` (3 tests), `locales.keys.test.ts` (18), gardes `native-dialog-guard.test.ts` (34) et `i18n-mock-guard.test.ts` (5) vertes. - `Test Files 162 passed (162)`, `Tests 2618 passed (2618)`, `Job succeeded` : les comptes du corps de la PR (162 / 2618, contre 161 / 2610 sur la base `719588f`).
Author
Owner

Niveau : normal

Verdict : APPROVE

Résumé. La fenêtre d'incitation de ProfileSwitcher passe sur UpsellDialog à comportement égal (mêmes classes, même fonctionnalité, même édition requise, mêmes fermetures, voile sans effet), et UpsellDialog se ferme sur Échap par le motif de TransactionDetailModal. Le code est correct et les tests rougissent sur les défauts qu'ils visent. Une épingle manque sur un chemin voisin que la PR ne change pas (suggestion 1), et le critère de focus du commentaire 24139 reste à trancher avant que le merge ferme #451.

Niveau normal : aucun fichier du tableau Haut. Les trois fichiers de src/** n'ajoutent aucun appel réseau et ne changent rien de ce qui part : le bouton d'achat que la fenêtre du sélecteur rend toujours ouvre purchaseUrl(i18n.language), qui ne dépend que de la langue.

Ce que la revue a rejoué (clone de la tête 196207e hors du dépôt, dans /tmp)

  • Sonde : un test volontairement rouge fait sortir vitest en code 1.
  • npm ci, npm run build vert (tsc couvre aussi les tests, include: ["src"]), npx vitest run : 162 fichiers, 2618 tests verts, les comptes du corps. Journal du run 624 lu : tête 196207e, Test Files 162 passed (162), Tests 2618 passed (2618), Job succeeded.
  • Comptes de docs/architecture.md refaits par les commandes qu'il cite : 27 utilisateurs du harnais (25 sur la base), 15 copies locales de find ou holding (16 sur la base), et les huit utilisateurs d'elementTree que nomme le paragraphe.

Mutations du relecteur, une à la fois, sur UpsellDialog.render.test.tsx et ProfileSwitcher.wiring.test.ts (11 tests), restauration par git checkout, arbre propre après chacune :

# Fichier Mutation Tests rouges
R0 ProfileSwitcher.tsx fichier de la base (sa propre fenêtre, UpsellGate direct) 1 / 11
R0b UpsellDialog.tsx fichier de la base (aucun effet Échap) 5 / 11
R1 UpsellDialog.tsx le nettoyage retire une autre fonction que l'écouteur posé (fuite) 2 / 11
R2 UpsellDialog.tsx le nettoyage retire sur keyup (fuite) 2 / 11
R3 UpsellDialog.tsx Échap appelle onClose deux fois 2 / 11
R4 UpsellDialog.tsx écouteur posé en capture, retiré en bulle (fuite dans un vrai DOM) 1 / 11
R5 ProfileSwitcher.tsx handleSelect teste le NIP avant le verrou 0 / 11, et 0 / 2618 sur la suite complète
R6 UpsellDialog.tsx aria-modal retiré 1 / 11

R0, R0b, R1 et R2 rejouent du côté du relecteur les critères d'acceptation « rouge si ProfileSwitcher rend encore UpsellGate directement », « si l'écouteur disparaît » et « s'il n'est pas retiré au démontage ». R5 est la suggestion 1.

Vérifié à la lecture

  • Balisage identique à l'ancienne fenêtre du sélecteur, classe par classe ; requiredTierFor("multi-profile") passe dans UpsellDialog ; le X gagne type="button" et aria-label, la fenêtre role="dialog", aria-modal et son nom.
  • Autres écouteurs keydown du document qui tireraient sur le même Échap : aucun n'est monté en même temps que la fenêtre. Le ContextMenu de la page Transactions se ferme au mousedown extérieur, avant le clic qui ouvre l'incitation ; TransactionDetailModal n'est rendu que par le tableau de bord ; le menu du sélecteur se ferme avant l'ouverture. Reste le champ mot-clé de TransactionTable, cas accepté par l'analyse.
  • Chaînes : upsell.title vaut « Fonctionnalité {{tier}} » et « {{tier}} feature », common.close « Fermer » et « Close » : les exemples des deux CHANGELOG sont exacts, et les entrées sont sous Modifié et Changed.
  • Aucun autoFocus ni .focus() dans la chaîne UpsellDialog → UpsellGate → PurchaseButton, HaveKeyButton : « Elle ne prend pas le focus à l'ouverture » est exact.
  • Fermeture de #451 : un seul pull_ref closes dans la timeline (PR #493), et Resolves #451 dans le corps comme dans les messages de 6c34b90 et 196207e : l'issue se ferme au merge, par l'API comme par /merge-stack.
  • Commits au format conventionnel ; ni .only, ni .skip, ni secret, ni coordonnée de tiers dans les lignes ajoutées.

Décision pour Max

Focus, commentaire 24139 de #451 (Max, 2026-10-17) : « à l'ouverture, le focus est dans la fenêtre (bouton de fermeture ou premier CTA) ; à la fermeture, il revient au bouton qui l'a ouverte ». Ni /analyze (2026-10-19) ni /plan-run (2026-10-23) ne l'ont repris dans le corps, la PR le déclare hors périmètre, et le merge ferme #451 : sans suite, le critère disparaît avec l'issue. Pour l'utilisateur au clavier, Échap ferme désormais la fenêtre où que soit le focus, mais Tab parcourt encore la page derrière le voile avant de l'atteindre (depuis le bouton Répartition, les lignes restantes du tableau). Trois voies : une issue de suivi ouverte avant le merge, qui couvrirait les deux hôtes et ProfileFormModal, la troisième fenêtre qui porte l'écran de déverrouillage (mode upsell de « Gérer les profils »), toujours sans role="dialog", sans nom, sans aria-label sur son X ni Échap ; un commit de plus en tête de pile ; ou y renoncer, en le consignant sur #451.

Suggestions (non bloquantes)

  1. R5 survit à toute la suite : rien ne prouve qu'un profil verrouillé qui a un NIP ouvre l'incitation et non le PinDialog. Avec le NIP testé en premier, en Gratuite, le bon NIP mène handlePinSuccess à switchProfile sur le profil verrouillé : le verrou des profils multiples est contourné. Le code de la PR est correct (l'ordre de handleSelect n'a pas bougé, et le commentaire des l. 104-105 compte dessus), mais ProfileSwitcher.wiring.test.ts est le premier test de ce chemin et ses deux profils ont pin_hash: null. Un troisième profil avec un pin_hash l'épinglerait : en Gratuite, un UpsellDialog, aucun élément PinDialog, pas de switchProfile ; en Base, un PinDialog. Commit de test en tête de pile, ou suivi.
  2. docs/architecture.md, fiche UpsellDialog : « posé au montage, retiré au démontage » est incomplet. L'écouteur est aussi retiré puis reposé à chaque nouveau onClose, donc à chaque rendu de l'hôte, qui passe une flèche en ligne ; le test « follows the host's latest onClose » épingle ce remplacement. Ajouter « et remplacé quand onClose change ».
  3. STATE.md : la nouvelle puce nomme encore la fenêtre « édition requise » entre guillemets, le libellé que 196207e a retiré des CHANGELOG parce qu'aucun écran ne l'affiche ; « Écran de déverrouillage en fenêtre » serait cohérent.

Actions faites : clone hors dépôt /tmp/pr493-review, script de mutations et journaux /tmp/pr493-* supprimés en fin de revue ; rien d'écrit dans le dépôt de travail. Label de #451 : status:review → status:approved.

Niveau : normal **Verdict : APPROVE** **Résumé.** La fenêtre d'incitation de `ProfileSwitcher` passe sur `UpsellDialog` à comportement égal (mêmes classes, même fonctionnalité, même édition requise, mêmes fermetures, voile sans effet), et `UpsellDialog` se ferme sur Échap par le motif de `TransactionDetailModal`. Le code est correct et les tests rougissent sur les défauts qu'ils visent. Une épingle manque sur un chemin voisin que la PR ne change pas (suggestion 1), et le critère de focus du commentaire 24139 reste à trancher avant que le merge ferme #451. Niveau normal : aucun fichier du tableau Haut. Les trois fichiers de `src/**` n'ajoutent aucun appel réseau et ne changent rien de ce qui part : le bouton d'achat que la fenêtre du sélecteur rend toujours ouvre `purchaseUrl(i18n.language)`, qui ne dépend que de la langue. **Ce que la revue a rejoué** (clone de la tête `196207e` hors du dépôt, dans `/tmp`) - Sonde : un test volontairement rouge fait sortir vitest en code 1. - `npm ci`, `npm run build` vert (`tsc` couvre aussi les tests, `include: ["src"]`), `npx vitest run` : 162 fichiers, 2618 tests verts, les comptes du corps. Journal du run 624 lu : tête `196207e`, `Test Files 162 passed (162)`, `Tests 2618 passed (2618)`, `Job succeeded`. - Comptes de `docs/architecture.md` refaits par les commandes qu'il cite : 27 utilisateurs du harnais (25 sur la base), 15 copies locales de `find` ou `holding` (16 sur la base), et les huit utilisateurs d'`elementTree` que nomme le paragraphe. **Mutations du relecteur**, une à la fois, sur `UpsellDialog.render.test.tsx` et `ProfileSwitcher.wiring.test.ts` (11 tests), restauration par `git checkout`, arbre propre après chacune : | # | Fichier | Mutation | Tests rouges | |---|---|---|---| | R0 | `ProfileSwitcher.tsx` | fichier de la base (sa propre fenêtre, `UpsellGate` direct) | 1 / 11 | | R0b | `UpsellDialog.tsx` | fichier de la base (aucun effet Échap) | 5 / 11 | | R1 | `UpsellDialog.tsx` | le nettoyage retire une autre fonction que l'écouteur posé (fuite) | 2 / 11 | | R2 | `UpsellDialog.tsx` | le nettoyage retire sur `keyup` (fuite) | 2 / 11 | | R3 | `UpsellDialog.tsx` | Échap appelle `onClose` deux fois | 2 / 11 | | R4 | `UpsellDialog.tsx` | écouteur posé en capture, retiré en bulle (fuite dans un vrai DOM) | 1 / 11 | | R5 | `ProfileSwitcher.tsx` | `handleSelect` teste le NIP avant le verrou | **0 / 11, et 0 / 2618 sur la suite complète** | | R6 | `UpsellDialog.tsx` | `aria-modal` retiré | 1 / 11 | R0, R0b, R1 et R2 rejouent du côté du relecteur les critères d'acceptation « rouge si `ProfileSwitcher` rend encore `UpsellGate` directement », « si l'écouteur disparaît » et « s'il n'est pas retiré au démontage ». R5 est la suggestion 1. **Vérifié à la lecture** - Balisage identique à l'ancienne fenêtre du sélecteur, classe par classe ; `requiredTierFor("multi-profile")` passe dans `UpsellDialog` ; le X gagne `type="button"` et `aria-label`, la fenêtre `role="dialog"`, `aria-modal` et son nom. - Autres écouteurs `keydown` du document qui tireraient sur le même Échap : aucun n'est monté en même temps que la fenêtre. Le `ContextMenu` de la page Transactions se ferme au `mousedown` extérieur, avant le clic qui ouvre l'incitation ; `TransactionDetailModal` n'est rendu que par le tableau de bord ; le menu du sélecteur se ferme avant l'ouverture. Reste le champ mot-clé de `TransactionTable`, cas accepté par l'analyse. - Chaînes : `upsell.title` vaut « Fonctionnalité {{tier}} » et « {{tier}} feature », `common.close` « Fermer » et « Close » : les exemples des deux CHANGELOG sont exacts, et les entrées sont sous Modifié et Changed. - Aucun `autoFocus` ni `.focus()` dans la chaîne `UpsellDialog` → `UpsellGate` → `PurchaseButton`, `HaveKeyButton` : « Elle ne prend pas le focus à l'ouverture » est exact. - Fermeture de #451 : un seul `pull_ref` `closes` dans la timeline (PR #493), et `Resolves #451` dans le corps comme dans les messages de `6c34b90` et `196207e` : l'issue se ferme au merge, par l'API comme par `/merge-stack`. - Commits au format conventionnel ; ni `.only`, ni `.skip`, ni secret, ni coordonnée de tiers dans les lignes ajoutées. **Décision pour Max** Focus, commentaire 24139 de #451 (Max, 2026-10-17) : « à l'ouverture, le focus est dans la fenêtre (bouton de fermeture ou premier CTA) ; à la fermeture, il revient au bouton qui l'a ouverte ». Ni `/analyze` (2026-10-19) ni `/plan-run` (2026-10-23) ne l'ont repris dans le corps, la PR le déclare hors périmètre, et le merge ferme #451 : sans suite, le critère disparaît avec l'issue. Pour l'utilisateur au clavier, Échap ferme désormais la fenêtre où que soit le focus, mais Tab parcourt encore la page derrière le voile avant de l'atteindre (depuis le bouton Répartition, les lignes restantes du tableau). Trois voies : une issue de suivi ouverte avant le merge, qui couvrirait les deux hôtes et `ProfileFormModal`, la troisième fenêtre qui porte l'écran de déverrouillage (mode `upsell` de « Gérer les profils »), toujours sans `role="dialog"`, sans nom, sans `aria-label` sur son X ni Échap ; un commit de plus en tête de pile ; ou y renoncer, en le consignant sur #451. **Suggestions (non bloquantes)** 1. R5 survit à toute la suite : rien ne prouve qu'un profil verrouillé qui a un NIP ouvre l'incitation et non le `PinDialog`. Avec le NIP testé en premier, en Gratuite, le bon NIP mène `handlePinSuccess` à `switchProfile` sur le profil verrouillé : le verrou des profils multiples est contourné. Le code de la PR est correct (l'ordre de `handleSelect` n'a pas bougé, et le commentaire des l. 104-105 compte dessus), mais `ProfileSwitcher.wiring.test.ts` est le premier test de ce chemin et ses deux profils ont `pin_hash: null`. Un troisième profil avec un `pin_hash` l'épinglerait : en Gratuite, un `UpsellDialog`, aucun élément `PinDialog`, pas de `switchProfile` ; en Base, un `PinDialog`. Commit de test en tête de pile, ou suivi. 2. `docs/architecture.md`, fiche `UpsellDialog` : « posé au montage, retiré au démontage » est incomplet. L'écouteur est aussi retiré puis reposé à chaque nouveau `onClose`, donc à chaque rendu de l'hôte, qui passe une flèche en ligne ; le test « follows the host's latest onClose » épingle ce remplacement. Ajouter « et remplacé quand `onClose` change ». 3. `STATE.md` : la nouvelle puce nomme encore la fenêtre « édition requise » entre guillemets, le libellé que `196207e` a retiré des CHANGELOG parce qu'aucun écran ne l'affiche ; « Écran de déverrouillage en fenêtre » serait cohérent. **Actions faites** : clone hors dépôt `/tmp/pr493-review`, script de mutations et journaux `/tmp/pr493-*` supprimés en fin de revue ; rien d'écrit dans le dépôt de travail. Label de #451 : `status:review` → `status:approved`.
maximus force-pushed issue-451-upsell-dialog-escape from 196207e300
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m14s
to 67e51e08b6
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m52s
2026-10-24 13:06:51 +00:00
Compare
Author
Owner

Rebasée le 2026-10-24 par la session principale, sans changement de son diff.

  • Après les deux commits ajoutés à #491 (90a9a52, f02169c, corrections de la revue 27073) et le rebase de #492 (483f886), cette PR a été rebasée : ancienne tête 196207e, nouvelle tête 67e51e0.
  • git range-diff 719588f..196207e 483f886..67e51e0 : les cinq commits sont identiques (=). Le diff de la PR contre sa base est identique à celui que la revue 27084 a relu, aux lignes index près.
  • CI 628 verte sur 67e51e0 : 162 fichiers, 2619 tests, la pile cumulée jusqu'ici ; build et suite complète rejoués aussi en local sur cette tête.
  • Pas de second tour : le verdict 27084 (APPROVE) porte sur ce diff. Les suggestions des quatre revues sont appliquées au-dessus, dans la PR #496 ; le focus est suivi par #494.
Rebasée le 2026-10-24 par la session principale, sans changement de son diff. - Après les deux commits ajoutés à #491 (`90a9a52`, `f02169c`, corrections de la revue 27073) et le rebase de #492 (`483f886`), cette PR a été rebasée : ancienne tête `196207e`, nouvelle tête `67e51e0`. - `git range-diff 719588f..196207e 483f886..67e51e0` : les cinq commits sont identiques (`=`). Le diff de la PR contre sa base est identique à celui que la revue 27084 a relu, aux lignes `index` près. - CI 628 verte sur `67e51e0` : 162 fichiers, 2619 tests, la pile cumulée jusqu'ici ; build et suite complète rejoués aussi en local sur cette tête. - Pas de second tour : le verdict 27084 (APPROVE) porte sur ce diff. Les suggestions des quatre revues sont appliquées au-dessus, dans la PR #496 ; le focus est suivi par #494.
maximus changed target branch from issue-467-confirm-behaviour-tests to main 2026-10-24 18:10:55 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
maximus/Simpl-Resultat!493
No description provided.