NWC: the pay and buyer-invoice readouts are zero-size, so no accessibility tree carries them
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- accessibility, testing
調査の方向性
lib/shared/widgets/nwc_payment_widget.dart と lib/shared/widgets/nwc_invoice_widget.dart を読み、issue に記載された手動の請求書表示と比較してください。セマンティクスツリーを調べ、各表示に空でない rect と期待される bolt11 ラベルがあることを確認するウィジェットテストを追加してください。送信に失敗した場合の動作は維持してください。両方の NWC 表示がアクセシビリティツリーに現れ、テストが通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Dart
- スター
- 11
- フォーク
- 9
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MostroP2P/app のほかの issue
-
documentation priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
area: ui bug priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Bug: Button "Share logs" does nothing対応中かも @Luquitasjeffrey が 7 日前に担当しました。 オープン
難易度 2/5 半日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
area: rust-core bug priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
Python example: list a model's scenes and their cameras対応中かも @rudraparmar76 が今日担当しました。 オープンdocumentation good first issue python
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
iamahsanmehmood/openskp#796 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
Plural rendering: first matching part wins, but gen-l10n lets the last one win (=1 shadows one)オープンbug help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
crowdin/flutter-sdk#97 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
MrSpideyNihal/lockfeed#16 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
InlitX/GymMane#529 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信