You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Introduce Dashboard with Home/Logs/Settings tabs, bank list and UI refactor - #12
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).
val transactionCountByBank = allTransactions.groupingBy { it.bank }.eachCount()
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
SettingsScreenwith a navigable dashboard to give a clearer overview of sync stats, configured banks and runtime logs.Home,LogsandSettingstabs and by making save/sync flows and validation more explicit.LazyColumn, rounded cards and small styling/padding improvements.Description
SettingsScreenwithDashboardScreenand addedDashboardTabenum andBankItemUidata class to model UI state.NavigationBarand three tab composables:HomeTabContent,LogsTabContent, andSettingsTabContent, and moved log viewer intoLogsTabContent.bankItemsfrom the database transactions and configured parser plugins by loading transactions in aLaunchedEffect, grouping bybank, and mappingSmsParsePlugin.listFromJsontoBankItemUi.StatsCardwithStatGridCard, addedBankCardfor per-bank entries, switched several scrollable lists toLazyColumnand updated paddings/rounded corners for cards.SyncConfig.saveandSyncScheduler.reconfigurePeriodic, and addedSyncScheduler.enqueueImmediatefor manual sync.BankSMSTheme(darkTheme = true, dynamicColor = false), move some IO towithContext(Dispatchers.IO), and tidy delay/clearing of transientsaveMessagevia coroutine.Testing
./gradlew assembleDebugand the build completed successfully../gradlew testand they passed.SyncScheduler.reconfigurePeriodicand manual sync triggersenqueueImmediate(no automated instrumentation tests were run).Codex Task