Skip to content

docs: add Settings and Notification Settings specs - #32

Merged
grunch merged 2 commits into
mainfrom
docs/settings-spec
Mar 25, 2026
Merged

docs: add Settings and Notification Settings specs#32
grunch merged 2 commits into
mainfrom
docs/settings-spec

Conversation

@mostronatorcoder

@mostronatorcoder mostronatorcoder Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Documents the complete Settings system (point 11 from the original feature list) including the Settings hub and Notification Settings sub-screen.

Changes

New Files

NOTIFICATION_SETTINGS.md

  • Route /notification_settings behavior
  • Push notification master toggle (platform-aware)
  • Sound/vibration preferences
  • Token unregistration on disable
  • Privacy information card

Updated Files

SETTINGS_SCREEN.md (complete rewrite)

  • Architecture overview (Settings model, SettingsNotifier, SharedPreferences storage)
  • All 8 cards detailed:
    • Language selector
    • Currency selector
    • Default Lightning Address
    • Wallet Status Card (links to NWC)
    • Relays management
    • Notification Settings shortcut
    • Dev Tools (logging toggle + /logs link)
    • Mostro Node selector
  • Side effects documentation (Mostro change resets relay blacklist, push disable unregisters tokens, etc.)
  • Cross-references to related specs

README.md

  • Added NOTIFICATION_SETTINGS.md entry
  • Updated SETTINGS_SCREEN.md description

NAVIGATION_ROUTES.md

  • Linked /notification_settings route to spec
  • Added Notification Settings to cross-references table

Settings System Deep Dive

After analyzing v1 code, discovered:

State Management

  • Settings class: immutable model with 14 fields
  • Persisted in SharedPreferences as JSON
  • SettingsNotifier handles async init, mutations, and side effects

Key Fields & Usage

  • selectedLanguage → MaterialApp.locale, background services
  • defaultFiatCode → AddOrderScreen pre-fill, exchange providers
  • defaultLightningAddress → auto-fills invoice generation for buyers
  • relays/blacklistedRelays/userRelays → relay sync subsystem
  • mostroPublicKey → Nostr handshake headers
  • pushNotificationsEnabled → FCM token management
  • notificationSoundEnabled/notificationVibrationEnabled → notification prefs
  • isLoggingEnabled → in-memory log buffer toggle
  • fullPrivacyMode → (not exposed in UI, gates master key storage)

Side Effects

  • Changing Mostro node clears relay blacklist to prevent cross-instance pollution
  • Disabling push unregisters all tokens immediately
  • Lightning address changes propagate in real-time to dependent flows

All specs are now cross-linked with no orphaned documents.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive reference documentation for the Notification Settings screen, including push notification toggles, platform support, device preferences, and UI component structure
    • Restructured and expanded Settings System documentation with improved architecture overview, state management details, and cross-references to related features
    • Updated documentation index with new Notification Settings entry

- Rewrote SETTINGS_SCREEN.md with architecture, card behaviors, and cross-references
- Added NOTIFICATION_SETTINGS.md detailing /notification_settings UI and side-effects
- Updated README.md index with the new spec entry
- Linked wallet/notification routes in NAVIGATION_ROUTES.md to their respective specs
@grunch

grunch commented Mar 24, 2026

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8265f8d8-be27-4569-9881-7a562c502c60

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This pull request updates v1 reference documentation for the settings and notification systems. It creates a new NOTIFICATION_SETTINGS.md documentation file detailing push notification toggles and sound/vibration preferences, restructures SETTINGS_SCREEN.md from a single-screen spec to a multi-route architecture documentation, and updates NAVIGATION_ROUTES.md and README.md with cross-references to the new notification settings documentation.

Changes

Cohort / File(s) Summary
Navigation & Reference Index
.specify/v1-reference/NAVIGATION_ROUTES.md, .specify/v1-reference/README.md
Updated cross-references and index entries to include the new NOTIFICATION_SETTINGS.md documentation. NAVIGATION_ROUTES.md linked /notification_settings route to the new document, and README.md added the notification settings entry.
Notification Settings Documentation
.specify/v1-reference/NOTIFICATION_SETTINGS.md
New documentation file describing the NotificationSettingsScreen widget, push notification master toggle with platform gating (disabled on Web/desktop), per-device sound and vibration toggles with preserved state during push disable, UI structure with three cards, and action/outcome table with cross-references to related FCM and logging docs.
Settings System Architecture
.specify/v1-reference/SETTINGS_SCREEN.md
Substantially rewritten to document a broader multi-route settings system (/settings, /notification_settings, /about, /relays) instead of a single screen. Added architecture section covering immutable Settings model, Riverpod StateNotifier persistence to SharedPreferences, side effects (Mostro node changes, push disable token cleanup, lightning address nullification), SettingsNotifier responsibilities, and consolidated UI section with card-to-component mappings. Removed legacy detailed card layouts and info dialog content.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 Settings organized, notifications squared,
Routes and references perfectly paired,
Push toggles gated, vibrations preserved,
In docs so clear, every detail deserved! 📋✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: add Settings and Notification Settings specs' directly and clearly summarizes the main changes—the addition of comprehensive documentation for Settings and Notification Settings specifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/settings-spec

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.specify/v1-reference/NOTIFICATION_SETTINGS.md:
- Line 57: Update the "Disable push" row to remove ambiguity by explicitly
stating that push controls are disabled while the underlying stored values for
sound and vibration remain unchanged; reference the "Disable push" label and the
"sound/vibration" toggles in your update and reword the sentence to something
like: "Immediately unregisters tokens and deletes FCM token; disables sound and
vibration controls in the UI while preserving their stored values (values remain
cached but are not applied)". Ensure the row clearly separates the action
(unregister/delete) from the UI state (controls disabled) and the preservation
of cached values.

In @.specify/v1-reference/SETTINGS_SCREEN.md:
- Line 77: The phrase "Orders created afterwards pre-fill this fiat code." uses
the British variant "afterwards"; update the sentence in SETTINGS_SCREEN.md to
use the US-English variant "afterward" so it reads "Orders created afterward
pre-fill this fiat code."—search for that exact sentence text to locate and
replace it.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eaf46475-3893-46c3-bf67-7bedd20752ce

📥 Commits

Reviewing files that changed from the base of the PR and between 7091c56 and ef89532.

📒 Files selected for processing (4)
  • .specify/v1-reference/NAVIGATION_ROUTES.md
  • .specify/v1-reference/NOTIFICATION_SETTINGS.md
  • .specify/v1-reference/README.md
  • .specify/v1-reference/SETTINGS_SCREEN.md

Comment thread .specify/v1-reference/NOTIFICATION_SETTINGS.md Outdated
Comment thread .specify/v1-reference/SETTINGS_SCREEN.md Outdated
- NOTIFICATION_SETTINGS.md: clarify Disable push behavior (unregister/delete vs UI state vs cached values)
- SETTINGS_SCREEN.md: use US-English 'afterward' instead of British 'afterwards'
@grunch
grunch merged commit fd50582 into main Mar 25, 2026
1 check passed
@grunch
grunch deleted the docs/settings-spec branch March 25, 2026 00:24
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