fix(03-04): Telegram LocationManager deep-link — LOCATION SETTINGS CTA on denied cards + locationManagerUpdated chain re-run

This commit is contained in:
araharah-executor
2026-10-23 01:06:52 +08:00
parent fff865f6cd
commit 9fa4acb319
3 changed files with 50 additions and 11 deletions
+17 -9
View File
@@ -126,15 +126,23 @@ export function buildBootCard(locale: Locale, stage: 1 | 2): HTMLElement {
* issue #77) and the retry CTA is .btn-secondary (the RESEARCH Pitfall 4
* inversion, recorded as a callout in the UI-SPEC). With opts.awaitingPin
* the body swaps to the chat-fallback waiting copy. */
export function buildDeniedCard(locale: Locale, opts: { awaitingPin?: boolean } = {}): HTMLElement {
return mountHintedCard(
locale,
"deniedRegister",
"deniedHeadline",
opts.awaitingPin ? "chatFallbackWaiting" : "deniedBody",
"deniedHint",
true,
);
export function buildDeniedCard(
locale: Locale,
opts: { awaitingPin?: boolean; withLocationSettings?: boolean } = {},
): HTMLElement {
const card = mountHintedCard(locale, "deniedRegister", "deniedHeadline", opts.awaitingPin ? "chatFallbackWaiting" : "deniedBody", "deniedHint", true);
// Debug-round addition (03-DEVICE-MATRIX round 2): Telegram-only recovery
// path — opens Telegram's own location-access pane via LocationManager.
// Its callback fires locationManagerUpdated; main.ts re-runs the chain.
if (opts.withLocationSettings) {
const el = document.createElement("button");
el.type = "button";
el.className = "btn-secondary";
el.dataset.role = "open-location-settings";
el.textContent = strings[locale].ctaLocationSettings;
card.querySelector(".card-actions")?.appendChild(el);
}
return card;
}
/** SYS-labeled position register — the 45s-staleness card (folds into the