Skip to content

feat(reputation): add the reputation settings screen - #745

Open
grunch wants to merge 2 commits into
feat/reputation-telegramfrom
feat/reputation-settings
Open

grunch wants to merge 2 commits into
feat/reputation-telegramfrom
feat/reputation-settings

Conversation

@grunch

@grunch grunch commented Oct 3, 2026

Copy link
Copy Markdown
Member

What changes and why

This is phase 5, PR 5.4 of the reputation portability plan, and the last mobile PR. It is stacked on #744 (5.3).

Settings gains a Reputation card that opens the new ReputationScreen (/reputation). The screen has:

  • Import: a short explanation and a button that opens the import screen (5.3).
  • Export. It appears only when the selected node's info event advertises reputation_issuer (reputationNodeSupportProvider); otherwise the screen says the node does not export.
    • Confirm. "Export my reputation" first opens a dialog that shows the user's identity as an npub and explains that the export binds this node's account to it. This is the confirmation the protocol requires before a first binding (docs(reputation): specify the reputation attestation, kind 38388 protocol#74, "Issuance", step 3). Nothing is sent if the user cancels.
    • Result. On success the attestation is shown, with a copy button and a note to switch to the target Mostro and import it there (it is also kept as pending by 5.2). A refusal from the node, such as "needs 10 completed trades and 5 ratings", is shown in the user's language.
  • Moving to a new identity:
    • the user enters the new identity's npub, which is validated;
    • "Sign authorization" signs a rebind authorisation with the identity the reputation is bound to now, for this node's issuer key;
    • the result is shown to copy, either to the new device, which passes it as rebind when exporting, or into the lnp2pBot chat (feat(reputation): move a binding to a new identity lnp2pBot/bot#934).
  • Full privacy mode: a notice explains why both directions are off, and the buttons are disabled.

Strings and automation ids. 13 new strings, in all seven ARB files. Seven new ids (settings.reputation, reputation.*), all attached.

Tests

test/features/reputation/reputation_screen_test.dart, 5 cases:

  • Export confirmation: the dialog shows the identity's npub; Cancel sends nothing; confirming exports and shows the result.
  • A node that does not export says so.
  • The node's refusal is shown.
  • Rebind: an invalid npub is refused, and a valid one produces the authorisation.
  • Full privacy mode disables the buttons.
flutter analyze: No issues found!
flutter test:    +1501 All tests passed!   (Flutter 3.35.7)

Screenshots

Not taken: I have not run the app on a device for this change. The flows are covered by the widget tests above, and the daemon side was run end to end (MostroP2P/mostro#1027).

🤖 Generated with Claude Code

https://claude.ai/code/session_01UrKanPgEfEBiEo3snHz4WZ

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f1d5a160-b5ed-4e10-9add-f7fa77faeed9

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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-03T15:22:13.607397Z b8d5a5e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8d5a5eccd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/features/reputation/screens/reputation_screen.dart Outdated
Comment thread lib/features/reputation/screens/reputation_screen.dart Outdated
grunch and others added 2 commits October 7, 2026 08:13
Phase 5, PR 5.4 of the reputation portability plan. Settings gains a
Reputation card leading to a screen that:

- reads what the selected node offers from its info event;
- exports the user's reputation from this node, after a dialog that
  shows the identity as an npub and says the export binds the account
  to it, then shows the attestation to copy and import elsewhere;
- opens the import screen (5.3);
- signs a rebind authorisation for a new identity's npub, with the
  identity the reputation is bound to now, to copy into the new device
  or paste into lnp2pBot;
- explains that full privacy mode keeps both directions off.

Strings in every ARB; automation ids under reputation.* and
settings.reputation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UrKanPgEfEBiEo3snHz4WZ
The screen signed rebind authorisations but never used one: every
export from the new identity went out without it, so the node kept
answering reputation_bound_to_other_identity. Add a field above the
export button to paste the authorisation the bound identity signed,
and pass it as rebind; the service checks it names this identity
and issuer before sending.

The import button also stayed enabled on a node that does not
advertise reputation_import_issuers, leading through the whole flow
to node_does_not_import. Read the import capability already fetched
and say the node does not import instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E4t8avpoStb19ERrS77V2m
@grunch
grunch force-pushed the feat/reputation-telegram branch from a52411a to 0c52f22 Compare October 7, 2026 11:23
@grunch
grunch force-pushed the feat/reputation-settings branch from b8d5a5e to eb6f481 Compare October 7, 2026 11:23
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