NWC: the pay and buyer-invoice readouts are zero-size, so no accessibility tree carries them
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 75/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- accessibility, testing
Direzione di ricerca
Leggi lib/shared/widgets/nwc_payment_widget.dart e lib/shared/widgets/nwc_invoice_widget.dart, quindi confronta la visualizzazione manuale della fattura descritta nell’issue. Aggiungi test dei widget che ispezionino l’albero semantico e verifichino che ciascuna visualizzazione abbia un rettangolo non vuoto e l’etichetta bolt11 prevista; mantieni il comportamento in caso di invio non riuscito. Il lavoro è completato quando entrambe le visualizzazioni NWC compaiono nell’albero di accessibilità e i test passano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
With an NWC wallet connected, the pay screen (/pay_invoice/:orderId) shows NwcPaymentWidget instead of the QR, and the add-invoice screen shows NwcInvoiceWidget. The automation contract (docs/automation-contract.md) says pay.invoice.text carries the hold invoice "which is otherwise only drawn as a QR code or paid directly by the wallet", and that invoice.nwc.text carries the buyer invoice NWC generated, "for payment correlation". A black-box harness depends on both. It must know the hold invoice's payment hash before the app pays it, so that the wallet behind the app only pays what the run reserved and the payment can be journaled and recovered.
What happens
Both widgets attach the readout to an empty SizedBox.shrink():
lib/shared/widgets/nwc_payment_widget.dart:72:const SizedBox.shrink().withAutomationId(id, label: widget.bolt11)lib/shared/widgets/nwc_invoice_widget.dart:127:const SizedBox.shrink().withAutomationId(...)
Flutter drops semantics nodes whose rect is empty, so neither node reaches the accessibility tree, on any platform. In a live Mortsom run on Linux against main at 0293bd44, Alice's pay screen exposed only pay.nwc, pay.order_id, appbar.back and env.marker. There was no pay.invoice.text, although the widget sets it.
Consequences:
- No automation can read the hold invoice while a wallet is connected. Mortsom's
nwc_happy_sell,nwc_happy_buy,nwc_wallet_survives_restartand the funding step ofnwc_invoice_fails_then_manualall stop at the same check ("the connected wallet's pay form does not exposepay.invoice.text"). invoice.nwc.textis equally invisible. The buyer-side correlation it promises never happens.- The manual screen works: there the readout sits on the QR (
automationId: AutomationIds.payInvoiceText, automationLabel: invoice, child: _qr(...)), which has a size.
How to fix
Attach each readout to a node that has a size, the way the manual screen does:
- In
NwcPaymentWidget, wrap the visible content (the amount and the pay button's column) inAutomationId(AutomationIds.payInvoiceText, merge: false, label: widget.bolt11, child: ...)and remove theSizedBox.shrink(). Usemerge: falsesopay.nwcstays its own node. - Do the same in
NwcInvoiceWidgetforinvoice.nwc.text, on the success content. Keep the current rule that the readout is absent when submitting failed. - Add a widget test for each that walks the semantics tree (
tester.getSemantics/find.bySemanticsIdentifier) and asserts the node exists, has a non-empty rect, and carries the bolt11 as its label. A test that only finds the widget would pass today.
This changes no identifier and no label value. It makes the contract true for the NWC path.
- Lingua principale
- Dart
- Stelle
- 11
- Fork
- 9
- Merge medio
- 2g 1h
- PR unite (30g)
- 16
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MostroP2P/app
-
documentation priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
area: ui bug priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Bug: Button "Share logs" does nothingForse già presa @Luquitasjeffrey l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
area: rust-core bug priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MostroP2P/app
Issue simili
-
Python example: list a model's scenes and their camerasForse già presa @rudraparmar76 l’ha presa oggi. Apertadocumentation good first issue python
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
iamahsanmehmood/openskp#796 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Plural rendering: first matching part wins, but gen-l10n lets the last one win (=1 shadows one)Apertabug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
crowdin/flutter-sdk#97 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
MrSpideyNihal/lockfeed#16 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
InlitX/GymMane#529 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno