Skip to content

🦖😱 HUGE!! Bento Integration - #192

Merged
kcw-grunt merged 47 commits into
developfrom
bento
Apr 14, 2026
Merged

kcw-grunt merged 47 commits into
developfrom
bento

Conversation

@kcw-grunt

@kcw-grunt kcw-grunt commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

🦖😱 HUGE!! Bento Integration

📱 Description

This PR integrates the Bento design system throughout the Brainwallet Android app, marking a major architectural shift from legacy Activities/Fragments to a modern Jetpack Compose-based UI. The integration includes new Bento-specific screens, updated build configuration, consolidated constants, and infrastructure for the new Compose-driven navigation system. This is a foundational change enabling future UI modernization.

Platform

  • Android

🎯 Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🔧 Refactoring (code change that neither fixes a bug nor adds a feature)
  • 📚 Documentation update
  • 🎨 UI/UX improvement
  • ⚡ Performance improvement
  • 🧪 Test addition or improvement

📋 Changes

New Components Added

  • BWConstants.kt – Centralized Kotlin constants object replacing scattered Java constants; includes app version, animation durations, request codes, preference keys, currency units, analytics events, and API endpoints
  • Constants.kt – Bento-specific dimension constants (dp values) for balance game height, transaction rows, QR codes, navigation bars, icons, and spacing
  • GlobalCurrency.kt – Comprehensive enum of 99+ fiat currencies with ISO codes, names, symbols, and country flags; includes CurrencyUtils for symbol lookup
  • LtcStats.kt – Data model for Litecoin blockchain statistics (block height, mempool transactions/size, 24h transaction count) with kotlinx.serialization support
  • ConnectivityRepository.kt – New @Single Koin repository using StateFlow and ConnectivityManager callbacks to expose real-time network connectivity status
  • BalanceBentoScreen.kt, BalanceBentoState.kt, BalanceBentoEvent.kt – New Bento balance section screen using MVI pattern with Compose UI
  • .github/workflows/bento-auto-translate.yml – New GitHub Actions workflow for automated Bento translation pipeline
  • Updated CI/CD configs – CircleCI and GitHub Actions workflow enhancements for auto-translation and PR summaries

Modifications

  • app/build.gradle.kts

    • Downgraded compileSdk and targetSdk from 36 to 35
    • Removed kapt plugin (migrated to KSP)
    • Updated version: v4.8.0v4.8.4, versionCode incremented
    • Moved Firebase Crashlytics and screengrab paper key config to top-level block
    • Added Compose Material Icons Extended, Espresso, Runtime, Foundation, and Animation dependencies
    • Added immutable collections and extra coroutine/turbine test deps (duplicates cleaned up)
    • Enabled unit and Android test coverage in debug build type
    • Uncommented release signing config and build type configuration
  • BrainwalletApp.kt

    • Replaced BRConstants._20191105_AL with BWConstants._20191105_AL
    • Added debug-only Firebase Crashlytics setup (build_type key, user ID)
    • Wrapped AppsFlyerLib initialization in !BuildConfig.DEBUG check (disabled in debug builds)
    • Cleaned up commented-out FirebaseMessaging code and duplicate Timber planting
  • AndroidManifest.xml

    • Reformatted AppInitializer provider metadata for clarity
    • Added TODO and disabled EmojiCompatInitializer to prevent Context leak in Memory Profiler
    • Removed trailing blank line after ScanQRActivity
  • Repository & Data Source files

    • Updated imports and refactored connectivity, Firebase Remote Config, LTC stats, settings, and transaction repositories to align with new constants and Compose patterns
    • Added interface/abstract base classes for better abstraction
  • Navigation & UI Core

    • Updated MainNavigationHost.kt, Route.kt, and UiEffect.kt to support Compose-based navigation
    • Enhanced BrainwalletActivity.kt and BrainwalletViewModel.kt for MVI pattern integration
  • Legacy Activity/Fragment Updates

    • Minimal changes to existing Java/Kotlin Activities and Fragments to maintain backward compatibility during Bento rollout (BreadActivity, LoginActivity, HistoryFragment, etc.)
    • Updated imports where legacy code references moved constants

Removals

  • kapt plugin – Replaced with KSP (Kotlin Symbol Processing) for better performance
  • Old constant scattering – Legacy BRConstants.java references consolidated into BWConstants.kt
  • Inline Firebase/screengrab config – Moved to top-level android block for clarity

📊 Statistics

  • Additions: 16,677 lines
  • Deletions: 12,764 lines
  • Files Changed: 100
  • Commits: 47

🧪 Tests Status 323

  • Tests ran successfully locally?
  • Added more tests? How many? 323

📸 Screenshots/Videos

Before After
Screenrecorder-2025-05-14-08-18-21-980 favs-tutorials

🎯 Reviewers

@kcw-grunt, @josikie


Draft Status: This PR is currently in draft mode and ready for review feedback.


⚠️ Review Notes for Maintainers

Potential Concerns:

  1. Kotlin migration in progress – Mixed Java/Kotlin codebase with legacy Activities still present; Bento integration is phased
  2. SDK downgradecompileSdk 36→35 and targetSdk 36→35; verify this aligns with project requirements
  3. AppsFlyerLib disabled in debug – May affect analytics testing; confirm this is intentional
  4. Duplicate dependencies – Some test dependencies (mockk, turbine, kotlinx-coroutines-test) appear twice in gradle; recommend cleanup
  5. Large PR scope – 100 files and 47 commits; consider breaking into smaller reviewable chunks for future PRs
  6. EmojiCompatInitializer disabled – Comment indicates Context leak fix; monitor for emoji rendering issues in production

JosephSanjaya and others added 30 commits October 9, 2025 19:15
* create private gp submodule

* Update settings.gradle.kts

* chore: Migrate build logic to version catalog and update submodules

This commit migrates the project's build logic to use a centralized version catalog (`grunt`) and updates submodule references.

Specific changes include:

*   **Submodule Updates:**
    *   Updated `gruntsoftware-build-logic` submodule pointer.
    *   Updated `modules/private-general-purpose` submodule pointer.
*   **Build Configuration (`settings.gradle.kts`):**
    *   Removed the conditional loading of the `games` version catalog.
    *   Added a `grunt` version catalog loaded from `gruntsoftware-build-logic/gradle/libs.versions.toml`.
    *   Changed the included module from `:modules:private-general-purpose:content` to `:modules:private-general-purpose:games`.
    *   Removed conditional inclusion logic for `:modules:private-general-purpose:content`.
*   **Root `build.gradle.kts`:**
    *   Updated plugin aliases from `libs.plugins.android.*` to `grunt.plugins.android.*`.
*   **App `build.gradle.kts`:**
    *   Updated plugin alias for `com.android.application` from `libs` to `grunt`.
    *   Updated the `games` module dependency to `implementation(project(":modules:private-general-purpose:games"))` and removed the conditional logic for `findProject(":modules:games:content")`.
    *   Updated various dependencies to use the `grunt` version catalog (e.g., `grunt.androidx.core.ktx`, `grunt.androidx.compose.bom`, `grunt.bundles.androidx.compose`, `grunt.material`).
*   **Version Catalog (`gradle/libs.versions.toml`):**
    *   Removed versions for `agp` and `androidx-core-ktx`.
    *   Removed versions for `androidx-compose-bom`, `androidx-activity-compose`, and `androidx-fragment-compose`.
    *   Removed `androidx-core` library alias.
    *   Removed various `androidx-compose` library aliases and the `androidx-compose` bundle.
    *   Removed `android-application` and `android-library` plugin aliases.

* feat(deps): add kotlin-immutable dependency

This commit adds the `kotlinx-collections-immutable` library, version 0.4.0, to the project's dependencies.

* refactor(app): Relocate core module imports

Updates the import paths for the core presentation module from `ltd.grunt.brainwallet.core.presentation` to `com.grunt.brainwallet.core.presentation`. This refactoring touches multiple UI components and initializers across the `app` module to align with the new package structure.

Additionally, this commit corrects a typo in `SeedWordItem.kt`, changing the error color variable from `chilli` to `chili` to match the theme definition.

Finally, the submodule pointer for `private-general-purpose` is updated.

---------

Co-authored-by: Kerry Washington <mrkerrywashington@icloud.com>
This commit introduces the new `bento` Android libs module.

It scaffolds the main screen (`BentoMainScreen`) which features a bento-style grid layout, a top action bar, a bottom navigation bar, and a modal navigation drawer with a custom rail.

Key additions include:
- `BentoActivity` as the main entry point.
- Composable components for the main screen, rail, and various widgets.
- Initial Gradle setup with necessary dependencies.
- Android Manifest, resources, and vector drawables for the UI.
- Inclusion of the `:bento` module in `settings.gradle.kts`.
* Adjusted the padding to show the status bar at the top

Compiling  and added MVVM Classes
Adding ComponentActivity instead of AppCompat
connecting the Tab Actions
Debugging the modals for the tab bar
Successfully wired in tab actions

* version bump
* Adjusted the padding to show the status bar at the top

Compiling  and added MVVM Classes
Adding ComponentActivity instead of AppCompat
connecting the Tab Actions
Debugging the modals for the tab bar
Successfully wired in tab actions

* Added the background and text

* WIP: Resetting the bento ratios and the GameHub bento layout

* Added ibm plex sans

Polished the bottom nav bar

* WIP: Layout of the MainScreen is 75% is there but it doesnt work 100%

Working in the alts

* Further discovery of the Settings data

* version bump

* version bump

Resetting the bento ratios and the GameHub bento layout
Added ibm plex sans
Polished the bottom nav bar
Further discovery of the Settings data
* Version bump

* Updated the modules and fixed some warnings

Set the sdks
Updated the submodules prior to the android-build-modules
remove old android build logic

* Updated the BRKeystore with a new putMasterPubKey method

* Added more bulletproofing of the store pubkey

Reset the secp256k1 commit: b408c6a
This version is entirely sensitive of the lib because the Bitcoin devs decided it was not necessary flag. We still use it

* RC:  Verified the NEW_WALLET PATH now works

The Ready path works.
Added a FB if failing

* Minor polish to the InputWords layout

* Removed the commented out BRKeyStoreTest

* Clean issue in remove tests

* Added working BRKeyStore tests

* Removed example test(s)

* version bump

* Rename Test stage
* Version bump

* Updated the modules and fixed some warnings

Set the sdks
Updated the submodules prior to the android-build-modules
remove old android build logic

* Updated the BRKeystore with a new putMasterPubKey method

* Added more bulletproofing of the store pubkey

Reset the secp256k1 commit: b408c6a
This version is entirely sensitive of the lib because the Bitcoin devs decided it was not necessary flag. We still use it

* RC:  Verified the NEW_WALLET PATH now works

The Ready path works.
Added a FB if failing

* Minor polish to the InputWords layout

* Removed the commented out BRKeyStoreTest

* Clean issue in remove tests

* Added working BRKeyStore tests

* Removed example test(s)

* version bump

* Rename Test stage

* Transferred theme elements

* Changed to local DesignTheme from old BWTheme

* Replaced thet private BrainwalletTheme to a local DesignTheme

This is a WIP

* Fixed the theme toggle button

* WIP: Brought more update UI LTCPicker

Wired in the latest date into the LTC Picker
added new stringResource
Building the LTC Picker
Polished the layout of the LTCPicker Bento
Added a state test
Added a new class enum to match iso to country flags

Added label

version bump

* Polished the unlock screen

* Added new tests for the LTCPickerBento

* WIP: Debugging the toolbar at the top for settings and theme buttons

* Polished the ltc and nav bar

* Added Test Coverage flags in the build gradle
* Deleted old files some cruft some to support new design

* Added new files for the effort to include Composables, strings and images

* Updated resources for strings and images

* Updated the Android Studio and Project files

* Added more test files

* Renamed the BRConstants file to BWConstants

* Changed for the LTCPickerBentos from a previously merged PR

* Reset the Routes and its naming

Reset the Utils for constants
Changing the layout
Renamed a home to main

* Renamed the nav layer

Removed unused code
Added id to TxItem for the Layout of items
Added comments

* Updated the design elements

Added the new name of the activity

* Added an update to the PeerManager

Included the LTCStats using the  new endpoint for the latest block height
Changed the koinModules loading
Added a removal of the connection listener
Added far more functionality into the BrainwalletActivity against BreadActivity
Updated and properly set the core to commit 28d7d31ae057bdde33b1d19e6b7af3ba07710c89

* Added tests to the Balance Bento ViewModel tests

Adjusted the model to support DI

* Added tests for the Event and State classes of BalanceBento

* cleaned the mem settings

adjusted gradle per CircleCI statement recommendation
reorg the circleci config to expand the cache
set the tests run
polish memory in CircleCI

* Fixing new wallet route

Fixed my routing for the new wallet
Tested and verified
* version bump

* Added animation of the transactions bentos

Added the basic transaction rows and detail
added the viewModel and Event
Included the bar icons and the switch
Wired in the composables

Added more string resources

Set detail sizes
Built in Transaction Detail
Connected the isDark from Settings
Polishing the Transaction Row and Detail
added the QR code

WIP: Added constant for the transaction view

Added a empty No Transactions Row when there are not transactions

WIP fixing the toggle

Adding an empty transaction

* Reused the BuyReceive Screen For when the user has no txns

* Added the release candidate layout for the Balance Bento for syncing

Also, polished the sync activity

* Added some padding for the scrolling

Added a blockage if the user has no transactions

* Renamed the preferences

Recalculated the values in the Transactions detail
Added better  layout of the filter toggle button
Debugging the amounts and txItem values

* added unit tests  of Transaction view model

* Reusing the BuyDialog within a Modal

* Polished the layout of the modal

Moved the Receive classes to the bento section
Added tests for the RecieveDialogViewModelTests

* Added more tests for ReceiveDialogState
* Added animation of the transactions bentos

Added the basic transaction rows and detail
added the viewModel and Event
Included the bar icons and the switch
Wired in the composables

Added more string resources

Set detail sizes
Built in Transaction Detail
Connected the isDark from Settings
Polishing the Transaction Row and Detail
added the QR code

WIP: Added constant for the transaction view

Added a empty No Transactions Row when there are not transactions

WIP fixing the toggle

Adding an empty transaction

* Reused the BuyReceive Screen For when the user has no txns

* Added the release candidate layout for the Balance Bento for syncing

Also, polished the sync activity

* Added some padding for the scrolling

Added a blockage if the user has no transactions

* Renamed the preferences

Recalculated the values in the Transactions detail
Added better  layout of the filter toggle button
Debugging the amounts and txItem values

* Reusing the BuyDialog within a Modal

* Polished the layout of the modal

Moved the Receive classes to the bento section
Added tests for the RecieveDialogViewModelTests

* Wired into the Most updated version of the SettingsComposable

Set some constants
Removed references to the legacy version
Changed the location of the package

* Added more tests of the BWConstants

Combined the LTCPicker Tests

* Renamed and reorged the file structure

Deleted unused files

* Debugged the AppModule issue

Debugged the fiat / iso setting throughout the app
Removal of the History classes
Setup the transactionDetail action without route
Removed the BRSharedPrefs callbacks
Converted to Flow style with more popular and modern style

* Migrated more appSetting to StateFlow

Applied StateFlow in most placed for Settings
Some AppSettings need to be migrated

* Added a confirmation indicator

* Pass LTC States

Added a polish into the transaction per row
Added the string localizations
Migrated the data source as state flows
Pass LTC Stats across many VMs

* Refactor to update tests

Removed old code

* localized the tagline
* Added a special test for Insta and Linktree

version bump
WIP Debug the sync state

* Renamed the BRWalletManager callback: onBalancedChanged

* Refactor resources

Removed or modified colors
Removed or modified images
Removed or modified strings

* Added more composables

Added more design elements:Gradients Dashed divider

* small changes to the Transaction classes

* Small update of the Balance Bento

Moved the state to MainViewModel rather than a duplicate in BalanceViewModel

* Refactors the navbar and updated that toml

* Refactored of the MainScreen and related classes

* Refactoring tests

* version bump
* Added working Send group

Polished the layout and UI for Send
Renamed the send prep classes
Added the Memo field in confirm

* Refactoring the Send Rows

Refactored the precision of the amounts for send and balances
Updated all relevant types to BigDecimal
Flowed some values to the ViewModel

* Set formatting of the Confirmation widget

Broke the PreSend Composable into smaller composables
- PreSendAddressRow
- PreSendAmountRow
- PreSendMemoRow
Polished the rows
Added a debug for the memo row
Refactored the amount

* Added focus listener to recalculate the values prior to send

* Added state variable brainwalletIsSyncing to the main

WIP Debugging the send
Readded then camera
Passed the ltc address to the send class
Wiring in the old Send Fragment and testing

* Removed a legacy activity

Adding the Passcode wrapper
Wired in the passcode composable to be used in the send function
Added a combined boolean to check for send disable
fixed the send button enable disable
Relaying out the spaces for the SendScreen
refactor the send modal spacer
Fixed the extra coinflip
Successfully sent. need to cleanup calls

* version bump

* Added a clearance of value on edit

version bump
Added BigDecimal with rounding mode
Updated GitHub Actions workflow to use new translation PAT secret.
* Added working Send group

Polished the layout and UI for Send
Renamed the send prep classes
Added the Memo field in confirm

* Refactoring the Send Rows

Refactored the precision of the amounts for send and balances
Updated all relevant types to BigDecimal
Flowed some values to the ViewModel

* Set formatting of the Confirmation widget

Broke the PreSend Composable into smaller composables
- PreSendAddressRow
- PreSendAmountRow
- PreSendMemoRow
Polished the rows
Added a debug for the memo row
Refactored the amount

* Added focus listener to recalculate the values prior to send

* Added state variable brainwalletIsSyncing to the main

WIP Debugging the send
Readded then camera
Passed the ltc address to the send class
Wiring in the old Send Fragment and testing

* Removed a legacy activity

Adding the Passcode wrapper
Wired in the passcode composable to be used in the send function
Added a combined boolean to check for send disable
fixed the send button enable disable
Relaying out the spaces for the SendScreen
refactor the send modal spacer
Fixed the extra coinflip
Successfully sent. need to cleanup calls

* Added a clearance of value on edit

version bump
Added BigDecimal with rounding mode

* Added Module Tests

* Added gh workflow auto-translate

* Added more Tests: BrainwalletAppTest
* Added design for Top Secret and the Tutorials bentos

Added preview
added strings files and localizations

* Removed HomeBento placeholder code
@kcw-grunt
kcw-grunt requested a review from josikie April 12, 2026 19:13
@kcw-grunt kcw-grunt self-assigned this Apr 12, 2026
@kcw-grunt kcw-grunt changed the title Bento 🦖😱 HUGE!! Bento Integration Apr 12, 2026
kcw-grunt and others added 2 commits April 12, 2026 23:45
* Added design for Top Secret and the Tutorials bentos

Added preview
added strings files and localizations

* Removed HomeBento placeholder code

* Fixed to unescaped aposthrphes

chore(i18n): auto-translate missing strings [skip ci]
Languages updated: ar, zh-rTW, zh-rCN, fr, de, fa, pa, pl, in, es, sv, uk, ru, tr, ja, ko, hi, it, pt-rBR
Triggered by: 3d594e9

chore(i18n): auto-translate missing strings [skip ci]

Languages updated: ar, zh-rTW, zh-rCN, fr, de, fa, pa, pl, in, es, sv, uk, ru, tr, ja, ko, hi, it, pt-rBR
Triggered by: 2443fde

Reformat the xmls

Revert the notation

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@kcw-grunt kcw-grunt closed this Apr 13, 2026
@kcw-grunt kcw-grunt reopened this Apr 13, 2026
@kcw-grunt
kcw-grunt marked this pull request as ready for review April 13, 2026 10:57
kcw-grunt and others added 12 commits April 13, 2026 18:18
* Add containers for carousels

Midway adding the components of a carousel

* Added the pager screen and the baseline

* Added creatives

Added the wiring to deploy screens and or actions

* Revert "Merge branch 'bento' into feat/add-carousel-in-gamehub"

This reverts commit 2b340eb, reversing
changes made to 6af30b1.

* chore(i18n): auto-translate missing strings [skip ci]

Languages updated: ar, zh-rTW, zh-rCN, fr, de, fa, pa, pl, in, es, sv, uk, ru, tr, ja, ko, hi, it, pt-rBR
Triggered by: 2b340eb

* Polished the LTC picker

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Ran test successfully
Moved to the Claude for the PR Summary
fix typo
fixed the naming
Fixed name across script
@gruntsoftware gruntsoftware deleted a comment from github-actions Bot Apr 13, 2026
@kcw-grunt
kcw-grunt merged commit 5d3a6c2 into develop Apr 14, 2026
3 checks passed
@kcw-grunt
kcw-grunt deleted the bento branch August 9, 2026 09:46
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.

2 participants