Skip to content

chore: reset to clean state for 004-mostro-p2p-client - #48

Merged
grunch merged 1 commit into
mainfrom
004-mostro-p2p-client
Mar 29, 2026
Merged

chore: reset to clean state for 004-mostro-p2p-client#48
grunch merged 1 commit into
mainfrom
004-mostro-p2p-client

Conversation

@grunch

@grunch grunch commented Mar 29, 2026

Copy link
Copy Markdown
Member

Remove all generated implementation code from the 001-mostro-p2p-client phases (lib/, rust/src/, pubspec.yaml). Reset lib/main.dart, test/, and rust/Cargo.toml to a minimal clean Flutter/Rust project baseline. Migrate and preserve all planning artifacts under specs/004-mostro-p2p-client/.

Summary by CodeRabbit

Revert

  • Revert: App reset to placeholder state; all features temporarily disabled pending architecture restructure.

  • Chores

    • Removed identity management, order book, trading, messaging, and dispute functionality.
    • Removed localization, theming, routing, and state management infrastructure.
    • Removed Rust FFI bridge and protocol integrations.
    • Updated project specifications and implementation plans.

Remove all generated implementation code from the 001-mostro-p2p-client
phases (lib/, rust/src/, pubspec.yaml). Reset lib/main.dart, test/, and
rust/Cargo.toml to a minimal clean Flutter/Rust project baseline.
Migrate and preserve all planning artifacts under specs/004-mostro-p2p-client/.
@coderabbitai

coderabbitai Bot commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a36f70b0-8810-4a35-9353-7c22df6cd54c

📥 Commits

Reviewing files that changed from the base of the PR and between 4949716 and a1aa447.

⛔ Files ignored due to path filters (1)
  • rust/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (70)
  • CLAUDE.md
  • lib/app.dart
  • lib/l10n/app_en.arb
  • lib/l10n/app_localizations.dart
  • lib/l10n/app_localizations_en.dart
  • lib/main.dart
  • lib/providers/identity_provider.dart
  • lib/providers/messages_provider.dart
  • lib/providers/orders_provider.dart
  • lib/providers/relay_provider.dart
  • lib/providers/settings_provider.dart
  • lib/providers/trade_provider.dart
  • lib/providers/wallet_provider.dart
  • lib/router.dart
  • lib/screens/home/home_screen.dart
  • lib/screens/onboarding/create_identity_screen.dart
  • lib/screens/onboarding/import_identity_screen.dart
  • lib/screens/onboarding/pin_setup_screen.dart
  • lib/screens/onboarding/welcome_screen.dart
  • lib/theme/app_theme.dart
  • lib/widgets/responsive_layout.dart
  • pubspec.yaml
  • rust/Cargo.toml
  • rust/src/api/identity.rs
  • rust/src/api/mod.rs
  • rust/src/api/nostr.rs
  • rust/src/api/runtime.rs
  • rust/src/api/simple.rs
  • rust/src/api/types.rs
  • rust/src/crypto/file_encrypt.rs
  • rust/src/crypto/keys.rs
  • rust/src/crypto/mod.rs
  • rust/src/crypto/nym.rs
  • rust/src/crypto/secure_store.rs
  • rust/src/frb_generated.rs
  • rust/src/lib.rs
  • rust/src/network/blossom.rs
  • rust/src/network/message_queue.rs
  • rust/src/network/mod.rs
  • rust/src/network/relay_pool.rs
  • rust/src/protocol/actions.rs
  • rust/src/protocol/gift_wrap.rs
  • rust/src/protocol/mod.rs
  • rust/src/protocol/state_machine.rs
  • rust/src/storage/indexeddb.rs
  • rust/src/storage/migrations/001_initial.sql
  • rust/src/storage/mod.rs
  • rust/src/storage/sqlite.rs
  • specs/001-mostro-p2p-client/checklists/requirements.md
  • specs/001-mostro-p2p-client/plan.md
  • specs/001-mostro-p2p-client/quickstart.md
  • specs/001-mostro-p2p-client/spec.md
  • specs/001-mostro-p2p-client/tasks.md
  • specs/004-mostro-p2p-client/checklists/requirements.md
  • specs/004-mostro-p2p-client/contracts/disputes.md
  • specs/004-mostro-p2p-client/contracts/identity.md
  • specs/004-mostro-p2p-client/contracts/messages.md
  • specs/004-mostro-p2p-client/contracts/nostr.md
  • specs/004-mostro-p2p-client/contracts/nwc.md
  • specs/004-mostro-p2p-client/contracts/orders.md
  • specs/004-mostro-p2p-client/contracts/reputation.md
  • specs/004-mostro-p2p-client/contracts/settings.md
  • specs/004-mostro-p2p-client/contracts/types.md
  • specs/004-mostro-p2p-client/data-model.md
  • specs/004-mostro-p2p-client/plan.md
  • specs/004-mostro-p2p-client/quickstart.md
  • specs/004-mostro-p2p-client/research.md
  • specs/004-mostro-p2p-client/spec.md
  • specs/004-mostro-p2p-client/tasks.md
  • test/widget_test.dart

Walkthrough

A comprehensive rewrite removes the entire existing Flutter/Rust implementation stack—including Riverpod providers, GoRouter, localization, identity/onboarding screens, Rust FFI bindings, protocol/crypto/storage subsystems, and generated bridge code—replacing it with new architecture specifications defining a Rust-core/Flutter-UI split design and updating the app entry point to a minimal placeholder.

Changes

Cohort / File(s) Summary
Documentation & Architecture
CLAUDE.md, specs/004-mostro-p2p-client/spec.md, specs/004-mostro-p2p-client/plan.md, specs/004-mostro-p2p-client/quickstart.md, specs/004-mostro-p2p-client/tasks.md, specs/004-mostro-p2p-client/checklists/requirements.md
Updated CLAUDE.md with 004-mostro-p2p-client Rust 1.94+/Dart 3.x/Flutter 3.x stack, Sembast state management, and SQLite/IndexedDB persistence split. Added comprehensive v2 architecture specifications including feature requirements, implementation plan, task breakdown (T001–T125 across 17 phases), quickstart guide, and quality checklist.
Old Spec Removals
specs/001-mostro-p2p-client/spec.md, specs/001-mostro-p2p-client/plan.md, specs/001-mostro-p2p-client/quickstart.md, specs/001-mostro-p2p-client/checklists/requirements.md, specs/001-mostro-p2p-client/tasks.md
Deleted entire v1 specification documents including feature spec, implementation plan, quickstart, task list, and requirements checklist.
Flutter Entry Point & App Bootstrap
lib/main.dart, lib/app.dart
Replaced async main with ProviderScope/Rust initialization with synchronous void main() calling runApp(const MostroApp()). Converted MostroApp from ConsumerWidget (Riverpod-integrated theme/routing/localization) to minimal StatelessWidget showing "Mostro Mobile v2" placeholder text.
Flutter Localization
lib/l10n/app_en.arb, lib/l10n/app_localizations.dart, lib/l10n/app_localizations_en.dart
Removed English localization resource file (313 message keys including app titles, onboarding/identity/PIN/order/trade/chat/dispute/settings strings), base AppLocalizations class and delegate, and concrete AppLocalizationsEn implementation with 100+ getter overrides.
Flutter State Management Providers
lib/providers/identity_provider.dart, lib/providers/messages_provider.dart, lib/providers/orders_provider.dart, lib/providers/relay_provider.dart, lib/providers/settings_provider.dart, lib/providers/trade_provider.dart, lib/providers/wallet_provider.dart
Removed all Riverpod AsyncNotifierProviders managing identity lifecycle (create/import/unlock/PIN), messages, orders, relays (with connection state polling), settings (theme/locale/biometric), trades, and wallet state. Deleted associated data models and notifier classes.
Flutter Routing & Navigation
lib/router.dart
Removed GoRouter configuration with identity-based redirect logic, RouterNotifier change listener bridging Riverpod↔GoRouter, and all route definitions (onboarding/home/orders/trades/disputes/history/settings/about paths).
Flutter Screens
lib/screens/home/home_screen.dart, lib/screens/onboarding/welcome_screen.dart, lib/screens/onboarding/create_identity_screen.dart, lib/screens/onboarding/import_identity_screen.dart, lib/screens/onboarding/pin_setup_screen.dart
Removed all onboarding/home screens including mnemonic generation/display/confirmation, identity import (mnemonic/nsec), PIN setup, and home screen with order list/connection indicator/navigation bar.
Flutter UI Widgets & Theme
lib/widgets/responsive_layout.dart, lib/theme/app_theme.dart
Removed responsive layout abstraction (ResponsiveLayout, PhoneShell, TabletShell, DesktopShell with breakpoint-based navigation), Material 3 theme definitions (light/dark ThemeData, semantic colors, MostroColors extension).
Flutter Dependencies
pubspec.yaml
Removed Rust bridge (flutter_rust_bridge, rust path dependency), state management (flutter_riverpod), routing (go_router), platform services (flutter_secure_storage, file_picker, permission_handler), QR/scanning (qr_flutter, mobile_scanner), and path utilities. Updated app description to "Mostro Mobile v2 — P2P Bitcoin Lightning exchange".
Rust API Layer
rust/src/api/identity.rs, rust/src/api/nostr.rs, rust/src/api/mod.rs, rust/src/api/simple.rs, rust/src/api/types.rs, rust/src/api/runtime.rs
Removed identity lifecycle API (create/import/unlock/PIN management, key derivation, nym identity), Nostr relay pool initialization/state/info queries, module wiring, placeholder greet function, all domain/bridge types (Order/Trade/Chat/Identity/Relay/etc.), and native runtime (AppRuntime, global RUNTIME mutex with SQLite/key/identity/pool storage).
Rust Crypto Modules
rust/src/crypto/keys.rs, rust/src/crypto/file_encrypt.rs, rust/src/crypto/nym.rs, rust/src/crypto/secure_store.rs, rust/src/crypto/mod.rs
Removed BIP-32/39 key derivation functions, ChaCha20-Poly1305 AEAD encryption/decryption for attachments, deterministic pseudonym/avatar generation from pubkeys, platform secure storage stubs, and crypto module wiring.
Rust Network Modules
rust/src/network/relay_pool.rs, rust/src/network/blossom.rs, rust/src/network/message_queue.rs, rust/src/network/mod.rs
Removed RelayPool abstraction over nostr-sdk, Blossom file upload/download client, offline message queue with retry/pruning logic, and network module exports.
Rust Protocol Modules
rust/src/protocol/actions.rs, rust/src/protocol/gift_wrap.rs, rust/src/protocol/state_machine.rs, rust/src/protocol/mod.rs
Removed Mostro protocol action builders (order/trade/chat), NIP-59 Gift Wrap encryption/decryption, order state machine transitions/validation/outcome mapping, and protocol module wiring.
Rust Storage Layer
rust/src/storage/sqlite.rs, rust/src/storage/indexeddb.rs, rust/src/storage/migrations/001_initial.sql, rust/src/storage/mod.rs
Removed SQLite storage backend (migrations, CRUD ops, record mappers), IndexedDB storage for WASM (object stores, serialization), entire Storage trait with identity/order/trade/message/queue/wallet/attachment/rating/dispute/relay operations, and storage module definitions.
Rust Build & Codegen
rust/src/frb_generated.rs, rust/src/lib.rs, rust/Cargo.toml
Removed flutter_rust_bridge boilerplate (wire functions, codec implementations, platform modules), crate module declarations (api/crypto/network/protocol/storage), all Rust dependencies (nostr-sdk, mostro-core, tokio, sqlx, serde, crypto crates), and native/wasm feature-gated deps.
Test Updates
test/widget_test.dart
Updated test to remove ProviderScope wrapping and import MostroApp from main.dart instead of app.dart, simplifying assertions to verify MaterialApp presence.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 Whiskers twitch at great unbuild—
Files fall like autumn leaves, gently spilled.
But blueprints rise where code once grew,
New gardens planned, v2.
The Rust core gleams, the Flutter blooms—
Rebuild awaits in spec'd rooms.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 004-mostro-p2p-client

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.

@grunch
grunch merged commit 629476b into main Mar 29, 2026
1 check was pending
@grunch
grunch deleted the 004-mostro-p2p-client branch March 29, 2026 19:12
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