feat(04-04): the destination resolver — two carriers, one validation, memory only

- resolve-destination.ts: reads ?dest= (URL, primary — the inline
  web_app-button carrier) then initData's start_param (the signed
  string, secondary — the direct-link/home-screen carrier), ONE
  slug validation, dest_ prefix stripped; resolves against the
  webview's own build-time @araharah/search copy; honest null for
  unknown ids; module-scope memory-only holder (GEO-03/D-07)
- destination-card.ts: the confirmation + honest-unavailable cards,
  createElement/textContent only, existing theme classes (T-04-32)
- webapp.ts: TelegramWebAppLike gains startParam, addToHomeScreen?,
  checkHomeScreenStatus? + HomeScreenStatus (Bot API 8.0+ members)
- telegram-mock.ts: satisfies the extended contract in the same
  change (startParam initData wiring, homeScreenStatus, __homeScreenAdded)
- strings.ts: 5 new copy fields in en+ms; web depends on @araharah/search
- DP1-DP12 green (45/45 web suite), web:typecheck green
This commit is contained in:
araharah-executor
2026-10-24 01:33:56 +08:00
parent 3e3d1917e6
commit 4f958411f3
7 changed files with 269 additions and 8 deletions
+15
View File
@@ -40,6 +40,11 @@ export interface ShellStrings {
stripAwaitingPin: string;
attribution: string;
ariaRecenter: string;
destinationHeadline: string;
destinationUnavailableHeadline: string;
destinationUnavailableBody: string;
addToHomeScreen: string;
homeScreenAlreadyAdded: string;
}
export type Locale = "en" | "ms";
@@ -72,6 +77,11 @@ export const strings: Record<Locale, ShellStrings> = {
stripAwaitingPin: "AWAITING PIN",
attribution: "© OpenStreetMap contributors",
ariaRecenter: "Recenter map",
destinationHeadline: "Destination",
destinationUnavailableHeadline: "Destination unavailable",
destinationUnavailableBody: "That place is not in this build. Search again from the bot.",
addToHomeScreen: "ADD TO HOME SCREEN",
homeScreenAlreadyAdded: "Already on your home screen",
},
ms: {
bootValidatingRegister: "BOOT-01 // SESSION",
@@ -100,6 +110,11 @@ export const strings: Record<Locale, ShellStrings> = {
stripAwaitingPin: "AWAITING PIN",
attribution: "© OpenStreetMap contributors",
ariaRecenter: "Tetapkan semula peta",
destinationHeadline: "Destinasi",
destinationUnavailableHeadline: "Destinasi tidak tersedia",
destinationUnavailableBody: "Tempat itu tiada dalam binaan ini. Cari semula dari bot.",
addToHomeScreen: "TAMBAH KE SKRIN UTAMA",
homeScreenAlreadyAdded: "Sudah di skrin utama anda",
},
};