Skip to content

feat(lobby): port the cu-03 lobby screen with all three states#22

Merged
netqo merged 1 commit into
devfrom
feat/lobby-screen
May 27, 2026
Merged

feat(lobby): port the cu-03 lobby screen with all three states#22
netqo merged 1 commit into
devfrom
feat/lobby-screen

Conversation

@netqo
Copy link
Copy Markdown
Owner

@netqo netqo commented May 27, 2026

Summary

  • Replaces the Lobby placeholder with the cu-03 mockup port: header, balance hero, 5-card games grid, quick actions, recent activity and the Nep assistant FAB.
  • Renders all three lobby states (Success, Loading skeleton, Error with retry / use-cache) backed by a sealed LobbyUiState. Static LobbyPreviewData drives previews and the live nav-host until a Firestore VM lands.
  • Promotes Modifier.gridBackground out of LoginScreenEffects into ui/components so every primary screen shares one implementation.

Notes

  • Hide-balance toggle uses the mockup's stacked-slot trick (amount + masked dots in the same Box, alpha-toggled) so nothing on the screen shifts.
  • Currency picker is a real DropdownMenu toggling between USDC and USDT; the network label stays put since both live on Polygon.
  • Crash card balances the LAST PLAYED badge against its row siblings: the icon drops 16dp to clear the badge, but the icon-to-title gap shrinks by 16dp so the card total height matches Mines / Roulette / Blackjack and the grid row no longer stretches.

Test plan

  • ./gradlew assembleDebug
  • ./gradlew ktlintCheck
  • ./gradlew detekt
  • ./gradlew testDebugUnitTest
  • ./gradlew connectedDebugAndroidTest (LobbyScreenTest: 3/3 passing on device)
  • Installed on device, walked success / loading / error previews and the live Lobby

Wires the Lobby destination to a real screen rendering the success,
loading and error variants from the mockup. The success state uses the
StackCard/BalancePill/Skeleton/ErrorState components shipped in #21.

- Header: avatar, greeting and notifications button with unread badge.
- Balance hero: AVAILABLE label, PnL chip on its own slot (fades to
  alpha 0 on hide so the row never shifts), session stats on a second
  line, amount stacked with the masked dots so toggling visibility does
  not shift any surrounding layout, currency dropdown switching USDC
  and USDT, and the locked column on the right.
- Games grid: Roulette, Blackjack, Crash (LAST PLAYED, badge inset 8dp
  with the icon dropped 16dp and a shorter icon-to-title gap so the
  card height matches its row siblings), Mines and a full-width
  Coinflip card.
- Quick Actions: Deposit (down arrow, ok-green) and Withdraw (up
  arrow, warn-amber) routing to the wallet.
- Recent activity: three rows backed by StackCard with the win/loss
  left accent stripe.
- Nep FAB overlay aligned to the bottom-right of the scroll area.

LobbyPreviewData seeds the @Preview composables and the live nav-host
until the Firestore-backed ViewModel ships in a later card.

Promotes Modifier.gridBackground out of LoginScreenEffects into
ui/components so the lobby and the upcoming primary screens share it.
@netqo netqo merged commit b34d0c9 into dev May 27, 2026
3 checks passed
netqo added a commit that referenced this pull request May 27, 2026
* refactor(lobby): drop dead Coinflip icon fallback

GameKey.iconRes() returned the Crash drawable for Coinflip with a note
that the branch only existed to keep the when exhaustive. That was a
latent bug: RecentRoundRow walks every GameKey, so a Coinflip round
would render with the wrong icon.

Adds a proper coinflip drawable (two overlapping circles) and points
the when branch at it. Also drops the leftover "notifications sheet
deferred" comment at the LobbyHeader call site since the empty lambda
already documents the intent.

* fix(lobby): baseline-align the two labels under each game card title

The right meta label (RTP / Last / Up to) uses tnum digits while the
left meta label (European, Classic, Multiplier, 5x5 Grid) uses only
letters. Plain Top / Bottom row alignment renders the two with a
visible vertical offset because the two glyph sets report different
line metrics. alignByBaseline pins them to the typographic baseline
so they read as a single label pair.

Coinflip's HEADS . TAILS keeps the explicit Alignment.Bottom modifier
because its row mixes the badge, the title+subtitle column and the
meta label - baseline alignment would tie it to the title row.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant