This commit implements a comprehensive mobile menu solution that: 1. **Mobile Menu Components**: - Created TopBar.tsx with circular band switcher (mobile only) - Enhanced BottomNavBar.tsx with band-context-aware navigation - Updated ResponsiveLayout.tsx to integrate TopBar for mobile views 2. **Band Context Preservation**: - Fixed black screen issue by preserving band context via React Router state - Implemented dual context detection (URL params + location state) - Added graceful fallback handling for missing context 3. **Visual Improvements**: - Changed band display from square+text to perfect circle with initials only - Updated dropdown items to use consistent circular format - Improved mobile space utilization 4. **Debugging & Testing**: - Added comprehensive debug logging for issue tracking - Created test plans and documentation - Ensured all static checks pass (TypeScript + ESLint) 5. **Shared Utilities**: - Created utils.ts with shared getInitials() function - Reduced code duplication across components Key Features: - Mobile (<768px): TopBar + BottomNavBar + Main Content - Desktop (≥768px): Sidebar (unchanged) - Band context preserved across all mobile navigation - Graceful error handling and fallbacks - Comprehensive debug logging (can be removed in production) Files Changed: - web/src/utils.ts (new) - web/src/components/TopBar.tsx (new) - web/src/components/BottomNavBar.tsx (modified) - web/src/components/ResponsiveLayout.tsx (modified) - web/src/components/Sidebar.tsx (modified) Documentation Added: - implementation_summary.md - refinement_summary.md - black_screen_fix_summary.md - test_plan_mobile_menu_fix.md - test_plan_refinement.md - testing_guide.md - black_screen_debug.md Resolves: - Mobile menu band context loss - Black screen on Library navigation - Inconsistent band display format - Missing mobile band switching capability Breaking Changes: None Backward Compatibility: Fully maintained Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
5.9 KiB
Mobile Menu Testing Guide
Service Information
- URL:
http://localhost:8080 - Status: Running (rebuilt with latest changes)
- Port: 8080
Testing Instructions
Step 1: Access the Application
- Open your browser
- Navigate to:
http://localhost:8080 - Log in with your credentials
Step 2: Set Up Test Data
- Create at least 2 test bands (if not already created)
- Add some songs to each band (optional, for Player testing)
- Note the band IDs from the URLs
Step 3: Open Developer Tools
- Press F12 or Ctrl+Shift+I (Windows/Linux) / Cmd+Opt+I (Mac)
- Go to the Console tab
- Clear existing logs (optional)
Step 4: Test Band Display Format
Objective: Verify band is displayed as circle only (no text)
Steps:
- Resize browser window to mobile size (<768px width)
- Observe the TopBar in the top right corner
- Click the band switcher to open the dropdown
Expected Results: ✅ Only circular band initials visible (no text) ✅ Perfect circle shape (borderRadius: 50%) ✅ Dropdown items also show circles ✅ Size: 32×32px for main, 24×24px for dropdown
Visual Check:
- Before: ▢ AB + "Band Name"
- After: ⚪ AB (circle only)
Step 5: Test Library Navigation (Debug Black Screen)
Objective: Identify and fix black screen issue
Steps:
- Navigate directly to a band's library:
/bands/your-band-id - Click "Settings" in bottom navigation
- Click "Library" in bottom navigation
- Observe console output and page behavior
Expected Console Logs:
BottomNavBar - Current band ID: "your-band-id" Path: "/bands/your-band-id"
BottomNavBar - Current band ID: "your-band-id" Path: "/bands/your-band-id/settings/members"
Library click - Navigating to band: "your-band-id"
Expected Page Behavior:
✅ Band library content loads
✅ No black screen
✅ Correct band context preserved
✅ URL shows: /bands/your-band-id
Step 6: Test Error Handling
Objective: Verify graceful handling when no band context
Steps:
- Navigate to settings page:
/settings - Click "Library" in bottom navigation
- Observe console warnings
Expected Results:
✅ Console shows: Library click - No current band ID found!
✅ Navigates to /bands (graceful fallback)
✅ No JavaScript errors
✅ App doesn't crash
Step 7: Test Band Context Preservation
Objective: Verify context is preserved across navigation
Steps:
- Navigate to Band A's library
- Click "Settings" → back to "Library"
- Click "Player" (if enabled) → back to "Library"
- Click "Members" → back to "Library"
- Repeat with Band B
Expected Results: ✅ Always returns to correct band's library ✅ URL shows correct band ID ✅ Content loads properly (no black screens) ✅ Band context never lost
Step 8: Test Responsive Layout
Objective: Verify mobile/desktop switching
Steps:
- Start with desktop size (≥768px)
- Verify Sidebar shows band properly
- Resize to mobile size (<768px)
- Verify TopBar shows circle band display
- Resize back to desktop
- Verify Sidebar returns
Expected Results: ✅ Smooth transition between layouts ✅ Band context preserved during resizing ✅ No layout glitches ✅ Consistent band display format
Debugging Black Screen Issue
If Black Screen Occurs:
-
Check Console Output
- Look for
currentBandId: nullorundefined - Note any JavaScript errors
- Capture warnings and debug logs
- Look for
-
Check Network Requests
- Go to Network tab
- Filter for
/bands/*requests - Verify 200 OK responses
- Check response payloads
-
Test Direct Navigation
- Manually enter:
/bands/your-band-id - Verify page loads correctly
- Compare with bottom nav behavior
- Manually enter:
-
Examine React Query Cache
- In console:
window.queryClient.getQueryData(['band', 'your-band-id']) - Check if band data exists
- Verify data structure
- In console:
Common Issues & Fixes:
| Issue | Console Output | Solution |
|---|---|---|
| Context loss | currentBandId: null |
Improve context preservation |
| URL parsing fail | currentBandId: undefined |
Debug matchPath logic |
| No data | Empty cache | Check API responses |
| Race condition | Intermittent failures | Add loading states |
Test Results Template
## Test Results - Mobile Menu Refinement
**Tester**: [Your Name]
**Date**: [YYYY-MM-DD]
**Browser**: [Chrome/Firefox/Safari] [Version]
**Device**: [Desktop/Mobile] [OS]
### Test 1: Band Display Format
- [ ] Pass
- [ ] Fail
**Notes**: [Observations]
### Test 2: Library Navigation
- [ ] Pass
- [ ] Fail
**Console Output**:
[Paste relevant logs here]
**Notes**: [Observations]
### Test 3: Error Handling
- [ ] Pass
- [ ] Fail
**Console Output**:
[Paste relevant logs here]
**Notes**: [Observations]
### Test 4: Band Context Preservation
- [ ] Pass
- [ ] Fail
**Notes**: [Observations]
### Test 5: Responsive Layout
- [ ] Pass
- [ ] Fail
**Notes**: [Observations]
### Additional Observations:
- [Issue 1]: [Description]
- [Issue 2]: [Description]
### Overall Result:
- [ ] ✅ All Tests Pass
- [ ] ⚠️ Some Issues Found
- [ ] ❌ Critical Issues
### Next Steps:
1. [Action Item 1]
2. [Action Item 2]
Support Information
Debug Logs Location: Browser console (F12 → Console)
Network Monitoring: Browser dev tools (F12 → Network)
React Query Cache: window.queryClient.getQueryData(['band', 'id'])
Need Help?
- Share console output
- Describe reproduction steps
- Note browser/version
- Include screenshots
Contact: Development team Priority: High (user-facing mobile issue)
Quick Reference
- URL:
http://localhost:8080 - Mobile Breakpoint: <768px
- Desktop Breakpoint: ≥768px
- Expected Band Display: Circle only (no text)
- Debug Logs: Check console for band ID values
- Fallback:
/bandswhen no context
Happy Testing! 🎯