CantDo reasons reach the UI as English prose, not markers
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Domain
- backend, localization
Research direction
Start with the Action::CantDo arm in orders.rs, then follow the daemon-bound callers that re-raise its message and read lib/core/daemon_errors.dart plus the five lib/l10n/app_*.arb files. Return stable markers from Rust and localize the actionable reasons in Dart; the work is done when those reasons reach the UI in localized form and unmapped reasons still use each screen’s fallback.
Written by the indexing model from the issue text.
Description
Problem
The daemon's CantDo reason never reaches the user. The dispatcher maps the
reason to English prose (orders.rs, Action::CantDo arm) and the waiting
caller re-raises it verbatim — open_dispute does bail!("{message}"). That
string carries no stable marker, so localizedDaemonError
(lib/core/daemon_errors.dart) finds nothing to match and every screen shows
its generic fallback ("Could not open dispute. Please try again.").
The user learns the action failed, not that it was rejected as
NotAllowedByStatus — which is exactly the case issue #203 exists to make
legible.
Raised in the review of PR #275 (Catrya). CLAUDE.md already records the debt:
"some CantDo errors still return English prose directly — should become
markers."
Proposal
Return the reason as a stable marker from Rust (CantDo:NotAllowedByStatus, or
the marker alone) instead of prose, and map the reasons the client can act on to
localized strings in lib/core/daemon_errors.dart plus the five
lib/l10n/app_*.arb files. Unmapped reasons keep each screen's action-specific
fallback.
This spans every daemon-bound action that can be rejected (dispute, cancel,
release, fiat-sent, add-invoice, take, create), so it is one pass over the
Action::CantDo arm and the callers that re-raise its message.
Scope note
Rust does not translate (CLAUDE.md): it returns the marker, Dart owns the
prose.
- Dominant language
- Dart
- Stars
- 11
- Forks
- 9
- Avg merge
- 13h 4m
- Merged PRs (30d)
- 259
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MostroP2P/app
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Add-invoice screen stays on "Sent, waiting for the node" after a late acceptance on a sell orderOpenbug priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
area: ui
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MostroP2P/app#341 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
bggRGjQaUbCoE/PiliPlus#3235 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
intel/rohd-wave-viewer#11 ·
-
DOCS UPDATE: README.md and BACKEND.md reference a search-meetings edge function that does not existOpendocumentation
Difficulty 1/5 1-3 hours Newbie friendliness 93/100
AOSSIE-Org/Ell-ena#337 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
cat: puzzle
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
lichess-org/mobile#3826 ·
Maintainers usually reply within 2 days