Skip to content

feat: group mobile settings by category - #281

Open
tiensonqin wants to merge 8 commits into
mainfrom
devin/1795679119-grouped-mobile-settings
Open

tiensonqin wants to merge 8 commits into
mainfrom
devin/1795679119-grouped-mobile-settings

Conversation

@tiensonqin

@tiensonqin tiensonqin commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reworks mobile Settings into grouped category navigation on both platforms. The root sheet now shows an account group and a grouped list of categories; each category opens a focused detail screen with platform-native back/apply actions while preserving the existing settings controls and persistence behavior.

  • Adds settings_section navigation state and OpenSettingsSection to the shared model.
  • Reorganizes the shared settings UI into Account, General, Editor, Notifications, Sync server, Advanced, About, and Community detail screens.
  • Uses grouped SwiftUI form sections on iOS and rounded Material cards on Android.
  • Keeps Sign Out as a separate destructive bottom group when authenticated and keeps Advanced visible only when a local graph is selected.
  • Routes Android sheet Back through the shared model, so Back returns from a category to the Settings home before closing the sheet; this uses the renderer fix in logseq/lui#416 while preserving medium-detent collapse behavior.
  • Updates wire-drive, app tests, and Maestro flows for category navigation, including runtime-log, export, editor, sync-server, sidebar page-share, and authentication flows.

Validation

  • dune build @shared/native/runtest — 1469 tests passed.
  • ./scripts/build-mobile-ios-simulator.sh — passed.
  • Android ./gradlew :app:assembleDebug — passed.
  • Android ./gradlew :lui:compileDebugKotlin with the pinned LUI renderer — passed.
  • iOS simulator smoke test, signed in — passed; recording below.
  • Android emulator smoke test, signed in (API 36, x86_64) — passed; grouped home, category navigation, system Back from detail to home, Back from home to close, and the separate bottom Sign Out group are shown below.

Recordings

iOS

iOS grouped settings recording

Android

Android grouped settings recording

Link to Devin session: https://app.devin.ai/sessions/a35d6ca9bf0447df91cc820d3bd6f48f
Open in Devin Desktop: https://app.devin.ai/desktop/session/a35d6ca9bf0447df91cc820d3bd6f48f?variant=devin
Requested by: @tiensonqin


⚠️ Devin was interrupted · 2 findings for you to triage · Follow Devin's work

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot 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.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 3 findings. Devin automatically fixed all 3 findings.

Fixed by Devin (3)
  • Local setup can override the lockfile — Branch-style pins now keep an existing locked checkout instead of replacing it with moving main; only fixed commit pins are validated and refreshed when their revision changes.
  • Local Android builds retain stale Back behavior — The documented dependency-pin refresh now detects when an existing Git checkout is at a different fixed revision and fetches/checks out the new pin instead of skipping it; branch pins are always refreshed.
  • Back skips native sheet collapse — The LUI pin now includes a follow-up renderer fix: hardware Back first collapses an expanded medium-detent sheet and only emits Dismiss once the sheet is already at its collapsed detent.

View findings in Devin Review · Follow Devin's work

Devin Review

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 2 findings. Devin was interrupted while fixing; 2 findings are left for you to triage below.

View findings in Devin Review · Follow Devin's work

Devin Review

Comment thread logseq.opam
["melange-transit-native.0.1.2" "git+https://github.com/logseq/melange-transit.git#main"]
["melange-transit-melange.0.1.2" "git+https://github.com/logseq/melange-transit.git#main"]
["lui.0.1.0" "git+ssh://git@github.com/logseq/lui.git#c44bfe549470d68c578814e603f10ca34fa7384e"]
["lui.0.1.0" "git+ssh://git@github.com/logseq/lui.git#6bc3849e03c2ecd61b355da79df3588b7389a234"]

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.

🟡 Unfinished drags discard Android settings edits

Dragging the Sync server sheet halfway toward dismissal fires confirmValueChange(Hidden) before the finger lifts. BackOrDismissSettings discards the URL draft even if the user reverses the drag.

Learn more

The Android Gradle module uses the Kotlin renderer from the vendored LUI source. In that renderer, LuiModalSurface emits a model dismiss event from confirmValueChange(Hidden). Compose Foundation 1.12.1 calls that callback from AnchoredDraggableState.updateIfNeeded as a drag crosses the midpoint between anchors, without waiting for release. Returning false vetoes the native state change but does not undo the emitted event. settings_main_sheet routes that event to BackOrDismissSettings, which returns to Settings home and resets the draft.

Example: Type a different server URL without applying it. Drag the sheet downward past the midpoint, then move it back up before lifting your finger. The Sync server screen has already received a dismissal and cleared the draft.

Recommended fix: Keep confirmValueChange free of side effects. Have the renderer emit one dismiss event from a completed dismissal gesture, not from an anchor check during dragging. Preserve the separate hardware Back handler and its medium-detent behavior. Add a regression test that reverses a drag after crossing the midpoint and checks that the URL draft remains editable.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread logseq.opam
["melange-transit-native.0.1.2" "git+https://github.com/logseq/melange-transit.git#main"]
["melange-transit-melange.0.1.2" "git+https://github.com/logseq/melange-transit.git#main"]
["lui.0.1.0" "git+ssh://git@github.com/logseq/lui.git#c44bfe549470d68c578814e603f10ca34fa7384e"]
["lui.0.1.0" "git+ssh://git@github.com/logseq/lui.git#6bc3849e03c2ecd61b355da79df3588b7389a234"]

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.

🔍 Outside taps also navigate Settings

Tapping outside an Android category triggers BackOrDismissSettings. Settings returns home and stays open, extending the behavior described for hardware Back.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant