Skip to content

fix(BreadActivity): remove dead bottom-nav/toolbar cruft causing star… - #247

Closed
kcw-grunt wants to merge 1 commit into
developfrom
fix/claude-4cfae51423cb132922df8441d8ae8a43
Closed

fix(BreadActivity): remove dead bottom-nav/toolbar cruft causing star…#247
kcw-grunt wants to merge 1 commit into
developfrom
fix/claude-4cfae51423cb132922df8441d8ae8a43

Conversation

@kcw-grunt

@kcw-grunt kcw-grunt commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

🤖 Auto-generated by GitHub Copilot — edit as needed before merging.

📱 Description

This PR removes dead code and unused UI components from BreadActivity, specifically a non-functional bottom navigation bar, toolbar price buttons, and menu button that were replaced by the Compose-based Send workflow. The changes eliminate 111 lines of cruft while maintaining core wallet functionality, improving code maintainability and reducing technical debt.

fix(BreadActivity): remove dead bottom-nav/toolbar cruft causing startup NPE

The "Techdebt/improve shop" refactor (d0886db) deleted initializeViews(), which was the only place binding bottomNav, menuBut, drawerLayout, primaryPrice, and secondaryPrice via findViewById. The refactor left onCreate/setListeners still dereferencing those never-assigned fields, so BreadActivity crashed with a guaranteed NullPointerException on BottomNavigationView.setOnNavigationItemSelectedListener on every launch.

These views were already non-functional before the crash: the bottom nav's menu was only ever wired up via a design-time-only tools:menu attribute (never inflated at runtime), and primaryPrice/secondaryPrice had no code left to populate their text. Rather than resurrect dead legacy UI, remove it outright: drop the associated fields, listeners, and R.id.bottomNav/menuBut/drawerLayout/primary_price/secondary_price views plus the now-unreferenced R.menu.bottom_nav_menu resource, and fix the layout refs that pointed at the removed views.

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

None

Modifications

  • BreadActivity.java: Removed unused imports (Button, ImageButton, DrawerLayout, BottomNavigationView, BRAnimator), deleted unused member variables (primaryPrice, secondaryPrice, menuBut, bottomNav, drawerLayout, mSelectedBottomNavItem, text size constants), and removed dead methods (setListeners(), handleNavigationItemSelected()) that were placeholders for deprecated bottom navigation functionality.
  • activity_bread.xml: Removed the BottomNavigationView component (64dp height), deleted primary and secondary price Button elements from the toolbar, deleted the menu ImageButton, removed drawerLayout android:id attribute, and simplified ConstraintLayout constraints for the balance TextView.
  • bottom_nav_menu.xml: Deleted entire menu resource file (22 lines) defining nav_send, nav_history, and nav_receive menu items that were part of the deprecated bottom navigation system.

Removals

  • bottom_nav_menu.xml: Removed unused bottom navigation menu resource file. No longer needed as navigation has been replaced by the Compose-based Send workflow already in production.

📊 Statistics

  • Additions: 2 lines
  • Deletions: 111 lines
  • Files Changed: 3
  • Commits: 1

🔗 Related Issues

  • Fixes #
  • Related to #

🧪 Tests Status

  • Tests ran successfully locally?
  • Added more tests? How many?
  • Code coverage percentage of the codebase: __%

📸 Screenshots/Videos

Before After
Add screenshot Add screenshot

🎯 Reviewers

@kcw-grunt, @josikie


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

…tup NPE

The "Techdebt/improve shop" refactor (d0886db) deleted initializeViews(),
which was the only place binding bottomNav, menuBut, drawerLayout,
primaryPrice, and secondaryPrice via findViewById. The refactor left
onCreate/setListeners still dereferencing those never-assigned fields,
so BreadActivity crashed with a guaranteed NullPointerException on
BottomNavigationView.setOnNavigationItemSelectedListener on every launch.

These views were already non-functional before the crash: the bottom
nav's menu was only ever wired up via a design-time-only tools:menu
attribute (never inflated at runtime), and primaryPrice/secondaryPrice
had no code left to populate their text. Rather than resurrect dead
legacy UI, remove it outright: drop the associated fields, listeners,
and R.id.bottomNav/menuBut/drawerLayout/primary_price/secondary_price
views plus the now-unreferenced R.menu.bottom_nav_menu resource, and
fix the layout refs that pointed at the removed views.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kcw-grunt
kcw-grunt force-pushed the fix/claude-4cfae51423cb132922df8441d8ae8a43 branch from aee7c33 to 511c2cd Compare July 22, 2026 16:25
@gruntsoftware gruntsoftware deleted a comment from github-actions Bot Jul 22, 2026
@kcw-grunt
kcw-grunt requested a review from trk15 July 22, 2026 16:28
@grunt-claude-bot

Copy link
Copy Markdown
Collaborator

Superseding with a new PR opened under grunt-claude-bot so kcw-grunt can be requested as reviewer (GitHub disallows requesting review from a PR's own author).

@kcw-grunt
kcw-grunt deleted the fix/claude-4cfae51423cb132922df8441d8ae8a43 branch July 29, 2026 09:12
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.

3 participants