Skip to content

Redesign mission menu UX with New Mission screen - #58

Merged
nibuen merged 11 commits into
masterfrom
nibuen/redesign-mission-menu-ux
Mar 11, 2026
Merged

Redesign mission menu UX with New Mission screen#58
nibuen merged 11 commits into
masterfrom
nibuen/redesign-mission-menu-ux

Conversation

@nibuen

@nibuen nibuen commented Mar 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • New Mission screen: Dedicated Compose activity with grouped dropdown picker for mission types, contextual options (random-only prefs hidden for constructed missions), and a "Start Mission" button — replaces the old Mission Type dialog + separate Options screen
  • Simplified menu: Overflow menu reduced to New Mission, Restart Mission, About, Help — removes confusing Mission Type / Options / New items
  • Restart feedback: Snackbar confirmation when restarting a mission so users know something happened
  • MissionGroup enum: Organizes all 30+ mission types into 7 logical groups (Custom, Test Runs, Simulations, Advanced Simulations, Real Missions, Double Action Easy/Standard)
  • Dark theme: New Mission screen matches app's red/black color scheme via Compose darkColorScheme
  • Tests: 14 unit tests verifying group structure correctness and that the UI's conditional option display matches actual preference consumption in the generation pipeline
  • Also includes: wear module removal, Compose mission log migration, dependency upgrades

Test plan

  • Menu → New Mission → pick Custom (Random) → adjust all options → Start → mission plays
  • Menu → New Mission → pick a constructed mission → verify only 3 common options shown → Start
  • Menu → Restart Mission → snackbar appears, mission resets to beginning
  • Press Play with no prior generation → auto-generates Random as before
  • About and Help still accessible from menu
  • ./gradlew test — all unit tests pass

🤖 Generated with Claude Code

nibuen and others added 3 commits March 11, 2026 14:39
Simplify the overflow menu to two clear primary actions: "New Mission"
(opens a dedicated Compose screen to pick type, configure, and generate)
and "Restart Mission" (replays current mission with snackbar feedback).

- Add MissionGroup enum to organize mission types into logical categories
- Create NewMissionActivity with grouped dropdown picker, contextual
  options (random-only prefs hidden for constructed missions), and
  dark theme matching the app's red/black color scheme
- Update MissionActivity to use ActivityResultLauncher for the new flow
- Remove old Mission Type dialog, Options menu item, and bare New item
- Add comprehensive unit tests verifying preference flow correctness
- Remove unused wear module, migrate to Compose mission log, upgrade deps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR redesigns the mission-selection UX by introducing a dedicated “New Mission” Compose screen with grouped mission types and contextual options, while simplifying the overflow menu and migrating the mission log UI to Compose. It also removes the legacy Wear module and upgrades build tooling/dependencies.

Changes:

  • Add NewMissionActivity (Compose) and MissionGroup to organize mission types and drive conditional option display.
  • Update MissionActivity menu + restart flow (Snackbar feedback) and migrate mission log from RecyclerView to Compose.
  • Remove :wear module and update Gradle wrapper/tooling + dependencies; add unit tests for grouping and preference gating.

Reviewed changes

Copilot reviewed 32 out of 51 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
wear/src/main/res/values/strings.xml Removed as part of Wear module removal.
wear/src/main/res/layout/round_activity_main.xml Removed as part of Wear module removal.
wear/src/main/res/layout/rect_activity_main.xml Removed as part of Wear module removal.
wear/src/main/res/layout/activity_main.xml Removed as part of Wear module removal.
wear/src/main/res/drawable-xxhdpi/ic_launcher.png Removed as part of Wear module removal.
wear/src/main/res/drawable-xhdpi/ic_launcher.png Removed as part of Wear module removal.
wear/src/main/res/drawable-mdpi/ic_launcher.png Removed as part of Wear module removal.
wear/src/main/res/drawable-hdpi/ic_launcher.png Removed as part of Wear module removal.
wear/src/main/java/com/boardbeard/wear/MainActivity.java Removed as part of Wear module removal.
wear/src/main/java/com/boardbeard/wear/EventListenerService.java Removed as part of Wear module removal.
wear/src/main/AndroidManifest.xml Removed as part of Wear module removal.
wear/proguard-rules.pro Removed as part of Wear module removal.
wear/build.gradle Removed as part of Wear module removal.
wear/.gitignore Removed as part of Wear module removal.
settings.gradle Removes :wear from the build.
gradle/wrapper/gradle-wrapper.properties Gradle wrapper upgrade.
gradle.properties Updates Gradle/Android build flags and defaults.
build.gradle Updates Kotlin/AGP versions and adds Kotlin Compose plugin DSL wiring.
app/src/test/java/com/boarbeard/ui/TestMissionType.kt Adds unit tests for mission grouping and preference/UI gating invariants.
app/src/main/res/values/strings.xml Adds strings for new menu labels and mission group display names.
app/src/main/res/menu/menu.xml Simplifies overflow menu and renames reset → restart.
app/src/main/res/layout/mission_card_view.xml Removes legacy CardView layout (RecyclerView path).
app/src/main/res/layout/main.xml Swaps RecyclerView for ComposeView and tweaks layout attributes.
app/src/main/java/com/boarbeard/ui/PreferencesActivity.java Adds fitsSystemWindows handling.
app/src/main/java/com/boarbeard/ui/NewMissionActivity.kt New Compose “New Mission” screen with grouped dropdown + contextual prefs.
app/src/main/java/com/boarbeard/ui/MissionType.kt Introduces MissionGroup and assigns groups to all mission types.
app/src/main/java/com/boarbeard/ui/MissionCardsAdapter.kt Removes RecyclerView adapter (log UI migrated to Compose).
app/src/main/java/com/boarbeard/ui/MissionCard.kt Adds Compose implementation for mission log cards.
app/src/main/java/com/boarbeard/ui/MissionActivity.kt Integrates New Mission flow, Compose log, restart snackbar, and system UI handling.
app/src/main/java/com/boarbeard/ui/HelpActivity.kt Edge-to-edge adjustments for Compose screen.
app/src/main/java/com/boarbeard/ui/AboutActivity.kt Edge-to-edge adjustments for Compose screen.
app/src/main/java/com/boarbeard/generator/beimax/ThreatsGenerator.kt Minor variable rename for readability.
app/src/main/java/com/boarbeard/audio/MissionLog.kt Extends mission log model to carry Compose colors.
app/src/main/java/com/boarbeard/audio/MediaPlayerMainMission.kt Populates new MissionLog color fields when logging.
app/src/main/AndroidManifest.xml Registers NewMissionActivity; adjusts MissionActivity configChanges.
app/build.gradle Updates SDK levels, enables viewBinding, and upgrades dependencies.
CLAUDE.md Adds repository guidance doc.
.idea/runConfigurations.xml Removed IDE metadata from repo.
.idea/misc.xml Removed IDE metadata from repo.
.idea/migrations.xml Removed IDE metadata from repo.
.idea/kotlinc.xml Removed IDE metadata from repo.
.idea/jarRepositories.xml Removed IDE metadata from repo.
.idea/inspectionProfiles/Project_Default.xml Removed IDE metadata from repo.
.idea/detekt.xml Removed IDE metadata from repo.
.idea/deploymentTargetSelector.xml Removed IDE metadata from repo.
.idea/deploymentTargetDropDown.xml Removed IDE metadata from repo.
.idea/compiler.xml Removed IDE metadata from repo.
.idea/codeStyles/codeStyleConfig.xml Removed IDE metadata from repo.
.idea/codeStyles/Project.xml Removed IDE metadata from repo.
.idea/appInsightsSettings.xml Removed IDE metadata from repo.
.gitignore Ignores full .idea/ directory and adds Claude/Kotlin session ignores.
Files not reviewed (13)
  • .idea/appInsightsSettings.xml: Language not supported
  • .idea/codeStyles/Project.xml: Language not supported
  • .idea/codeStyles/codeStyleConfig.xml: Language not supported
  • .idea/compiler.xml: Language not supported
  • .idea/deploymentTargetDropDown.xml: Language not supported
  • .idea/deploymentTargetSelector.xml: Language not supported
  • .idea/detekt.xml: Language not supported
  • .idea/inspectionProfiles/Project_Default.xml: Language not supported
  • .idea/jarRepositories.xml: Language not supported
  • .idea/kotlinc.xml: Language not supported
  • .idea/migrations.xml: Language not supported
  • .idea/misc.xml: Language not supported
  • .idea/runConfigurations.xml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread app/src/main/java/com/boarbeard/audio/MissionLog.kt Outdated
Comment thread app/src/main/java/com/boarbeard/ui/MissionActivity.kt Outdated
Comment thread app/src/main/java/com/boarbeard/ui/MissionCard.kt Outdated
Comment thread app/src/main/java/com/boarbeard/ui/MissionActivity.kt Outdated
Comment thread app/src/main/java/com/boarbeard/ui/MissionActivity.kt
Comment thread app/src/main/java/com/boarbeard/audio/MediaPlayerMainMission.kt
Comment thread app/src/main/java/com/boarbeard/ui/MissionActivity.kt Outdated
nibuen and others added 8 commits March 11, 2026 14:50
Remove legacy CircleCI config and add a GitHub Actions workflow
that runs lint and unit tests on pull requests to master.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unused CalendarContract.Colors import in MissionLog
- Add package declaration to MissionCard.kt and remove default-package import
- Replace MainScope with lifecycleScope to prevent lifecycle leaks
- Add null safety for mediaInfo color properties to prevent NPE
- Fix notification gating to work on all API levels (minSdk 30),
  only gate the runtime permission request on TIRAMISU+

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add generateUntilSuccess() helper that retries mission generation
up to 5 times. Tight constraint ranges (e.g. incomingDataRange 2..3)
can legitimately exhaust MissionImpl's internal retry limit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Toast displays centered on screen instead of anchored to the bottom
where it gets hidden behind the navigation bar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The gradle-wrapper.jar had an unrecognized checksum causing
gradle/actions/setup-gradle@v4 to reject it during CI runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add back buttons to all secondary screens (New Mission, About, Help)
- Retheme About and Help screens with Space Alert dark theme (Scaffold + TopAppBar)
- Redesign About screen with link cards for Iterary Blog, Iterary, and Gamers Paper
- Add Iterary logo drawable for About screen
- Rewrite Help screen with accurate card-based content reflecting current app flow
- Bump Help text sizes for readability
- Show New Mission screen when play is tapped without a mission configured
- Add "Reset to defaults" button for random mission parameters
- Extract theme colors to internal visibility for sharing across activities

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace deprecated onKeyDown(KEYCODE_BACK) with OnBackPressedDispatcher
for Android 16+ predictive back gesture support. Add 11 missing German
translations for new mission menu strings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Guard MissionType ordinal lookups with getOrNull to prevent crashes
- Use safe cast (as?) for MediaPlayerMainMission to prevent NPE
- Back button now pauses playing mission instead of silently destroying it
- Replace AsyncTask with coroutine (deprecated since API 30)
- Move all hardcoded English strings to string resources with German translations
- Remove unused privacysandbox.tools dependency
- Quit HandlerThread in onDestroy to prevent thread leak
- Migrate from deprecated android.preference to androidx.preference
- Remove unused imports in MissionCard and dead toStringValues method

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nibuen
nibuen merged commit 421e878 into master Mar 11, 2026
1 check passed
@nibuen
nibuen deleted the nibuen/redesign-mission-menu-ux branch March 11, 2026 23:38
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.

2 participants