Skip to content

Expert mode warning can be bypassed by going via expert mode debug screen#2158

Merged
sds100 merged 1 commit into
developfrom
claude/issue-2154-gate-debug-screen-on-expert-warning
Jun 9, 2026
Merged

Expert mode warning can be bypassed by going via expert mode debug screen#2158
sds100 merged 1 commit into
developfrom
claude/issue-2154-gate-debug-screen-on-expert-warning

Conversation

@keymapper-ai

Copy link
Copy Markdown
Collaborator

Closes #2154

Summary

  • The "Debugging" section (containing the "Expert mode debug" / GetEvent button) was rendered unconditionally in ExpertModeScreen, outside the warningState is Understood guard that gates all other expert-mode content. This let a user navigate to the GetEvent debug screen without ever acknowledging the expert mode warning.
  • Fix: Moved the debugging section inside the if (warningState is ExpertModeWarningState.Understood) block so the button is only shown once the warning has been acknowledged.
  • Defence-in-depth: Added an early-return guard in ExpertModeViewModel.onGetEventClick() that does nothing if warningState is not Understood, preventing navigation even if the button were somehow invoked by another code path.

Files changed

File Change
base/…/expertmode/ExpertModeScreen.kt Move debugging section inside the Understood branch
base/…/expertmode/ExpertModeViewModel.kt Guard onGetEventClick against unacknowledged warning
CHANGELOG.md Add entry for #2154

Known limitations / areas for human review

  • The GetEvent screen itself (GetEventScreen / GetEventViewModel) has no awareness of the warning state; it relies entirely on being unreachable via the UI. This is fine for the current navigation graph, but worth noting if deep-link or intent-based navigation to NavDestination.GetEvent is added in future.
  • Unit tests could not be run locally (no Android SDK in this environment); CI will validate correctness.

Generated by Claude Code

Move the debugging section (GetEvent button) inside the
`warningState is Understood` conditional so it is only visible
after the user acknowledges the expert mode warning, preventing
the bypass via the debug screen.

Also add a defensive guard in ExpertModeViewModel.onGetEventClick()
that returns early if the warning has not been acknowledged.
@sds100 sds100 self-requested a review June 9, 2026 08:10
@sds100 sds100 merged commit defea69 into develop Jun 9, 2026
4 checks passed
@sds100 sds100 deleted the claude/issue-2154-gate-debug-screen-on-expert-warning branch June 9, 2026 08:10
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.

Expert mode warning can be bypassed by going via expert mode debug screen

3 participants