Skip to content

refactor(ui): draw every QR code through one shared widget - #1089

Merged
lklimek merged 50 commits into
v1.0-devfrom
refactor/qr-code-component
Oct 14, 2026
Merged

lklimek merged 50 commits into
v1.0-devfrom
refactor/qr-code-component

Conversation

@Claudius-Maginificent

@Claudius-Maginificent Claudius-Maginificent commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR

Every QR code in the app (receive dialogs, deposit screens, username QR, DashPay QR, identity Home "Receive") is now drawn by one shared widget. Screens that rebuilt their QR code on every frame no longer do, and a QR code that cannot be created shows one clear sentence telling the user to copy the value instead.

User story

As an everyday user, I want every QR code in the app to look and behave the same, and to get a plain instruction when one cannot be shown, so that I can always pass on an address or username.

Scenario

Actual behavior

  • Four screens (identity deposit for creation and top-up, asset lock creation, DashPay QR generator) re-encoded and re-uploaded their QR code on every frame.
  • When a QR code could not be created, screens reacted differently: a raw error text in the Receive dialog, QR error: … in the new-wallet screen, an error banner and no window for a username QR, nothing at all on identity Home.

Expected behavior

  • A QR code is encoded once per value and rebuilt only when the value changes.
  • Encoding failure shows one sentence that tells the user to copy the value instead; technical details go to the log.
  • Sizes and filtering of each existing QR code stay as they were.

Detailed discussion

  • New QrCodeImage in src/ui/components/qr_code_image.rs (display-only widget, lazy-init pattern): show(ui, value) each frame; texture cached by value, rebuilt on change; a failed encode is cached too, so it is not retried each frame. Builders with_size (default 200), with_natural_size, with_texture_options (default LINEAR), with_fallback_text. Listed in src/ui/components/README.md.
  • generate_qr_code_image moved from funding_common.rs into the widget; it had no other users.
  • Migrated: DashPay QR generator, identity creation and top-up deposit screens, usernames card, add-new-wallet, create asset lock, wallets Receive dialog, identity Home Receive (ReceiveQr removed; HomeState.receive_qr is Option<QrCodeImage>).
  • Removed the "Generating QR code…" label in the Receive dialog and add-new-wallet: encoding is synchronous. Removed the now-redundant qr_texture/qr_address fields in the wallets screen.
  • Usernames card: on failure it now opens the window with the fallback sentence instead of an error banner.
  • DashPay fallback text is plain instead of red; create-asset-lock fallback reworded to "Could not create the QR code. Copy the address below instead."

Stacked atop #1082 (which is stacked atop #1074): merge after both; retarget to v1.0-dev then.

Testing

  • 4 unit tests for the widget: same value reuses the texture, changed value rebuilds it, unencodable value yields no texture and recovers, fallback renders without panic.
  • Full kittest binary: 472 passed, including identity_home::home_receive_code_follows_a_username_gained_while_it_is_open.
  • cargo clippy --all-features --lib --tests -- -D warnings clean, cargo fmt --all.

🤖 Co-authored by Claudius the Magnificent AI Agent

🤖 Generated with Claude Code

https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw

Summary by CodeRabbit

  • New Features
    • QR codes are now displayed consistently across identity, wallet, funding, and username screens, with configurable sizing and fallback text when a value can’t be encoded.
    • QR images update when their displayed value changes and reuse the existing image when it remains the same.
  • Bug Fixes
    • Receive dialogs retain QR display state as addresses are generated or selected.

lklimek and others added 30 commits October 12, 2026 12:26
Show published avatars, compact username controls, responsive Home cards, and Profile navigation. Reuse the wallet send form with fixed identity parties and owned-wallet withdrawal destinations.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Codex GPT-6 <noreply@openai.com>
Keep contacts at the top of the right column beside quick actions. Place
left-aligned username cards with setup and payment history, using A05
column proportions and stacked cards in narrow windows.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Codex GPT-6 <noreply@openai.com>
Preserve the development-branch update alongside the Home layout fix.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Codex GPT-6 <noreply@openai.com>
SDK responses include recipient addresses. Only update balances for
Platform addresses registered to the selected wallet, preventing unrelated
wallets from offering foreign funds for identity top-ups or transfers.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Codex GPT-6 <noreply@openai.com>
…idle

The offline profile-cache test intentionally leaves the avatar request
pending. Render bounded frames while checking the pending fetch and
preserving assertions for cached, saved, and absent profile data.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Codex GPT-6 <noreply@openai.com>
Conflict in src/ui/identity/settings.rs: both sides added methods to
SettingsTab at the same place. Kept both (focus_section from this branch,
usernames_card_mut and accepts_legacy_recovery_result from #1076) and this
branch's doc comment on render.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
IDH-004 still described a `Set up your social profile` checklist entry
with its own skip affordance. Home renders an optional `Set a display
name` step, and the only dismiss control, `Hide this for now`, hides the
whole checklist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
…owns

The only Move to wallet test ran against a context without wallets and
asserted that an external address is refused, so it would also pass if the
ownership check refused every address.

Register a wallet, take one of its receiving addresses, and drive the
production validation and confirmation: the dispatched withdrawal must carry
the bound identity, that address and the entered amount. An external address
is still refused, and the owned address is refused once its wallet is removed.
Nothing is broadcast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
Every frame of an identity-bound send form restored the binding, which
allocated a new box and cloned the identity twice for Send and Move to
wallet, and looked up the username again for Top up, even when nothing had
changed.

The check `validated_send_route` already made is now a shared predicate, and
the per-frame call restores only when that predicate fails. Construction,
reset and refresh still restore unconditionally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
Home tracked which request its payment preview answered, but not which
identity the rows belonged to. The selected identity can change without the
hub hearing of it, for example when another screen's identity selector is
used and that screen is closed without a refresh. Home then showed the new
identity above the previous identity's payments, and the load guard kept the
new identity's history from being requested.

Home state now records its owner and reconciles it before rendering: content
of another identity is dropped and its pending request forgotten, so a late
answer is discarded and the new history loads. A refresh for the same
identity keeps the preview on screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
…llet

Move to wallet opens the shared send form, whose Max for an identity sender
always kept back the fee of a transfer between identities. A withdrawal to a
Core address costs far more, so Max offered an amount the network refused,
and the form only compared the amount with the balance.

The reserve now follows the destination: a Core address keeps back the
withdrawal estimate, every other destination keeps what it kept before. Max
and send validation read the same value, and a withdrawal that would leave
too little for the fee is refused before the confirmation, naming the highest
amount that works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
…s app

Send from Identity Home dispatched its transfers without a signing key. The
backend passed that on, and the SDK then takes the identity's first TRANSFER
key, including a disabled one, without asking whether the local signer holds
it. An identity with an earlier disabled key, or one imported with only a
later key, could not send.

Transfers to an identity and to Platform addresses now resolve the key before
any network call: an active TRANSFER key the signer can use, lowest id first.
An explicitly requested key that is unusable is refused rather than replaced,
and a missing key is reported as its own error. The send form resolves the
same key, passes it along, and refuses before the confirmation when there is
none. This also covers the MCP transfer tools, which dispatch without a key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
…registration

The fixture wired the wallet backend before registering its wallet, which
starts a background registration next to the awaited one, and then polled
for the addresses. Registering the wallet first leaves the awaited calls as
the only registration, so the owned address is available as soon as they
return and the wait is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
Home and the Contacts tab share one ContactsState, and the hub reset it only
for identity changes it made itself. Selecting another identity on a screen
opened from the hub (Add contact, then Cancel) left the previous identity's
contacts and requests on screen under the new identity, with the load slot
still claimed, so the new identity's lists never loaded and Accept paired the
new identity with the old identity's request.

ContactsState now records the identity its lists belong to. Home and the
Contacts tab bind it before reading or loading: on a change the lists are
dropped and the load re-armed. Paid-action guards are keyed by request and
survive the change, so a request both identities can see stays guarded while
its action is still running.

The Home payments test no longer depends on which frame its load goes out
in: the contact load now takes the first frame after such a change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…latform address

The shared send form reserved the identity-to-identity transfer fee for a
Platform address destination, while the task it dispatches estimates the
larger transfer-to-addresses fee, and it accepted any amount up to the full
balance. The transfer screen it replaced used the transfer-to-addresses
estimate for Max, the fee shown and an amount-plus-fee check.

Max, the fee preview and the confirmation text now read one reserve that
uses the existing transfer-to-addresses estimate for this route, and an
amount that leaves less than that fee in the identity is refused before the
confirmation, with the highest amount that works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… took

The hub replaces the tab's action with the header's when both produce one
in the same frame. A tab that returned its contact or payment-history load
on that frame had already claimed the load's one dispatch slot, so the load
never ran, and cancelling the screen the header opened returns to the hub
without refreshing it.

Home and the Contacts tab now take a `may_load` flag. The hub clears it on a
frame where the header returned an action, so the slot stays free and the
load goes out on the next frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er screen

Home asks for its payment history once per arrival and accepts only the
answer to that request. An answer that arrived while Send or Top up covered
the hub went to the covering screen, which ignores it; Cancel returns
without refreshing, so the preview stayed empty or stale until an explicit
refresh.

The app now forwards a payment history result to the hidden hub as it does
for profile results. The hub still records only the answer to its own
request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The existing tests call the key resolver directly, so they would still pass
if a transfer task stopped calling it. This one dispatches both transfer
tasks through `run_identity_task` against a mock SDK, with no usable key and
with an explicitly requested unusable one, and expects the dedicated error:
a task that got past the resolver would fail on the mock instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the list

The preview took six entries from a vector of every matching contact, built
again on each frame. `ContactsState` now offers the matches as an iterator,
which the preview bounds before reading; the Contacts tab keeps the
collected list where it needs the count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hub asks for its contacts and contact requests once per arrival, and
Home now shows them. Answers that arrived while Send or Top up covered the
hub went to the covering screen, which ignores them; Cancel returns without
refreshing, so Home's contact preview stayed empty until an explicit
refresh.

The app now forwards both results to the hidden hub, next to the payment
history. The hub keeps dropping lists loaded for an identity other than the
one it shows, which the new test covers with a result for another identity.
The payment history test shares the new helper that covers the hub with the
Send screen and cancels back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #1077, #1078 and #1079. No conflicts: docs/user-stories.md and
src/ui/identity/settings.rs merged automatically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
Home's Top up now opens the shared send form, which numbered a wallet-funded
top-up by the count of stored top-ups. A stored history can have gaps, so
with entries 0 and 2 the form chose 2 and the finished top-up replaced that
entry in the identity's stored history; every later one did the same. The
screen it replaced used the highest stored index plus one.

`QualifiedIdentity::next_top_up_index` is now the one place that chooses the
index: one past the highest stored, or the lowest free one when the highest
possible index is taken, so it can neither overflow nor reuse an entry. The
shared send form and the older top-up screen both use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The identity top-up tool numbered a top-up by the count of stored top-ups,
so a history with a gap had an entry replaced, as in the shared send form.
It now uses `QualifiedIdentity::next_top_up_index`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…decided

A hub frame merges actions from the top bar, the sidebar, the header, the
tab, the breadcrumb and a confirmation dialog, and the last non-empty one
wins. The tabs returned their data loads from rendering, claiming the load's
one dispatch slot on the spot. A load could then replace a sidebar or top
bar click made on the same frame, and a breadcrumb entry applied after the
tab could replace a load whose slot was already claimed, so it never ran.
The earlier header-only flag covered one of those sources.

Home and the Contacts tab no longer load while rendering. The hub asks the
rendered tab for its due load at the end of the frame, only when nothing
produced an action, and nothing after that point replaces an action. So a
click anywhere keeps its frame and a claimed load is always the action
returned. The load binds the lists to the selected identity first, so an
identity chosen in the breadcrumb is loaded once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on this device

The transfer key resolver took any stored key entry for a usable key. An
entry that only refers to a wallet needs that wallet on this device: without
it an earlier such key was chosen over a later key whose material is here,
and an identity with only such a key reached the confirmation, to fail when
the transfer was signed.

The resolver now asks whether the private half can be obtained. The rule is
the one username registration already uses; it moves to `QualifiedIdentity`
so both read it from one place. A locked wallet still counts, as the app asks
for its password when it signs. `can_sign_with` is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The app hands every failure to the visible screen as a message without a
task context, and Wallet Send took any of them for the failure of its own
send: it left the waiting state and showed the filled form again while the
payment was still running, so the user could confirm it a second time. Home
starts loads of its own right before Send or Top up opens, which makes such
a failure likely.

A confirmed send now goes out under a dispatch context of its own and the
screen remembers it. While it waits, only a failure carrying that context
ends the wait; other failures are still reported by the banner. The send no
longer joins a task batch, which cannot carry a context: an asset-lock
maximum lookup due in the same frame is asked for on the next one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… form runs

Home's Top up opens the shared send form, which remembered a running top-up
only on the screen. Leaving the waiting form by its breadcrumb destroyed that
record, so a reopened form offered the same identity another top-up while the
first still ran: funds would leave twice, and both could be recorded under
one index.

The form now records its top-ups in the registry Add Funds keeps outside any
screen, and refuses a top-up of an identity that has one in flight. The app
releases the entry on that top-up's own result, as it does for Add Funds, and
hands the result to the form that waits on it. Either screen holds back while
the other's top-up runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Wallet Send tests entered the waiting state through a hook that took a
hand-made context, which no dispatch ever produced. They now go through
`dispatch_send`, the path a confirmed send takes, so the screen waits on a
dispatch of its own and the tests keep holding when the screen relies on it.
The unused hook is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…acy encrypted format

Early versions kept a private key in a per-key encrypted format. This version
stores such an entry but cannot open it, with or without a password, yet the
transfer key resolver counted it as usable: an earlier such key was chosen
over a later key that can sign, and an identity with only such a key reached
the confirmation, to fail when the transfer was signed.

The shared rule now says such a key cannot be obtained. A key in the vault and
a key also held in a readable way stay eligible. Username registration keeps
reporting such a key as ready, as before: it needs a status and guidance of
its own first, and the note saying so moves to where that decision is made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lklimek and others added 11 commits October 13, 2026 12:30
… for the fee

A transfer to another identity pays its fee on top, from the same balance.
The form checked the amount against the balance alone, so an amount above
what Max offers reached the confirmation and failed afterwards. It is now
refused like a transfer to a Platform address or a withdrawal, naming the
highest amount that works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… can obtain

The withdrawal key resolver took any stored key entry for a usable key, as
the transfer resolver once did. A key that only refers to a wallet this
device does not hold, or that is kept only in the legacy encrypted format,
was chosen over a key that can sign, and the withdrawal failed when it was
signed. The resolver now applies the rule transfers use.

The send form asks the same resolver before it opens the confirmation, so a
withdrawal no key here can sign is refused there instead of after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at sent it

A top-up sent from the send form keeps running when the form is closed or
covered by another screen. Its success was then reported nowhere, and a
covered form went on showing "Sending..." for a result that had already come.

The app now tells the top-up registry whether the screen that sent the top-up
is in view when it ends; a success nobody watched is confirmed by the banner
Add Funds uses for a top-up continued in the background. The form checks the
registry as Add Funds does and, once its top-up is no longer in flight, comes
back empty, since the top-up may have succeeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wallet Send took a result for the outcome of its send by its kind alone. A
result of the same kind from another task, such as a credit transfer started
elsewhere, marked the waiting send as complete and cleared its progress
banner while the payment was still running.

While the screen waits on a send it dispatched, a result under another
context may still refresh what the form offers, but it no longer completes
the send or ends its progress banner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Confirming a send raises "Sending transaction..." with a running clock and
no automatic dismissal, and only the form held its handle. Closing the form
while the send ran left that banner up until the user dismissed it, whatever
the send's outcome.

The form now clears its progress banner when it is destroyed, which covers
every way the app removes a screen. A top-up still in flight is handed to the
background banner Add Funds uses, so it stays followed and its guard against
a second top-up stays in place.

Tests confirm a send the way the confirmation dialog does, so they see the
banner the dialog raises.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Receive works out the value it shows and copies on every frame, but drew its
QR code once. An identity that gained a username while the dialog was open
was then offered by name while the code still encoded the identity ID.

The code is kept with the value it encodes and is drawn again when that
value changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Home showed "Finish setting up your identity" for a moment on every visit
and then hid it. The checklist decides what is left from the profile and
the contact list, which load in the background; until they landed, an
unread profile counted as "no display name" and an unloaded list as "no
contacts", so an identity with both looked unfinished.

The checklist now waits until both are read. The contacts state records
whether its list has been loaded, and Home keeps the profile as unknown
until the profile cache has it. Once both are known it shows exactly as
before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
One display widget encodes a value, caches the texture keyed by that value
and shows an i18n-ready fallback sentence when encoding fails. Replaces the
hand-rolled encode/load_texture/cache code in seven screens and removes the
per-frame re-encode and re-upload in the deposit, asset-lock and DashPay
screens. generate_qr_code_image moves into the widget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
Drops the bespoke ReceiveQr state; the widget re-encodes when the shared
value changes (e.g. a username arrives while the dialog is open).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: dashpay/dash-evo-tool/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: be64d2d4-ffb1-4963-b7d3-f02cc5905306
📥 Commits

Reviewing files that changed from the base of the PR and between 09b81c4 and 542bd0b.

📒 Files selected for processing: 2
  • src/ui/identity/home.rs
  • tests/kittest/identity_home.rs
 ________________________________________________
< PENDU: Prompt Engineered Nifty Debugging Unit. >
 ------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: dashpay/dash-evo-tool/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e9cdacaa-6f82-4f33-bc48-0651b2359c13
📥 Commits

Reviewing files that changed from the base of the PR and between 9ced5e4 and 09b81c4.

📒 Files selected for processing: 17
  • src/ui/components/README.md
  • src/ui/components/mod.rs
  • src/ui/components/qr_code_image.rs
  • src/ui/dashpay/qr_code_generator.rs
  • src/ui/identity/add_new_identity_screen/by_receive_deposit.rs
  • src/ui/identity/add_new_identity_screen/mod.rs
  • src/ui/identity/funding_common.rs
  • src/ui/identity/home.rs
  • src/ui/identity/top_up_identity_screen/by_receive_deposit.rs
  • src/ui/identity/top_up_identity_screen/mod.rs
  • src/ui/identity/usernames_card.rs
  • src/ui/state/identity_home.rs
  • src/ui/wallets/add_new_wallet_screen.rs
  • src/ui/wallets/create_asset_lock_screen.rs
  • src/ui/wallets/wallets_screen/dialogs.rs
  • src/ui/wallets/wallets_screen/mod.rs
  • tests/kittest/identity_home.rs
💤 Files with no reviewable changes: 1
  • src/ui/wallets/wallets_screen/mod.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The pull request adds a reusable QrCodeImage widget with value-based texture caching and fallback text. Identity, DashPay, and wallet screens replace their local QR generation and texture handling with the widget.

Changes: QR image display

Layer / File(s) Summary
Add the reusable QR image widget
src/ui/components/qr_code_image.rs, src/ui/components/mod.rs, src/ui/components/README.md
Adds configurable fixed or natural sizing, texture options, fallback text, QR encoding, and value-based texture caching. Tests cover texture reuse, rebuilding, failure caching, recovery, and fallback rendering.
Use the widget in identity and DashPay screens
src/ui/dashpay/qr_code_generator.rs, src/ui/identity/..., src/ui/state/identity_home.rs, tests/kittest/identity_home.rs
Identity and DashPay screens store and display QrCodeImage instances. The shared QR-generation helper and the Home-specific ReceiveQr type are removed. The username QR window uses fallback text instead of the former global error banner.
Use the widget in wallet screens
src/ui/wallets/...
Wallet receive and asset-lock screens display QR codes through QrCodeImage. Receive dialog state replaces separate cached texture and address fields with the widget.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Refactor

Suggested reviewers: lklimek

Merge Risk: ⚪ Minimal · up to 09b81

The QR widget migration has no identified issue requiring a fix before merge. Normal checks remain appropriate.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 42.42% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 15 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: routing all QR-code rendering through one shared UI widget.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 42.42% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 15 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · 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.

@thepastaclaw

thepastaclaw commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 09b81c4) · triage: normal · Phase 2 only (no Phase 1 for this repository)

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 2 only (no Phase 1 for this repository)

Verified the supplied reviewers’ clean assessments against the exact head and the stacked PR’s merge-base diff; no actionable in-scope defects were found. The shared widget preserves existing QR payloads, sizes, and filtering, caches successful and failed encodes by value, and retains the Home Receive value-change regression test. Validation was static only; the supplied CI snapshot shows Test Suite, Clippy, Platform pin guard, and policy/reconcile still queued.

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: normal by gpt-6.1-sol (effort low) — This is a cross-cutting UI refactor affecting QR rendering, caching, fallback error handling, and multiple screens, but it does not change a critical surface such as funds movement, cryptography, or storage.
  • Phase 1 reviewers: not run (disabled for this repository)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer

lklimek and others added 3 commits October 14, 2026 12:08
… send

Send opened from an identity's Home searched recipients among the selected
wallet's identities only. With no wallet on the device the list was empty,
and with one, identities imported without it could not be found by name, so
the other identity could not be picked as the identity transfer screen
allowed.

An identity-bound send now searches every identity stored on this device
for the current network, without the sender. A send from a wallet keeps to
that wallet's identities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
The Home header and the Home content each resolved the selected identity,
and every resolution reads and decodes the whole local roster and hydrates
its top-up history. The hub now resolves it once per frame and passes it to
both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
…tity-send-form-followups

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 2 only (no Phase 1 for this repository)

Independently reviewed the complete diff at head 09b81c4 and verified the supplied Phase-2 assessments; no actionable in-scope defects were found. The shared widget preserves existing QR payloads, sizes, and filtering, caches successful and failed encodings by value, and provides actionable fallback messages without exposing technical errors. Validation was static only; Test Suite, Platform pin guard, and Clippy were queued in the supplied CI snapshot, so their results remain unverified.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(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); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This cross-cutting UI refactor introduces shared QR texture caching and changes fallback behavior across multiple screens, but does not change funds movement, cryptography, key handling, or another critical surface.
  • Phase 1 reviewers: not run (disabled for this repository)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

lklimek and others added 2 commits October 14, 2026 12:52
The Contacts and Profile tabs each resolved the selected identity again on
every frame, on top of the lookup the hub already made for the shared
header, so each repaint decoded the whole roster and hydrated its top-ups
twice. The hub now passes the identity it resolved to both tabs. Profile
keeps reconciling its editor against it as before; the Contacts load, which
runs only when due, still looks the identity up itself.

A test-only, per-thread roster read counter (feature "testing") lets a hub
test check that Contacts and Profile read the roster as often per frame as
Home.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
…tity-send-form-followups

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
@lklimek
lklimek added this pull request to stack #1092 October 14, 2026 12:58
lklimek and others added 3 commits October 14, 2026 14:04
…-followups

The squash carries #1074's final head, which this branch already contains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
Base automatically changed from fix/identity-send-form-followups to v1.0-dev October 14, 2026 14:06
…nent-1082

The squash carries #1082's final head, which this branch already contains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
@lklimek
lklimek merged commit 4870e5d into v1.0-dev Oct 14, 2026
6 of 7 checks passed
@lklimek
lklimek deleted the refactor/qr-code-component branch October 14, 2026 14:14
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.

3 participants