feat(ui): show the email upgrade box to guests
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 15s
CI / ui (pull_request) Successful in 1m2s
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m41s

Un-hide the Profile email box for guest accounts (hidden={!p.isGuest}): a guest
binds an email to register / sign in, and a returning address opens the existing
merge dialog. Provider linking stays hidden — the Telegram control keeps its
wiring behind a hidden attribute — until the non-guest linking matrix (PR2). The
two linking e2e specs remain skipped (they assume a non-guest login and the
visible Telegram control); update their stale comments.
This commit is contained in:
Ilia Denisov
2026-07-03 03:18:23 +02:00
parent 9e0f929e40
commit 01d02fcef6
2 changed files with 11 additions and 9 deletions
+4 -4
View File
@@ -292,14 +292,14 @@ test('profile edit disables Save and flags an invalid display name', async ({ pa
await expect(save).toBeEnabled(); await expect(save).toBeEnabled();
}); });
// Account linking is hidden in Profile.svelte while we target provider sign-in (the anonymous // The email upgrade box is now shown to guests (email bind + the merge dialog). These specs
// /app/ guest who upgrades by linking comes later). The flow is kept wired; re-enable these two // still assume a non-guest login and the visible Telegram control, so they stay skipped until
// specs together with the `.emailbox` section. // PR2 re-enables provider linking and adds a guest-login setup.
test.skip('link account: a taken email opens the irreversible merge confirmation', async ({ page }) => { test.skip('link account: a taken email opens the irreversible merge confirmation', async ({ page }) => {
await loginLobby(page); await loginLobby(page);
await openProfile(page); await openProfile(page);
// The linking section is shown to everyone (guests upgrade by linking). // The email box is shown to guests (this spec needs a guest login — re-enabled in PR2).
await expect(page.getByRole('heading', { name: 'Link an account' })).toBeVisible(); await expect(page.getByRole('heading', { name: 'Link an account' })).toBeVisible();
// An address containing "merge" stands in (in the mock) for one already owned by // An address containing "merge" stands in (in the mock) for one already owned by
// another account, so the confirm step reveals a required merge. // another account, so the confirm step reveals a required merge.
+7 -5
View File
@@ -244,10 +244,11 @@
</form> </form>
{/if} {/if}
<!-- Linking & merge. Hidden for now: we target provider sign-in, and the anonymous <!-- The guest's email upgrade path: bind an email to register / sign in (a returning
/app/ guest (whose upgrade path this is) comes later. Kept wired — drop `hidden` address triggers the merge dialog below). Guest-only for now; provider linking
to re-enable, together with the skipped linking specs in e2e/social.spec.ts. --> (Add VK / Add Telegram / Unlink) and the non-guest matrix come next, together
<section class="emailbox" hidden> with the skipped linking specs in e2e/social.spec.ts. -->
<section class="emailbox" hidden={!p.isGuest}>
<h3>{t('profile.linkAccount')}</h3> <h3>{t('profile.linkAccount')}</h3>
{#if !emailSent} {#if !emailSent}
<div class="addrow"> <div class="addrow">
@@ -272,7 +273,8 @@
</div> </div>
{/if} {/if}
{#if telegramLinkable} {#if telegramLinkable}
<button class="ghost tg" onclick={linkTelegram} disabled={!connection.online}>{t('profile.linkTelegram')}</button> <!-- Provider linking lands with the non-guest matrix (PR2); kept wired but hidden. -->
<button class="ghost tg" hidden onclick={linkTelegram} disabled={!connection.online}>{t('profile.linkTelegram')}</button>
{/if} {/if}
</section> </section>