fix(03-04): web_app menu button on deployed origin + wire CTA actions on both denied-shaped cards

This commit is contained in:
araharah-executor
2026-10-23 01:00:27 +08:00
parent fc183216c3
commit b1d8768866
2 changed files with 76 additions and 8 deletions
+15 -8
View File
@@ -113,14 +113,21 @@ async function boot(): Promise<void> {
let tickStarted = false;
let chainInFlight = false;
const retryButton = deniedCard.querySelector(".btn-secondary");
if (retryButton instanceof HTMLButtonElement) {
retryButton.addEventListener("click", () => void runFromSession()); // D-06: re-runs from link 1
}
const askButton = deniedCard.querySelector(".btn-primary");
if (askButton instanceof HTMLButtonElement) {
askButton.addEventListener("click", () => void askViaChat()); // D-06: the Desktop Telegram path
}
// D-06: BOTH denied-shaped instances get live CTAs. 'denied-then-waiting'
// is a second buildDeniedCard instance (03-03 stub note) — wiring only the
// first left TRY AGAIN / ASK VIA CHAT dead on the awaiting-pin card.
const wireDeniedActions = (card: HTMLElement): void => {
const retryButton = card.querySelector(".btn-secondary");
if (retryButton instanceof HTMLButtonElement) {
retryButton.addEventListener("click", () => void runFromSession()); // re-runs from link 1
}
const askButton = card.querySelector(".btn-primary");
if (askButton instanceof HTMLButtonElement) {
askButton.addEventListener("click", () => void askViaChat()); // the Desktop Telegram path
}
};
wireDeniedActions(deniedCard);
wireDeniedActions(awaitingCard);
function showCard(card: HTMLElement | null, register: "center" | "bottom" = "center"): void {
if (card !== null) {