Skip to content

Introduce Dashboard with Home/Logs/Settings tabs, bank list and UI refactor - #12

Closed
abd3-13 wants to merge 2 commits into
mainfrom
codex/update-compose-ui-for-modern-dashboard-kzqnv4
Closed

abd3-13 wants to merge 2 commits into
mainfrom
codex/update-compose-ui-for-modern-dashboard-kzqnv4

Conversation

@abd3-13

@abd3-13 abd3-13 commented Apr 3, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Replace the single SettingsScreen with a navigable dashboard to give a clearer overview of sync stats, configured banks and runtime logs.
  • Surface per-bank information derived from stored transactions and parser plugins so users can see which banks are active and how many SMS entries exist.
  • Improve UX by splitting responsibilities into Home, Logs and Settings tabs and by making save/sync flows and validation more explicit.
  • Modernize layout with LazyColumn, rounded cards and small styling/padding improvements.

Description

  • Replaced SettingsScreen with DashboardScreen and added DashboardTab enum and BankItemUi data class to model UI state.
  • Added a bottom NavigationBar and three tab composables: HomeTabContent, LogsTabContent, and SettingsTabContent, and moved log viewer into LogsTabContent.
  • Compute bankItems from the database transactions and configured parser plugins by loading transactions in a LaunchedEffect, grouping by bank, and mapping SmsParsePlugin.listFromJson to BankItemUi.
  • Replaced the old StatsCard with StatGridCard, added BankCard for per-bank entries, switched several scrollable lists to LazyColumn and updated paddings/rounded corners for cards.
  • Added validation when saving parser plugins and updated save flow to call SyncConfig.save and SyncScheduler.reconfigurePeriodic, and added SyncScheduler.enqueueImmediate for manual sync.
  • Minor changes: force dark theme by calling BankSMSTheme(darkTheme = true, dynamicColor = false), move some IO to withContext(Dispatchers.IO), and tidy delay/clearing of transient saveMessage via coroutine.

Testing

  • Ran a debug build with ./gradlew assembleDebug and the build completed successfully.
  • Executed unit tests with ./gradlew test and they passed.
  • Performed a local run to verify the compose UI loads and that saving settings triggers SyncScheduler.reconfigurePeriodic and manual sync triggers enqueueImmediate (no automated instrumentation tests were run).

Codex Task

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

val allTransactions = withContext(Dispatchers.IO) {
dao.getByStatuses(listOf("PENDING", "SENT", "FAILED"))
}
val transactionCountByBank = allTransactions.groupingBy { it.bank }.eachCount()

P2 Badge Aggregate bank counts in SQL instead of loading all rows

The dashboard now fetches every PENDING/SENT/FAILED transaction and then groups them in Kotlin on the main dispatcher to compute per-bank counts. On devices with a large SMS history, opening or refreshing the dashboard will allocate and iterate over the entire table, which can cause UI jank or ANRs even though only aggregate counts are needed. Compute the counts in Room with a GROUP BY bank query (or keep the grouping inside Dispatchers.IO) so this path stays bounded and off the UI thread.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@abd3-13 abd3-13 closed this Apr 3, 2026
@abd3-13
abd3-13 deleted the codex/update-compose-ui-for-modern-dashboard-kzqnv4 branch April 3, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant