Skip to content

New features from v1-reference - #16

Merged
grunch merged 3 commits into
mainfrom
001-mostro-p2p-client
Mar 23, 2026
Merged

New features from v1-reference#16
grunch merged 3 commits into
mainfrom
001-mostro-p2p-client

Conversation

@grunch

@grunch grunch commented Mar 23, 2026

Copy link
Copy Markdown
Member

State machine corrections (spec.md, data-model.md, contracts/types.md, research.md, tasks.md, plan.md):

  • PaymentFailed → documented as Action notification, not a Status (order stays in SettledHoldInvoice)
  • CooperativelyCanceled → documented as client-side UI state only (protocol doesn't change order status)
  • InProgress → added as new state (admin took dispute)
  • Order-type-dependent transitions documented (sell→WaitingBuyerInvoice; buy→WaitingPayment directly)

New features from v1-reference (spec.md, contracts/types.md, tasks.md):

  • FR-052/053: Nym identity (deterministic pseudonyms/avatars from pubkey)
  • FR-054: Default fiat currency setting
  • FR-055: Lightning Address setting
  • FR-056: Mostro node selector
  • FR-057/058: About screen with app info and node details
  • US5 scenario 8 (nym in chat), US7 scenarios 10-13 (new settings + about)
  • 6 new tasks (T059a/b for nym, T082a-d for settings/about)
  • NymIdentity struct added to types.md

Checklist updated: 58 FRs (up from 51), new v1 parity items checked.

Summary by CodeRabbit

  • New Features

    • Added Nym identity system with deterministic pseudonyms and avatars for encrypted P2P chat participants
    • Added default fiat currency selector to settings
    • Added Lightning Address configuration option
    • Added Mostro node selector with custom entry support
    • Added About screen displaying app and node metadata
  • Documentation

    • Clarified order state machine: PaymentFailed is an action notification, not a status; CooperativelyCanceled is client-side UI only
    • Enhanced admin dispute workflow with InProgress state path

  State machine corrections (spec.md, data-model.md, contracts/types.md, research.md, tasks.md, plan.md):
  - PaymentFailed → documented as Action notification, not a Status (order stays in SettledHoldInvoice)
  - CooperativelyCanceled → documented as client-side UI state only (protocol doesn't change order status)
  - InProgress → added as new state (admin took dispute)
  - Order-type-dependent transitions documented (sell→WaitingBuyerInvoice; buy→WaitingPayment directly)

  New features from v1-reference (spec.md, contracts/types.md, tasks.md):
  - FR-052/053: Nym identity (deterministic pseudonyms/avatars from pubkey)
  - FR-054: Default fiat currency setting
  - FR-055: Lightning Address setting
  - FR-056: Mostro node selector
  - FR-057/058: About screen with app info and node details
  - US5 scenario 8 (nym in chat), US7 scenarios 10-13 (new settings + about)
  - 6 new tasks (T059a/b for nym, T082a-d for settings/about)
  - NymIdentity struct added to types.md

  Checklist updated: 58 FRs (up from 51), new v1 parity items checked.
@coderabbitai

coderabbitai Bot commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@grunch has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 44 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d024ef7a-64fb-4028-a7bd-4da111d28266

📥 Commits

Reviewing files that changed from the base of the PR and between db3a705 and 0b31850.

📒 Files selected for processing (5)
  • specs/001-mostro-p2p-client/checklists/requirements.md
  • specs/001-mostro-p2p-client/contracts/types.md
  • specs/001-mostro-p2p-client/data-model.md
  • specs/001-mostro-p2p-client/spec.md
  • specs/001-mostro-p2p-client/tasks.md

Walkthrough

This pull request updates the Mostro P2P client specifications across multiple documentation files. The changes reclassify PaymentFailed as an action notification rather than an order status, redefine CooperativelyCanceled as client-side UI-only, and add the InProgress state to the admin dispute flow. Additionally, a new NymIdentity type is introduced with deterministically derived fields, and specifications for new features (nym pseudonyms, settings screen, about screen) are added.

Changes

Cohort / File(s) Summary
Protocol type definitions
specs/001-mostro-p2p-client/contracts/types.md
Added NymIdentity struct with fields for name, icon_name, and color_hue; clarified that PaymentFailed is an Action notification and CooperativelyCanceled is client-side UI-only.
State machine and order lifecycle documentation
specs/001-mostro-p2p-client/data-model.md, specs/001-mostro-p2p-client/research.md, specs/001-mostro-p2p-client/spec.md
Reclassified PaymentFailed as an Action; marked CooperativelyCanceled as UI-only; added InProgress state to admin dispute flow; clarified order-type-dependent transitions (sell vs. buy order invoice behavior).
Requirements and checklist
specs/001-mostro-p2p-client/checklists/requirements.md
Updated checklist to reflect v1-reference enrichment pass: added newly-covered features (Nym identity, default fiat currency, Lightning Address, Mostro node selector, About screen); documented state-machine corrections and updated functional requirement count (51→58).
Feature specifications and tasks
specs/001-mostro-p2p-client/tasks.md
Added User Story 5 subtasks for nym pseudonym generation in crypto module and avatar widget; expanded User Story 7 with new settings scope (default fiat currency, Lightning Address, Mostro node selector, About screen).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through specs with glee,
Reclassifying states so states can be free!
Nym pseudonyms dance, avatars shine,
Settings and shores make protocols align.
Payment flows fix'd, disputes in sight—
The model's now right, the specs are alight!

🚥 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 'New features from v1-reference' is partially related to the changeset. While the PR does introduce new features (nym identity, settings, about screen), it also includes significant state machine corrections (PaymentFailed, CooperativelyCanceled, InProgress) that are equally important. The title emphasizes only the feature additions and omits the critical protocol clarifications.
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 001-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.

@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: 5

🧹 Nitpick comments (2)
specs/001-mostro-p2p-client/tasks.md (1)

249-250: T082c overlaps with T090; define a single source of truth for node switching behavior.

Both tasks include node switching plus relay reset warning semantics, which risks duplicate implementation and inconsistent completion criteria.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/001-mostro-p2p-client/tasks.md` around lines 249 - 250, T082c and T090
both implement node switching and relay reset warning, causing duplication;
consolidate into a single source of truth by extracting the node switch logic
and relay-reset warning into a shared component/service (e.g., a
MostroNodeSelector widget and a NodeSwitchService) and update
lib/screens/settings/settings_screen.dart and
lib/screens/settings/about_screen.dart to consume that shared logic; ensure the
shared implementation encapsulates: list of known nodes + custom entry, switch
action that triggers relay reset warning per FR-056 and the US7 scenario 12
flow, and a single canonical place for validation, state mutation, and UI
strings so behavior and completion criteria remain consistent across both
screens (reference T082c, T090, FR-056, US7 scenario 12).
specs/001-mostro-p2p-client/spec.md (1)

410-411: FR-052/053 overlap existing FR-011a/011b/011c and should be consolidated.

This duplicates deterministic nym/avatar requirements already defined earlier, increasing maintenance and traceability drift risk.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/001-mostro-p2p-client/spec.md` around lines 410 - 411, FR-052 and
FR-053 duplicate deterministic pseudonym/avatar requirements already expressed
in FR-011a/011b/011c; remove FR-052 and FR-053 and consolidate their wording
into the existing FR-011 series so a single requirement covers deterministic
adjective-noun pseudonyms and visual avatars (icon + color) derived from public
keys without exposing key material; update any cross-references and the
traceability matrix to point to FR-011a/011b/011c and ensure the deterministic
guarantees (same key → same name/icon/color across sessions/devices) are
preserved verbatim in the FR-011 text.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@specs/001-mostro-p2p-client/checklists/requirements.md`:
- Line 87: The wording on line 87 is misleading: clarify that PaymentFailed is
being reclassified as an Action (not a Status) and that InProgress is being
added to the list of Status values, rather than saying InProgress "replaces"
PaymentFailed; update the text to explicitly state "PaymentFailed — moved to
Actions (no longer a Status)" and "InProgress — newly added Status", and also
note that CooperativelyCanceled remains a client-side UI-only state to avoid
confusion between action vs status categories.

In `@specs/001-mostro-p2p-client/contracts/types.md`:
- Around line 224-229: The NymIdentity contract fields diverge from the
canonical v1 model; update the NymIdentity definition to use the canonical field
names and types: replace name with pseudonym: String, replace icon_name with
icon_index: u8 (index into the static icon list 0-36), and change color_hue from
f64 to color_hue: u16 (0-359) so Dart/Rust implementations can convert to double
for HSV; ensure the comments reflect the new semantics (pseudonym format, icon
index bounds, and hue integer range).

In `@specs/001-mostro-p2p-client/data-model.md`:
- Around line 79-84: The spec is inconsistent about CooperativelyCanceled being
UI-only vs part of the "15 mostro-core statuses"; decide on a single canonical
model and make it consistent: either remove CooperativelyCanceled from the
enumerated mostro-core statuses (and add a clear "UI-only states" section
listing CooperativelyCanceled) or mark it as a protocol status and remove the
UI-only note; update the sentence that lists "15 mostro-core statuses" and the
earlier line that annotated CooperativelyCanceled to match the chosen model, and
ensure all references to CooperativelyCanceled elsewhere in the document
(state-machine descriptions, tests, and protocol notes) use the same
classification.

In `@specs/001-mostro-p2p-client/spec.md`:
- Line 401: FR-043 currently mixes protocol statuses with a UI-only state;
update the requirement to separate protocol-defined order statuses from
client-side UI-only states: list the protocol statuses (exclude
cooperativelyCanceled) and adjust the stated count accordingly, then add a
distinct sentence that `cooperativelyCanceled` is a client-side UI state and
that `paymentFailed` is an action notification rather than a status; reference
the FR-043 text and the tokens `cooperativelyCanceled` and `paymentFailed` when
making the change so tests and implementations can unambiguously validate
protocol vs UI semantics.

In `@specs/001-mostro-p2p-client/tasks.md`:
- Around line 144-145: Update the task T059a wording to request deterministic
pseudonym generation that outputs an integer icon_index and integer hue (not an
icon name or a string color), and update T059b to consume/display icon_index and
integer hue; specifically change references to rust/src/crypto/nym.rs to produce
(adjective-noun, icon_index, hue) per FR-052/FR-053 and change
lib/widgets/nym_avatar.dart to accept icon_index and integer hue (not icon name)
for rendering per US5 scenario 8 so the Rust-first deterministic nym model stays
consistent across layers.

---

Nitpick comments:
In `@specs/001-mostro-p2p-client/spec.md`:
- Around line 410-411: FR-052 and FR-053 duplicate deterministic
pseudonym/avatar requirements already expressed in FR-011a/011b/011c; remove
FR-052 and FR-053 and consolidate their wording into the existing FR-011 series
so a single requirement covers deterministic adjective-noun pseudonyms and
visual avatars (icon + color) derived from public keys without exposing key
material; update any cross-references and the traceability matrix to point to
FR-011a/011b/011c and ensure the deterministic guarantees (same key → same
name/icon/color across sessions/devices) are preserved verbatim in the FR-011
text.

In `@specs/001-mostro-p2p-client/tasks.md`:
- Around line 249-250: T082c and T090 both implement node switching and relay
reset warning, causing duplication; consolidate into a single source of truth by
extracting the node switch logic and relay-reset warning into a shared
component/service (e.g., a MostroNodeSelector widget and a NodeSwitchService)
and update lib/screens/settings/settings_screen.dart and
lib/screens/settings/about_screen.dart to consume that shared logic; ensure the
shared implementation encapsulates: list of known nodes + custom entry, switch
action that triggers relay reset warning per FR-056 and the US7 scenario 12
flow, and a single canonical place for validation, state mutation, and UI
strings so behavior and completion criteria remain consistent across both
screens (reference T082c, T090, FR-056, US7 scenario 12).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5f6e683a-a33e-4aa2-99ba-e37f3f570d82

📥 Commits

Reviewing files that changed from the base of the PR and between 95b5672 and db3a705.

📒 Files selected for processing (6)
  • specs/001-mostro-p2p-client/checklists/requirements.md
  • specs/001-mostro-p2p-client/contracts/types.md
  • specs/001-mostro-p2p-client/data-model.md
  • specs/001-mostro-p2p-client/research.md
  • specs/001-mostro-p2p-client/spec.md
  • specs/001-mostro-p2p-client/tasks.md

Comment thread specs/001-mostro-p2p-client/checklists/requirements.md Outdated
Comment thread specs/001-mostro-p2p-client/contracts/types.md
Comment thread specs/001-mostro-p2p-client/data-model.md Outdated
Comment thread specs/001-mostro-p2p-client/spec.md Outdated
Comment thread specs/001-mostro-p2p-client/tasks.md Outdated
  1. checklists/requirements.md:87 — Replaced misleading "InProgress replaces PaymentFailed" with accurate phrasing: PaymentFailed moved out of the status enum; InProgress newly added; CooperativelyCanceled is in mostro-core but set
  client-side.
  2. contracts/types.md NymIdentity — Corrected fields: name → pseudonym: String, icon_name: String → icon_index: u8, color_hue: f64 → color_hue: u16 (0–359).
  3. data-model.md:79 — Removed contradictory "client-side UI state only" wording; now accurately states it's in the mostro-core enum but set client-side via action notifications.
  4. spec.md FR-043 — Changed "protocol-defined" to "mostro-core" and updated the cooperativelyCanceled note to match the corrected canonical description.
  5. tasks.md T059a/T059b — Updated to use icon_index: u8 (0–36) and color_hue: u16 (0–359) instead of icon_name: String and float hue.
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