Skip to content

feat(history): port the cu-10 game history screen with live filtering#25

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

feat(history): port the cu-10 game history screen with live filtering#25
netqo merged 1 commit into
devfrom
feat/history-screen

Conversation

@netqo
Copy link
Copy Markdown
Owner

@netqo netqo commented May 27, 2026

Summary

  • Replaces the History placeholder with the cu-10 mockup port: title, search input, two filter groups (Game in a wrapping FlowRow, Result on a single line), aggregate summary strip and round list.
  • Round taps route through onOpenRound to Route.RoundDetail.build(id); an EmptyState falls back when the active filters + search yield zero matches.
  • Extracts GameKey and RoundOutcome out of feature/lobby/LobbyUiState into a shared model package so lobby's recent activity and history's round filter resolve the same domain types.
  • Adds a wrap flag to FilterChipRow that switches the inner layout from Row to FlowRow without touching the existing scrollable mode.

Notes

  • Filtering runs in-screen via derivedStateOf. The summary strip stays aggregated over the full unfiltered set (mockup shows 128 rounds even with only the five preview rows visible).
  • Search matches the round id and the game label by case-insensitive substring; combined with the chip filters this is enough to demonstrate the surface until the Firestore-backed VM lands.
  • Coinflip's third metric column renders 'Prediction' instead of 'Multiplier' since the mockup uses the heads/tails label there.

Test plan

  • ./gradlew assembleDebug
  • ./gradlew ktlintCheck
  • ./gradlew detekt
  • ./gradlew connectedDebugAndroidTest (HistoryScreenTest: 4/4 passing on device)
  • Installed on device, walked the filter combinations and the round tap

Wires the History destination to a real screen rendering the search
input, two filter groups, summary strip and round list from the
mockup.

  * Game filter chips (All + the 5 games) live in a FlowRow so the
    six chips wrap to a second line on phone widths.
  * Result filter chips (All / Wins / Losses) stay on a single line.
  * The search input matches the round id and the game label by
    substring; combined with the filters it drives a derivedStateOf
    over the round list.
  * The summary strip stays aggregated over the full unfiltered set
    (the mockup shows 128 rounds even with five rows visible).
  * Each round row uses StackCard's leftAccent stripe (ok for wins,
    danger for losses), shows the bet / payout / multiplier breakdown
    (Prediction for Coinflip), and routes through onOpenRound to
    Route.RoundDetail.build(id) when tapped.
  * An EmptyState falls back when filters + search yield zero matches.

Extracts GameKey + RoundOutcome from feature/lobby/LobbyUiState into
a shared `model` package so lobby's recent activity and history's
round filter resolve the same domain types instead of cross-feature
importing.

Adds a `wrap` flag to FilterChipRow that switches the inner layout
from Row to FlowRow without disturbing the existing scrollable mode.
@netqo netqo merged commit 4478fbd into dev May 27, 2026
3 checks passed
@netqo netqo deleted the feat/history-screen branch May 27, 2026 18:48
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