e336638ca8
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 57s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m8s
Inside Telegram, a failed initData authentication (e.g. the backend down during a deploy) dropped the user onto the web login screen — the /app/ experience, which has no place inside the Mini App. bootstrap now retries the launch a few times in silence and then renders a dedicated boot-error screen with a Retry button (new BootError.svelte, app.bootError), never falling back to the web sign-in. A blocked account is still terminal and goes straight to the blocked screen. The profile "Link an account" section (email + Telegram link) is hidden while sign-in is provider-only; the anonymous /app/ guest whose upgrade path this is comes later. The flow is kept wired (`hidden` on .emailbox) and its two e2e specs are skipped, both to be re-enabled together. Adds i18n boot.* copy (en/ru), a mock authTelegram failure hook plus an e2e covering the retry screen, and bakes both behaviours into FUNCTIONAL(.md/_ru).
64 lines
1.5 KiB
Svelte
64 lines
1.5 KiB
Svelte
<script lang="ts">
|
|
// The Mini App launch failed to authenticate after its silent retries (e.g. the backend was
|
|
// briefly down during a deploy). Inside Telegram there is no web login to fall back to, so this
|
|
// terminal screen offers a manual Retry that re-runs the launch (app.svelte retryTelegramBoot).
|
|
import { retryTelegramBoot } from '../lib/app.svelte';
|
|
import { t } from '../lib/i18n/index.svelte';
|
|
|
|
let retrying = $state(false);
|
|
async function retry(): Promise<void> {
|
|
if (retrying) return;
|
|
retrying = true;
|
|
try {
|
|
await retryTelegramBoot();
|
|
} finally {
|
|
retrying = false;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div class="boot">
|
|
<div class="card">
|
|
<h1>{t('boot.errorTitle')}</h1>
|
|
<p class="msg">{t('boot.errorBody')}</p>
|
|
<button class="retry" onclick={retry} disabled={retrying}>{t('common.retry')}</button>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.boot {
|
|
height: 100%;
|
|
display: grid;
|
|
place-items: center;
|
|
padding: 24px;
|
|
background: var(--bg);
|
|
}
|
|
.card {
|
|
max-width: 28rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
text-align: center;
|
|
color: var(--text);
|
|
}
|
|
h1 {
|
|
margin: 0;
|
|
font-size: 1.25rem;
|
|
}
|
|
.msg {
|
|
margin: 0;
|
|
color: var(--text-muted);
|
|
}
|
|
.retry {
|
|
padding: 9px 16px;
|
|
border: 1px solid var(--accent);
|
|
background: var(--accent);
|
|
color: var(--accent-text);
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
.retry:disabled {
|
|
opacity: 0.5;
|
|
}
|
|
</style>
|