Skip to content

feat(flutter): hire flow UI with escrow summary and error recovery (demo signing) - #92

Merged
TOMOKI977 merged 6 commits into
mainfrom
fix/flutter-hire-escrow-flow
Oct 6, 2026
Merged

TOMOKI977 merged 6 commits into
mainfrom
fix/flutter-hire-escrow-flow

Conversation

@moises-cisneros

@moises-cisneros moises-cisneros commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Refs #91. UI-only demo of the hire flow; the real payment goes through the server relay (#96, #97).

Summary

  • Hire sheet shows the price, destination and escrow contract, signs a mock payload with the wallet, and recovers from signing errors with a retry.
  • Signing is a demo: it creates no hire and sends no payment. The final state reads "Demo signature only", with no tx hash and no explorer link, so the UI never claims a payment that did not happen (review feedback).
  • The escrow address shown can be overridden with --dart-define=PULS3_ESCROW_CONTRACT=<C...>.
  • StellarExpert URL helpers are kept for the real flow.

Not in this PR

Verification

cd puls3_flutter
flutter analyze --fatal-infos  -> No issues found
flutter test                   -> 75 passed

@moises-cisneros moises-cisneros added area: frontend Flutter implementation type: feat New functionality labels Oct 4, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Deploying puls3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 03575d8
Status: ✅  Deploy successful!
Preview URL: https://383a60c8.puls3-4lw.pages.dev
Branch Preview URL: https://fix-flutter-hire-escrow-flow.puls3-4lw.pages.dev

View logs

@TOMOKI977 TOMOKI977 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Las piezas visuales están bien (badge de escrow, textos de custodia, links al explorer y tests de la vista). Pido cambios porque el flujo comunica algo que todavía no ocurre:

  • HireSheet (hire_sheet.dart:44-52) firma el string mock-usdc-payment:… y luego muestra "Payment confirmed" con un link a StellarExpert hacia una transacción que no existe. Nunca llama a createHire ni a confirmPayment, así que la UI confirma un pago sin hire en el servidor ni fondos en el escrow.
  • El retry solo vuelve a firmar. No hay manejo para HireLedgerUnavailable, transaction_not_found ni para un pago enviado pero no confirmado.
  • La dirección del escrow está hardcodeada en stellar_explorer.dart:5. Debería venir de configuración o del servidor.

Propuesta: o se conecta al flujo real del servidor (createHire, firma de create_job y fund, confirmación), o se deja explícitamente como demo de UI. En ese caso habría que cambiar el título y ocultar el estado "confirmed" y el link al explorer mientras el pago sea mock. Hoy el título "hire flow with escrow protection" promete más de lo que hace.

@moises-cisneros
moises-cisneros force-pushed the fix/flutter-hire-escrow-flow branch from 0963df4 to 8c82116 Compare October 6, 2026 15:10
@moises-cisneros moises-cisneros changed the title feat(flutter): hire flow with escrow protection, explorer links, and error recovery feat(flutter): hire flow UI with escrow summary and error recovery (demo signing) Oct 6, 2026
@moises-cisneros
moises-cisneros changed the base branch from fix/flutter-onchain-catalog to main October 6, 2026 15:10
@moises-cisneros
moises-cisneros force-pushed the fix/flutter-hire-escrow-flow branch from 8c82116 to d98bd0e Compare October 6, 2026 15:15
@moises-cisneros
moises-cisneros force-pushed the fix/flutter-hire-escrow-flow branch from d98bd0e to 48da7b0 Compare October 6, 2026 15:22

@TOMOKI977 TOMOKI977 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved as a UI demo. The previous concern is resolved: the sheet no longer claims a payment, has no tx hash or explorer link, and tests assert both are absent. What gets signed (mock-usdc-payment:...) can't decode as XDR, so nothing real can be signed.

Non-blocking follow-ups, ideally before the real relay flow lands:

  • Copy. The error state still says "Payment failed" / "Payment could not be completed" (hire_payment_view.dart:145,155), and the summary shows a "Network fee < 0.00001 XLM" for a transaction that doesn't exist. Something like "Signature failed" and dropping the fee row would keep the demo honest.
  • Spec. openspec/specs/flutter-hire-escrow-flow/spec.md has a banner saying the explorer requirements are superseded, but the normative MUST text is still there (tx hash, onOpenExplorer, "funds are locked in Escrow", a "Retry" button while the UI says "Try again"), and no requirement describes the actual demo state. The archived verify-report.md also marks the explorer link COMPLIANT citing a test that no longer exists.
  • Config. PULS3_ESCROW_CONTRACT isn't validated, so an empty or malformed define renders as the escrow address. A C... / 56-char check with fallback to the default, plus a test, would cover it.
  • Unused helpers. stellarExpertTxUrl and stellarExpertContractUrl have no caller in lib/. Fine to keep for the real flow, but a short note pointing to #96/#97 would help.
  • Real wallet readiness. _confirm awaits connect() / signTransaction() with no timeout, and the button is disabled while signing, so a hanging adapter would leave the sheet stuck. Raw e.toString() is also shown to the user. Harmless with MockWallet, worth handling when Freighter is wired.
  • HirePhase.confirmed now means "demo signed"; renaming it would avoid confusion when the real confirmed state arrives.

@TOMOKI977
TOMOKI977 merged commit 6b0e14d into main Oct 6, 2026
8 checks passed
@TOMOKI977

Copy link
Copy Markdown
Contributor

@moises-cisneros merged into main as 6b0e14d (squash). I updated the branch from main first and CI passed again. #91 stays open for the real flow (createHire, create_job/fund signing and confirmation through the relay in #96). The review notes above can go in a follow-up, ideally before the real wallet adapter is wired.

Pericena added a commit that referenced this pull request Oct 7, 2026
…in merge

#92 builds AppScope directly; #27 made deployGateway required.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pericena added a commit that referenced this pull request Oct 7, 2026
Brings the stacked work into the deploy flow branch:
- Mobile-first app shell: bottom navigation, compact type, 44 px
  buttons and denser inputs, marketplace search/sort/carousel, Activity
  and wallet-first Profile.
- Studio publishing requirements and policies (ADR-0004 manifest rules).
- Agent ratings and reviews on the agent detail page.

Conflicts with #92 (hire flow, already in main) resolved in favour of
#92's escrow summary and demo-signing honesty. On top of it: wallet
failures in plain language ("No funds moved"), a scrollable safe-area
sheet on phones, and no overflow in its title rows and address badge.
Rating stays locked after a demo signature, since #92 creates no hire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Pericena Pericena mentioned this pull request Oct 7, 2026
4 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: frontend Flutter implementation type: feat New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants