Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
f948c9b
docs: add unified message display design documents
lklimek Feb 17, 2026
5445cd1
Merge remote-tracking branch 'origin/v1.0-dev' into design/unified-me…
lklimek Feb 18, 2026
7e16713
feat: add MessageType::Warning
lklimek Feb 18, 2026
75f09b5
chore: initial implementation
lklimek Feb 18, 2026
0dbed4a
chore: docs
lklimek Feb 18, 2026
54a9e27
chore: self review
lklimek Feb 18, 2026
343f411
refactor(context): replace RwLock<Sdk> with ArcSwap<Sdk> (#600)
thepastaclaw Feb 18, 2026
d9ddbfd
refactor: remove unused Insight API and show_in_ui config fields (#597)
lklimek Feb 18, 2026
b7bc968
build: add Flatpak packaging and CI workflow (#589)
lklimek Feb 18, 2026
9bc8ff7
chore: fix build
lklimek Feb 18, 2026
2a79d24
Merge remote-tracking branch 'origin/v1.0-dev' into design/unified-me…
lklimek Feb 18, 2026
0744c77
chore: use new error handling everywhere - not self reviewed
lklimek Feb 18, 2026
812e593
chore: use message banner to show progress
lklimek Feb 18, 2026
e0f0ce9
fix: start elapsed counter at 1s instead of 0s
lklimek Feb 18, 2026
1fd3e4b
chore: rabbit review
lklimek Feb 18, 2026
eac9bf1
Update src/app.rs
lklimek Feb 18, 2026
a4550ef
Merge branch 'design/unified-message-display' into design/unified-mes…
lklimek Feb 18, 2026
8f80a07
chore: peer review
lklimek Feb 18, 2026
b2cacfe
merge: integrate design/unified-message-display into applied branch
lklimek Feb 18, 2026
cec7e70
merge: integrate v1.0-dev into design/unified-message-display-applied
claude Feb 23, 2026
25d0f63
chore: fix build errors
lklimek Feb 24, 2026
97be398
merge: integrate v1.0-dev into design/unified-message-display-applied
lklimek Feb 25, 2026
bb510c8
fix(ui): make MessageBanner::set_global truly idempotent
lklimek Feb 25, 2026
4280cca
fix(ui): address code review findings R01, R03, R06, R09, R10
lklimek Feb 25, 2026
7daf5d2
fix(ui): address review findings SEC-08, SEC-09, RUST-015, SEC-05, SE…
lklimek Feb 25, 2026
377c4ea
docs: update coding conventions and message display guidance
lklimek Feb 26, 2026
af33bd6
fix(ui): replace expect/panic with graceful error handling (SEC-10)
lklimek Feb 26, 2026
ddf0eda
refactor(ui): accept impl Display/Debug in MessageBanner API
lklimek Feb 26, 2026
b0ce74b
fix(ui): remove error Failed to get best chain lock for mainnet, test…
lklimek Feb 26, 2026
ff31058
feat(ui): add automatic connection status banners
lklimek Feb 27, 2026
17475c9
Merge remote-tracking branch 'origin/v1.0-dev' into design/unified-me…
lklimek Feb 27, 2026
d325010
fix(ui): pass TaskError directly to with_details() to avoid double-fo…
lklimek Feb 27, 2026
d8a5604
fix(ui): correct copy-paste error messages in token screens
lklimek Feb 27, 2026
538af99
fix(ui): restore lost success/error messages in 5 screens
lklimek Feb 27, 2026
660743d
fix(ui): replace unwrap/expect with graceful error handling
lklimek Feb 27, 2026
09cd4b0
refactor(ui): migrate masternode_list_diff_screen to global MessageBa…
lklimek Feb 27, 2026
88c1756
fix(ui): improve banner eviction logging and atomics
lklimek Feb 27, 2026
b9fa914
chore: remove resolved TODO.md
lklimek Feb 27, 2026
55e9be8
docs(ui): add INTENTIONAL markers and API documentation
lklimek Feb 27, 2026
753a889
refactor(ui): extract shared token validation and fix ordering
lklimek Feb 27, 2026
a8b7269
refactor(ui): return Result from get_selected_wallet
lklimek Feb 27, 2026
b0d76d7
fix(ui): resolve duplicate imports and clippy warnings
lklimek Feb 27, 2026
dcdee85
style: reorder imports in masternode_list_diff_screen
lklimek Feb 27, 2026
9191fce
fix(ui): address review findings from MessageBanner migration audit
lklimek Feb 27, 2026
9bb5c3f
fix: validate token description length before sending to Platform (#530)
pauldelucia Feb 27, 2026
d1dbebd
refactor(ui): consolidate banner extension traits into message_banner
lklimek Feb 27, 2026
4bf4c48
doc(tmp): review guide for pr 604
lklimek Feb 27, 2026
538b7da
fix(ui): address review findings from grumpy-review iteration 1
lklimek Feb 27, 2026
70e0fb7
perf(ui): replace per-frame QualifiedIdentity clone with borrow
lklimek Feb 27, 2026
f3a5d4e
feat(ui): add OptionResultExt::or_show_error for Option<T>
lklimek Feb 27, 2026
0dbce61
fix(ui): address review findings from grumpy-review iteration 2
lklimek Feb 27, 2026
31e4503
fix(ui): handle Warning in add_new_identity_screen display_message
lklimek Feb 27, 2026
a461fb6
fix(ui): standardize display_message side-effect patterns across screens
lklimek Feb 27, 2026
c3b7f64
Merge remote-tracking branch 'origin/v1.0-dev' into design/unified-me…
lklimek Feb 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,10 @@ scripts/safe-cargo.sh +nightly fmt --all

## Coding Conventions

### Parameter ordering
### General rules

When a method takes `&AppContext` (or `Option<&AppContext>`), place it as the first parameter after `self`. Example:

```rust
fn remove_selected_utxos(&mut self, context: Option<&AppContext>, selected: &BTreeMap<...>) -> Result<(), String>
```
* When a method takes `&AppContext` (or `Option<&AppContext>`), place it as the first parameter after `self`.
* Screen constructors handle errors internally via `MessageBanner` and return `Self` with degraded state. Keep `create_screen()` clean — no error handling at callsites.

## Architecture Overview

Expand Down Expand Up @@ -176,7 +173,9 @@ response.inner.update(&mut self.amount);

## Message Display

User-facing messages use `MessageBanner` (`src/ui/components/message_banner.rs`). Global banners are rendered centrally by `island_central_panel()` — `AppState::update()` sets them automatically for backend task results. Screens only override `display_message()` for side-effects. See the component's doc comments and `docs/ai-design/2026-02-17-unified-messages/` for details.
User-facing messages (errors, warnings, success, infos) use `MessageBanner` (`src/ui/components/message_banner.rs`). Global banners are rendered centrally by `island_central_panel()` — `AppState::update()` sets them automatically for backend task results. When using `MessageBanner::set_global()`, no guard is needed — it is idempotent and automatically logs at the appropriate level (error/warn/debug). Screens only override `display_message()` for side-effects. See the component's doc comments and `docs/ai-design/2026-02-17-unified-messages/` for details.

**BannerHandle lifecycle**: Screens that run backend tasks typically store a `refresh_banner: Option<BannerHandle>` field. On task dispatch, set it via `MessageBanner::set_global()` with an info/progress message. In `display_message()` (called as a side-effect by AppState), dismiss the progress banner via `self.refresh_banner.take_and_clear()` (from `OptionBannerExt`). Simply setting the field to `None` would leak the banner — `take_and_clear()` removes it from the egui context. AppState handles displaying the actual result banner.

## Database

Expand Down
119 changes: 119 additions & 0 deletions docs/ai-design/2026-02-27-banner-review-fixes/pr-604-review-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# PR #604 — Manual Review Guide

Key files for manual review: architectural decisions, reusable patterns, and behavioral changes.
Files that merely apply patterns defined here are excluded (~57 files).

## 1. Core Infrastructure

### [`src/ui/components/message_banner.rs`](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-5c97c5af2fd0a32afba3e66e5f6a5f7acafb9a73da0d3b89a92f8fc9fca06a35)

Heart of the PR. All other changes depend on patterns defined here.

| What | Lines | Link |
|---|---|---|
| `set_global` idempotency change — no longer resets existing banners | L292–333 | [L292](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-5c97c5af2fd0a32afba3e66e5f6a5f7acafb9a73da0d3b89a92f8fc9fca06a35R292) |
| `replace_global` docs + empty-text semantics | L338–391 | [L338](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-5c97c5af2fd0a32afba3e66e5f6a5f7acafb9a73da0d3b89a92f8fc9fca06a35R338) |
| `with_details` now takes `impl Debug` instead of `&str` | L190–210 | [L190](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-5c97c5af2fd0a32afba3e66e5f6a5f7acafb9a73da0d3b89a92f8fc9fca06a35R190) |
| `ResultBannerExt` — `or_show_error()` on `Result` | L715–740 | [L715](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-5c97c5af2fd0a32afba3e66e5f6a5f7acafb9a73da0d3b89a92f8fc9fca06a35R715) |
| `OptionBannerExt` — `or_show_error()` + `take_and_clear()` on `Option<BannerHandle>` | L742–770 | [L742](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-5c97c5af2fd0a32afba3e66e5f6a5f7acafb9a73da0d3b89a92f8fc9fca06a35R742) |
| SEC-003: Eviction log no longer includes message text | L327–330 | [L327](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-5c97c5af2fd0a32afba3e66e5f6a5f7acafb9a73da0d3b89a92f8fc9fca06a35R327) |

**Review focus**: Verify the idempotency change in `set_global` (old behavior reset existing banners, new behavior is a no-op). This is a subtle semantic change that affects all callers.

## 2. Behavioral / Architectural Decisions

### [`src/ui/mod.rs` — ScreenLike trait](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-d64f1e2614b0de74ea77854bc2fb944deaaa5b40a4e37b91a81a94da9bd5ebf8R840)

`display_task_result` default changed from showing "Success" banner to **no-op**. Breaking behavioral change — screens that relied on the default now silently swallow success results.

| What | Lines | Link |
|---|---|---|
| `display_task_result` default → no-op | L840–857 | [L840](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-d64f1e2614b0de74ea77854bc2fb944deaaa5b40a4e37b91a81a94da9bd5ebf8R840) |

**Review focus**: Verify that AppState now handles success banners centrally, and no screen was relying on the old default `display_message("Success", Success)`.

### [`src/app.rs` — Connection banner + network switch](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-8c6f1be9c6b6eb6dc2c76e6a6f2706d76f81aad0ff222c5a9ef4eab78acee7b5)

New `update_connection_banner()` state machine and `clear_all_global` on network switch.

| What | Lines | Link |
|---|---|---|
| `previous_connection_state` + `connection_banner_handle` fields | L93–99 | [L93](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-8c6f1be9c6b6eb6dc2c76e6a6f2706d76f81aad0ff222c5a9ef4eab78acee7b5R93) |
| `clear_all_global` on network switch + INTENTIONAL comment | L875–896 | [L875](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-8c6f1be9c6b6eb6dc2c76e6a6f2706d76f81aad0ff222c5a9ef4eab78acee7b5R875) |
| `update_connection_banner()` — Disconnected/Syncing/Synced FSM | L898–934 | [L898](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-8c6f1be9c6b6eb6dc2c76e6a6f2706d76f81aad0ff222c5a9ef4eab78acee7b5R898) |

**Review focus**: The FSM uses `OverallConnectionState` equality to avoid redundant banner updates. Verify the state transitions cover all edge cases (e.g., rapid Disconnected→Syncing→Disconnected).

### [`src/context/connection_status.rs`](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-75d4306c0e7eca30d7e0dbb01b6f6b3d3b3af1e65a22e6de68aa6c92d9b3779f)

Removed error-string-matching logic (`contains("Failed to get best chain lock...")`). Verify this dead code removal is safe — the connection banner in `app.rs` now handles disconnected state via the FSM instead.

| What | Lines | Link |
|---|---|---|
| Removed string-matching error handler | L295–327 | [L295](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-75d4306c0e7eca30d7e0dbb01b6f6b3d3b3af1e65a22e6de68aa6c92d9b3779f) |

## 3. Reusable Pattern Examples (one representative each)

### [`src/ui/tokens/mod.rs` — Shared helpers](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-0e09ce3e1e56a10a8d2cef2e29e7addb8e5a4dff5f78b8e15c50cdc94ef53e06R16)

Defines 3 shared helpers used by ~15 token screens. This is where the DRY pattern originates.

| What | Lines | Link |
|---|---|---|
| `load_identities_with_banner()` | L22–28 | [L22](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-0e09ce3e1e56a10a8d2cef2e29e7addb8e5a4dff5f78b8e15c50cdc94ef53e06R22) |
| `set_error_banner()` | L31–34 | [L31](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-0e09ce3e1e56a10a8d2cef2e29e7addb8e5a4dff5f78b8e15c50cdc94ef53e06R31) |
| `validate_signing_key()` — `&Option<T>` → `Option<&T>` | L40–56 | [L40](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-0e09ce3e1e56a10a8d2cef2e29e7addb8e5a4dff5f78b8e15c50cdc94ef53e06R40) |

### [`src/ui/tokens/claim_tokens_screen.rs` — Constructor error handling](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-e5e6e8b6d4ffd3f1fba60f4bbb7c2e9a6a5db3b2aa3b0acfe7c4bc01fd2a88b5)

Best example of the SEC-001 fix pattern — eliminated `.expect()` panics in constructors, replaced with `or_show_error()` + degraded state.

| What | Lines | Link |
|---|---|---|
| Constructor: single DB load + `or_show_error` + `.or_else` fallback | L77–107 | [L77](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-e5e6e8b6d4ffd3f1fba60f4bbb7c2e9a6a5db3b2aa3b0acfe7c4bc01fd2a88b5R77) |
| Status enum: `WaitingForResult(u64)` → `WaitingForResult` (dropped timestamp) | L45–50 | [L45](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-e5e6e8b6d4ffd3f1fba60f4bbb7c2e9a6a5db3b2aa3b0acfe7c4bc01fd2a88b5R45) |

### [`src/ui/identities/add_existing_identity_screen.rs` — `AddIdentityStatus::Error` variant](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-ce4b3e7e4e4beb1a3c39f4def2f6a86a86a3a3a97e64bbd29b9fa5f1db34c7e7)

Shows the PROJ-005 pattern — status enums no longer carry error strings (moved to global banner). Also shows constructor error handling via `MessageBanner::set_global`.

| What | Lines | Link |
|---|---|---|
| `AddIdentityStatus::Error` (unit variant, no string) | L85–88 | [L85](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-ce4b3e7e4e4beb1a3c39f4def2f6a86a86a3a3a97e64bbd29b9fa5f1db34c7e7R85) |
| Constructor: init error → `set_global` | L126–128 | [L126](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-ce4b3e7e4e4beb1a3c39f4def2f6a86a86a3a3a97e64bbd29b9fa5f1db34c7e7R126) |

### [`src/ui/wallets/send_screen.rs` — BannerHandle lifecycle](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-4b2fd2b6b35fe1d83a5c0e1a80e8a51e03ba4c3f03e5da1bb7498fe43e34e57f)

Most complete example of the `BannerHandle` lifecycle pattern — progress banner with elapsed time, clearing on result, and the `set_send_progress_banner` helper.

| What | Lines | Link |
|---|---|---|
| `send_banner: Option<BannerHandle>` field | L389–392 | [L389](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-4b2fd2b6b35fe1d83a5c0e1a80e8a51e03ba4c3f03e5da1bb7498fe43e34e57fR389) |
| `set_send_progress_banner()` — take_and_clear + set_global + with_elapsed | L650–660 | [L650](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-4b2fd2b6b35fe1d83a5c0e1a80e8a51e03ba4c3f03e5da1bb7498fe43e34e57fR650) |

## 4. Conventions / Docs

### [`CLAUDE.md`](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-82d8aa1d8fd8d9b71c3cf5e7fcade1d8697cc47c6df2e1b0c77ed5b0f01e5e93)

Updated conventions affect all future development.

| What | Lines | Link |
|---|---|---|
| Constructor error handling convention | L58–63 | [L58](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-82d8aa1d8fd8d9b71c3cf5e7fcade1d8697cc47c6df2e1b0c77ed5b0f01e5e93R58) |
| `BannerHandle` lifecycle docs | L173–181 | [L173](https://github.com/dashpay/dash-evo-tool/pull/604/files#diff-82d8aa1d8fd8d9b71c3cf5e7fcade1d8697cc47c6df2e1b0c77ed5b0f01e5e93R173) |

## Summary: 8 files to review, ~57 files skipped

| Priority | File | What to verify |
|---|---|---|
| 🔴 | `message_banner.rs` | `set_global` idempotency change, extension traits |
| 🔴 | `src/ui/mod.rs` | `display_task_result` default → no-op |
| 🔴 | `src/app.rs` | Connection banner FSM, `clear_all_global` on switch |
| 🟡 | `connection_status.rs` | Error-string-matching removal safety |
| 🟡 | `tokens/mod.rs` | Shared helpers (`validate_signing_key` signature) |
| 🟢 | `claim_tokens_screen.rs` | Constructor pattern example |
| 🟢 | `add_existing_identity_screen.rs` | Status enum + init error pattern |
| 🟢 | `send_screen.rs` | BannerHandle lifecycle pattern |
| 📄 | `CLAUDE.md` | Convention accuracy |

The remaining ~57 files are mechanical applications of these patterns — `take_and_clear()`, `or_show_error()`, status enum simplification, and `error_message` field removal. If the patterns above look correct, those files are correct by construction.
Loading
Loading