Repository navigation
fix(wallet): show the private-address refusal before Send, and keep suggestions under dialogs - #1147
Conversation
With Core or Platform as the source and another wallet's private address typed, the Send form offered an enabled Shield DASH button and a fee estimate. It refused only on click. The #1113 route check now lives in one function that also drives the form: the refusal shows under the address as soon as it applies, and Shield DASH is turned off with the same explanation on hover. The route check still refuses with the same error, so the guard itself is unchanged. The address suggestions popup stayed open after the field lost focus. It drew above a blocking dialog's dimmed backdrop, and its arrow and Enter keys kept working behind the dialog. AddressInput now closes the popup while a modal layer blocks the field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
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. Comment |
|
✅ Final review complete — no blockers (commit 81d5560) |
|
Waiting for bot review — coderabbitai not yet · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 2 only (no Phase 1 for this repository)
The PR correctly centralizes the private-destination refusal and preserves the backend route guard. The modal-layer check closes suggestions once egui has registered a blocking modal, but the opening frame remains uncovered: the dialog registers its modal layer only after AddressInput has already rendered, so the autocomplete popup can briefly appear above the dimmed backdrop. CI checks for this head are successful, with only PR Hygiene still pending.
🟡 1 suggestion(s)
Review provenance
Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This changes interactive wallet-send validation and shared address-input modal behavior, but it does not itself alter funds movement, coin selection, signing, or other critical surfaces. - Phase 1 reviewers: not run (disabled for this repository)
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `src/ui/components/address_input.rs`:
- [SUGGESTION] src/ui/components/address_input.rs:1082-1086: Close suggestions on the frame that opens a blocking dialog
This check only observes egui's modal-layer state from the previous frame. `modal_chrome` calls `set_modal_layer` after rendering the dialog, and the source comment confirms that egui consumes it into `top_modal_layer` at the end of the pass. In the Send screen, AddressInput renders before `render_send_confirmation`, so the frame in which clicking Send creates the blocking dialog still sees no modal layer and renders the autocomplete popup. Because the popup is a foreground area and the dialog backdrop is painted below it, the suggestion row can briefly remain visible over the dimmed backdrop. Close the component's autocomplete state when the action opens the blocking dialog, or otherwise arrange for the opening frame to suppress the popup; the existing four-frame kittest does not exercise this transient frame.
|
Ready for review — files with no dedicated owner: lklimek. |
|
Policy satisfied — this can merge. |
TL;DR
The Send form now refuses someone else's private address for Core and Platform sources up front: Shield DASH is turned off and the reason sits under the address. Before, it was only refused on click. Separately, address suggestions no longer draw on top of a blocking dialog's dimmed backdrop. Both were found in the 2026-10-27 release review.
User story
Scenario
tdash1z…).Detailed discussion
Refusal before the click (
src/ui/wallets/send_screen.rs). The #1113 check moved, unchanged, out ofvalidated_send_routeintoshielded_destination_refusal(). The route check still returns that refusal as its error, so the click-time and backend-facing guard is exactly as before and its existing tests are untouched. The same function now also drives:VALIDATION_WARNING, as AddressInput does for its own validation errors (ux-design-patterns §5);can_send, which turns the primary button off, plusdisabled_tooltipwith the same sentence (ux-design-patterns §10).No new copy: it reuses the user-tested
SHIELDED_NOT_OWN_POOLtext.Suggestions over a modal (
src/ui/components/address_input.rs). The suggestion popup is anOrder::Foregroundarea, and it stays open after the field loses focus (autocomplete_open) so a row click can land. A dialog that blocks input registers its window as egui's modal layer. The component now skips the popup, and closes it, whenever its own layer is below that modal layer (Memory::is_above_modal_layer). Because the fix lives in the component, it covers every blocking dialog over every AddressInput, not just the Send confirmation. As a side effect, arrow keys and Enter pressed in the dialog no longer move or pick a hidden suggestion behind it. Dialogs that do not block input register no modal layer and keep the old behaviour.Not changed, out of scope:
Testing
ui::wallets::send_screen::tests::someone_elses_private_address_turns_core_shielding_off_before_the_click: Core source plus another wallet's private address shows the refusal before any click. Shield DASH senses no click, and clicking opens no confirmation and raises no error. The wallet's own private address shows no refusal and keeps the button clickable.address_input::suggestions_do_not_draw_over_a_blocking_dialog: suggestions are open, then a blockingConfirmationDialogopens, and the suggestion row is gone.core_and_platform_refuse_someone_elses_private_address,core_refuses_a_private_address_while_its_own_is_unknown,core_and_platform_still_shield_into_the_own_pool,private_balance_still_pays_someone_elses_private_address).cargo clippy --all-features --lib --test kittest -- -D warningsclean;cargo fmt --all.🤖 Generated with Claude Code
https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
PR Hygiene ·
81d5560src/ui/components/address_input.rs,src/ui/wallets/send_screen.rs,tests/kittest/address_input.rs) — approved by lklimekWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.