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

5 commits

Author SHA1 Message Date
le king fu
67e51e08b6 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 2m52s
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>
2026-10-24 09:05:23 -04:00
le king fu
567a872cf9 docs(state): list the manual checks of #451 for the next release (#451)
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>
2026-10-24 09:05:23 -04:00
le king fu
648afdc1a6 docs: describe the shared upsell dialog and its Escape (#451)
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>
2026-10-24 09:05:23 -04:00
le king fu
3ec1f48b6f refactor(profile): open the ProfileSwitcher upsell in UpsellDialog (#451)
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>
2026-10-24 09:05:23 -04:00
le king fu
c38c0c3a36 feat(upsell): close UpsellDialog on Escape (#451)
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>
2026-10-24 09:05:23 -04:00