Skip to content

feat(settings): split Settings tab from Profile screen - #341

Merged
DennisBauer merged 3 commits into
mainfrom
feat/settings-profile-split
Aug 10, 2026
Merged

feat(settings): split Settings tab from Profile screen#341
DennisBauer merged 3 commits into
mainfrom
feat/settings-profile-split

Conversation

@DennisBauer

@DennisBauer DennisBauer commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Replaced the Profile tab with a dedicated Settings tab.
    • Added settings for account details, theme, notifications, privacy, app information, and licenses.
    • Added guest-account upgrade and migration status messaging.
    • Added profile access from Settings with clearer account identity display and uppercase initials.
  • Bug Fixes

    • Updated English and German guidance to direct guest users to Settings for account conversion.
    • Improved handling of notification permissions and account status updates.

Two view models compute the avatar fallback the same way GroupParticipant
already does; one definition instead of three.
@DennisBauer DennisBauer added the feature New feature or request label Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9627f9c7-20f3-4e36-a207-c8c4340b5949

📥 Commits

Reviewing files that changed from the base of the PR and between e5b816b and 2293afc.

📒 Files selected for processing (2)
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/ProfileScreen.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/settings/SettingsScreen.kt
🚧 Files skipped from review as they are similar to previous changes (2)
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/settings/SettingsScreen.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/ProfileScreen.kt

Walkthrough

The PR separates profile account content from settings content. It adds a Settings screen and state model, moves Settings into top-level navigation, updates guest-account flows and localized resources, and adds view-model tests.

Changes

Profile and Settings split

Layer / File(s) Summary
Simplify profile account flow
core/domain/..., features/tabgroup/presentation/src/commonMain/kotlin/.../profile/*, features/tabgroup/presentation/src/commonTest/.../profile/*
Profile now displays account identity, registration, migration, and account actions. Profile state and its view model no longer manage settings preferences or notifications.
Add settings state and persistence
features/tabgroup/presentation/src/commonMain/kotlin/.../settings/SettingsState.kt, .../SettingsViewModel.kt, features/tabgroup/presentation/src/commonTest/.../settings/SettingsViewModelTest.kt
Settings state combines account, migration, theme, notification, and permission data. The view model refreshes and persists these values.
Build settings screen
features/tabgroup/presentation/src/commonMain/kotlin/.../settings/*
The new screen renders profile, migration, preferences, notifications, app information, privacy policy, and OSS license sections.
Wire navigation and resources
composeApp/.../App.kt, features/tabgroup/presentation/src/commonMain/kotlin/.../navigation/*, features/*/composeResources/*
Settings replaces Profile as the logged-in top-level tab. Navigation callbacks and localized strings now use Settings terminology.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SettingsRoot
  participant SettingsViewModel
  participant AuthService
  participant AppPreferencesRepository
  User->>SettingsRoot: Open Settings
  SettingsRoot->>SettingsViewModel: Collect state and refresh
  SettingsViewModel->>AuthService: Refresh account
  SettingsViewModel->>AppPreferencesRepository: Read settings
  SettingsViewModel-->>SettingsRoot: Emit SettingsState
  User->>SettingsRoot: Select theme or notifications
  SettingsRoot->>SettingsViewModel: Persist selection
  SettingsViewModel->>AppPreferencesRepository: Save preference
Loading
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: separating the Settings tab from the Profile screen.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/MainNavKeys.kt`:
- Around line 93-101: Make the Settings navigation key implement LoggedIn in
addition to its existing LoggableNavKey and TopLevelTab interfaces, so App.kt
selects the logged-in shell and resolves the Settings route for tab navigation
and post-upgrade continuation.

In
`@features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/ProfileScreen.kt`:
- Around line 128-192: The profile content in
features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/ProfileScreen.kt:128-192
and settings content in
features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/settings/SettingsScreen.kt:126-176
must be gated on state.isLoading; render the existing loading state while
loading, and only render ProfileIdentity, account rows/actions, the profile
card, and settings content after loading completes.

In
`@features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/settings/SettingsScreen.kt`:
- Line 36: Remove the direct AppBuildInfo dependency from SettingsScreen. Pass
the app version through the screen’s presentation state or an existing
domain-level contract, and update the rendering logic around SettingsScreen to
consume that presentation-safe value instead of the data-layer type.

In
`@features/tabgroup/presentation/src/commonTest/kotlin/de/tabmates/features/tabgroup/presentation/navigation/settings/SettingsViewModelTest.kt`:
- Around line 158-162: Update the SettingsViewModelTest helper subscribeToState
to use Turbine’s test collection instead of launching a manual background
collector; make the subscription lifetime explicit and assert the expected
StateFlow emissions with Turbine while preserving the test’s WhileSubscribed
behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9220a2c7-14d7-42fd-86df-430ec01de25e

📥 Commits

Reviewing files that changed from the base of the PR and between 6dc5400 and e5b816b.

📒 Files selected for processing (20)
  • composeApp/src/commonMain/kotlin/de/tabmates/composeapp/App.kt
  • core/domain/src/commonMain/kotlin/de/tabmates/core/domain/auth/User.kt
  • features/authentication/presentation/src/commonMain/composeResources/values-de/string.xml
  • features/authentication/presentation/src/commonMain/composeResources/values/string.xml
  • features/tabgroup/presentation/src/commonMain/composeResources/values-de/string.xml
  • features/tabgroup/presentation/src/commonMain/composeResources/values/string.xml
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/MainGraph.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/MainNavKeys.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/PendingMigrationBanner.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/ProfileEvent.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/ProfileScreen.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/ProfileState.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/ProfileViewModel.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/settings/OssLicensesScreen.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/settings/SettingsRow.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/settings/SettingsScreen.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/settings/SettingsState.kt
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/settings/SettingsViewModel.kt
  • features/tabgroup/presentation/src/commonTest/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/ProfileViewModelTest.kt
  • features/tabgroup/presentation/src/commonTest/kotlin/de/tabmates/features/tabgroup/presentation/navigation/settings/SettingsViewModelTest.kt
💤 Files with no reviewable changes (2)
  • features/tabgroup/presentation/src/commonMain/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/ProfileEvent.kt
  • features/tabgroup/presentation/src/commonTest/kotlin/de/tabmates/features/tabgroup/presentation/navigation/profile/ProfileViewModelTest.kt

The bottom tab called Profile was a settings screen. It is now Settings —
profile card, preferences, about — and the account it used to carry moves
behind the card into its own Profile screen with sign out and delete.

The card doubles as the guest prompt: tinted, with the upgrade inline, so
the one thing a guest should do is not a tap deeper.

Also drops the tablet two-pane; three sections did not earn a master list.
The NavKey rename changes the serialized discriminator, so a back stack
persisted by an older build no longer restores.
The upgrade no longer lives under Profile.
@DennisBauer
DennisBauer force-pushed the feat/settings-profile-split branch from e5b816b to 2293afc Compare August 10, 2026 16:21
@DennisBauer
DennisBauer enabled auto-merge August 10, 2026 16:24
@DennisBauer
DennisBauer merged commit 46c3cf2 into main Aug 10, 2026
4 checks passed
@DennisBauer
DennisBauer deleted the feat/settings-profile-split branch August 10, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant