Skip to content

feat: implement guest-access news and emergency flows on android#182

Merged
gulcetahtasiz merged 2 commits into
developmentfrom
feature/android-guest-flow
Apr 2, 2026
Merged

feat: implement guest-access news and emergency flows on android#182
gulcetahtasiz merged 2 commits into
developmentfrom
feature/android-guest-flow

Conversation

@erinc00

@erinc00 erinc00 commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

This PR implements the guest-accessible navigation flow on Android for public information pages and adds interactive emergency dialing support.

Included
• guest access to:
• Home
• News & Announcements
• Emergency Numbers
• guest drawer footer updated with:
• placeholder avatar/icon
• login/signup entry flow when tapped
• authenticated users keep access to the same pages
• authenticated drawer footer shows the initial-based avatar state
• news filtering support added for:
• All
• Preparedness
• Announcement
• Community
• emergency number rows are now interactive and open the phone dialer when tapped

Notes
• This PR focuses on navigation/accessibility behavior and placeholder/public information flows.
• Guest users are intentionally limited to public informational pages only.
• Authenticated users continue to access the same public pages with their authenticated drawer/avatar state.
• Emergency number interaction currently opens the device dialer and does not directly place a call.

@kckagancan kckagancan 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.

AppNavGraph.kt

Critical issues

  • Profile logout does not actually clear the auth session

    • In the ProfileScreen route, onLogout only navigates to Welcome.
    • It does not call AuthRepository.logout().
    • This means the user may appear logged out in the UI while the token/session still remains active.
  • Protected routes are not guarded at the route level

    • Access control is currently enforced through canAccessRoute(...) and navigateToDrawerRoute(...).
    • This only protects navigation when it goes through that helper.
    • Protected screens such as MyHelpRequests, AssignedRequest, Profile, Settings, Notifications, GatheringAreas, EditProfile, and PrivacySecurity do not have their own auth guard inside their composable(...) blocks.
    • Because of that, guest users may still reach these screens through direct navigation, back stack behavior, or future incorrect wiring.

@kckagancan
kckagancan self-requested a review April 1, 2026 23:15
@erinc00

erinc00 commented Apr 1, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review, addressed both points.

Profile logout now clears auth/session before navigating to Welcome.
Added composable-level auth guards for truly protected pages (Profile, EditProfile, Settings, Privacy & Security) to prevent direct/backstack guest access.
Kept guest access for content pages (including Assigned Request) based on current product decision.

@kckagancan kckagancan 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.

Looks fine now. Great work.

@gulcetahtasiz
gulcetahtasiz merged commit 4463983 into development Apr 2, 2026
@erinc00
erinc00 deleted the feature/android-guest-flow branch April 7, 2026 14:50
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