Skip to content

refactor(lobby): split LobbyScreen into per-section files#33

Merged
netqo merged 1 commit into
devfrom
refactor/lobby-split
Jun 11, 2026
Merged

refactor(lobby): split LobbyScreen into per-section files#33
netqo merged 1 commit into
devfrom
refactor/lobby-split

Conversation

@netqo

@netqo netqo commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

LobbyScreen.kt had grown to ~1100 lines, mixing the screen scaffold with every section composable (header, balance hero, games grid, quick actions, recent activity, loading skeleton). This PR moves each section into its own sibling file under feature/lobby, leaving LobbyScreen.kt (~370 lines) with just the state scaffold, the shared building blocks (Divider, NepFab) and the internal design tokens.

New files: LobbyHeader, LobbyBalanceHero, LobbyGamesSection, LobbyQuickActions, LobbyRecentActivity, LobbyLoading.

Rationale

Lobby was the outlier against Wallet, News and Assistant, which already split their sections into per-file composables. Aligning it improves navigability and keeps each file under the detekt function-count budget. While splitting, the repeated background + border boilerplate shared by the tappable cards (game card, coinflip card, quick action card) was lifted into a single Modifier.lobbyCardSurface(fill, stroke) extension.

No behavior or layout change: the public LobbyScreen API and the rendered output are identical. Verified on device.

Verification

  • ./gradlew ktlintCheck detekt testDebugUnitTest -> BUILD SUCCESSFUL
  • ./gradlew assembleDebug -> BUILD SUCCESSFUL
  • Lobby (success / loading / error) checked on device; renders identically to before the split.

Test plan

  • ktlint + detekt clean
  • JVM unit tests green
  • Debug APK assembles
  • Lobby renders identically on device (success, loading, error states)

Checklist

  • Commit messages follow Conventional Commits (see CONTRIBUTING.md).
  • Branch name follows the naming convention (refactor/).
  • The change is scoped: no unrelated edits sneaked into this PR.
  • If user-visible behavior changed, CHANGELOG.md has been updated under [Unreleased]. (No user-visible change; pure restructuring.)
  • If a new dependency was added, it is justified in the PR description. (No new dependency.)

LobbyScreen.kt had grown to ~1100 lines, mixing the screen scaffold with
every section composable (header, balance hero, games grid, quick
actions, recent activity, loading skeleton). That made it the outlier
against Wallet, News and Assistant, which already split their sections
into sibling files.

Move each section into its own file under feature/lobby, leaving
LobbyScreen.kt with the state scaffold, the shared building blocks
(Divider, NepFab) and the internal tokens. Extract the repeated
background + border boilerplate the tappable cards shared into a
`Modifier.lobbyCardSurface` extension.

No behavior or layout change: the public LobbyScreen API and the
rendered output are identical.
@netqo netqo merged commit 06f080a into dev Jun 11, 2026
3 checks passed
@netqo netqo deleted the refactor/lobby-split branch June 11, 2026 04:17
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