Encht storybook

Every screen rendered from the real source. Rules and tokens: STORYBOOK.md. Rebuild with python3 docs/storybook/build.py. Widget previews use stub Telegram theme colors.

Mini App: home

Welcome (onboarding 1 of 3)app-welcome · Mini App home at /app. Same wsrc/home.js and CSS that webapp.home_page serves. The chat widget still uses wsrc/app.js.
Bet size (onboarding 2 of 3)app-size
How to start (onboarding 3 of 3)app-go
Home, Real, no account yetapp-home-real-new
Home, Real, account created, setup not finishedapp-home-real-setup
Home, Real, setup finished, no moneyapp-home-real-ready
Home, Real, fundedapp-home-real-funded
Home, Demo, auto copy on, streakapp-home-demo-on
Home, Demo, paused, down todayapp-home-demo-paused
Home with status line (after a tap that needs a chat reply)app-home-msg
Bets list (open, pending, won)app-bets
Bets, emptyapp-bets-empty
Results, 7 daysapp-results
Results, emptyapp-results-empty
Settings, account not createdapp-settings-new
Settings, account ready, custom daily stopapp-settings-ready
Tab barapp-tabbar · Floating Liquid Glass bar. Home, Bets, Results, Settings. The selected tab is a darker glass pill. Its icon and label are mascot teal. It sits above the iPhone safe area.
Buttons: solid primary and round glassapp-buttons · Create my account is a solid white pill with dark text. Add money and Withdraw are round glass circles with labels under them. The eye is a round glass circle.
Bet detail sheetapp-bet-sheet · Liquid Glass sheet. Logo, title, side, stake, entry, and the public CLOB price line. Cash out uses the existing withdraw action. Swipe down closes it.
Results profit lineapp-results-chart · The line is the running sum of these settled results, oldest first. 7 days, 30 days, and All switch the same data. No points are invented.
First openapp-onboarding · Shown once. Progress bar, brand mark, three swipe screens, then a solid teal Get started. The server stores the seen flag and the next step is bet size, then setup and Add money.
Live numbersapp-live · While the Mini App is visible it reads /api/state about every 5 seconds and counts the balance up or down. It pauses while the page is hidden. The screen is not rebuilt when only the number changes.
Hapticsapp-haptics · Telegram haptics when they exist: a light impact for tabs, the eye, and the auto copy toggle. Success for a won bet and for a cash out that asks for an address. Error when a request fails or cash out is refused. Nothing happens when haptics are missing.
List rows, long bets listapp-list-rows · Each row uses the market icon or image URL from the public Gamma API, cached on the market. The thumbnail is a rounded square with no border, loaded lazily. A missing image keeps the teal initial. Back to top is a glass pill once the list has 6 or more rows.

Chat widget: bet

New bet, Demo, waitingbet-open-demo
New bet, Real, waitingbet-open-real
Real, winnings pendingbet-claimable
Won (one time confetti)bet-won
Lostbet-lost

Mini App: account (Privy)

check / waitmini-check
ready (create account)mini-ready
signinmini-signin
busymini-busy
sign, account setupmini-sign-account
sign, cash outmini-sign-cash
donemini-done
blocked (region)mini-blocked
errormini-err
opened outside Telegrammini-notg

Mini App: notifications

Notifications, loadednotif-default
Notifications, opened outside Telegramnotif-outside

Chat surfaces

Chat menu button (set on the bot, opens the Mini App)chat-menu · Set with setChatMenuButton type web_app, text Open Encht.
/start, /menu and /settingschat-start-target · One card. One web_app button, Open Encht, to WEBAPP_URL.
Account invitechat-acct-invite
Cash out sign promptchat-cashout

Chat surfaces: old fallback (do not grow)

Old plain home grid, Real. /start does not send thischat-home-fallback-real · bot.home_rows still labels an old callback. Do not send this grid.
Old plain home grid, Demo. /start does not send thischat-home-fallback-demo
Old plain welcome. /start does not send thischat-welcome-fallback

Alerts

Alert: trade result, wonalert-won
Alert: trade result, lostalert-lost
Alert: new trade skippedalert-skipped
Alert: daily stopalert-limit
Alert: Real order not filledalert-unfilled
Alert: summary after quiet hoursalert-held