Skip to content

Add access code gate to boat charging - #596

Open
WouterAms wants to merge 1 commit into
mainfrom
story/access-code-gate-boat-charging
Open

Add access code gate to boat charging#596
WouterAms wants to merge 1 commit into
mainfrom
story/access-code-gate-boat-charging

Conversation

@WouterAms

Copy link
Copy Markdown
Contributor

Changes

Test instructions

Other notes

@WouterAms
WouterAms requested review from a team and a balanced review from Copilot August 14, 2026 20:03
@github-actions github-actions Bot added module:access-code Module touched based on changed src/modules folder(s). module:boat-charging Module touched based on changed src/modules folder(s). module:city-pass Module touched based on changed src/modules folder(s). module:parking Module touched based on changed src/modules folder(s). labels Aug 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds access-code protection to authenticated boat-charging flows and centralizes login-step state.

Changes:

  • Adds boat-charging login, access-code setup, recovery, and redirect handling.
  • Moves module login-step state into the access-code slice.
  • Refactors the shared access-code gate into state, context, and provider components.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/modules/parking/Stack.tsx Uses centralized login-step state.
src/modules/parking/slice.ts Removes local login-step state.
src/modules/parking/screens/LoginSteps.screen.tsx Uses the shared login-step hook.
src/modules/parking/components/ActionButton.tsx Reads centralized login-step state.
src/modules/city-pass/Stack.tsx Uses centralized login-step state.
src/modules/city-pass/slice.ts Removes local login-step state.
src/modules/city-pass/screens/LoginSteps.screen.tsx Uses the shared login-step hook.
src/modules/city-pass/hooks/useLoginSteps.ts Removes the module-specific hook.
src/modules/boat-charging/Stack.tsx Integrates the access-code gate and pending routes.
src/modules/boat-charging/slice.ts Stores pending post-login navigation.
src/modules/boat-charging/screens/LoginSteps.screen.tsx Adds boat-charging access-code setup steps.
src/modules/boat-charging/screens/BoatChargingLogin.screen.tsx Adds post-login navigation behavior.
src/modules/boat-charging/screens/BoatChargingForgotAccessCode.screen.tsx Adds access-code recovery UI.
src/modules/boat-charging/screenConfig.ts Excludes gate-owned routes from standard configuration.
src/modules/boat-charging/routes.ts Adds access-code flow routes.
src/modules/boat-charging/components/history/BoatChargingHistoryLogin.tsx Queues history after login.
src/modules/boat-charging/components/BoatChargingLoginForm.tsx Delegates post-login navigation.
src/modules/boat-charging/components/BoatChargingGuestEmailForm.tsx Queues terms after login.
src/modules/access-code/slice.ts Centralizes per-module login-step state.
src/modules/access-code/screens/AccessCode.screen.tsx Uses gate context for recovery availability.
src/modules/access-code/providers/AccessCodeGate.provider.tsx Provides access-code gate metadata.
src/modules/access-code/providers/AccessCodeGate.context.ts Defines the gate context.
src/modules/access-code/hooks/useLoginSteps.ts Supports module-specific login-step state.
src/modules/access-code/hooks/useAccessCodeGateState.ts Encapsulates gate state selection.
src/modules/access-code/hooks/useAccessCodeGateContext.ts Exposes gate context values.
src/modules/access-code/hooks/useAccessCodeGate.tsx Refactors gate rendering and loading behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +17 to +18
if (canGoBack() && isLoggedIn) {
goBack()
/>
<EnterAccessCode />
{prevModule !== ModuleSlug.user && (
{!!hasForgotCodeScreen && (
Comment on lines +1 to +5
import {ForgotAccessCodeScreen} from '@/modules/access-code/screens/ForgotAccessCodeScreen'

export const BoatChargingForgotAccessCodeScreen = () => (
<ForgotAccessCodeScreen testID="BoatChargingForgotAccessCodeScreen" />
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:access-code Module touched based on changed src/modules folder(s). module:boat-charging Module touched based on changed src/modules folder(s). module:city-pass Module touched based on changed src/modules folder(s). module:parking Module touched based on changed src/modules folder(s).

Development

Successfully merging this pull request may close these issues.

2 participants