Repository navigation
feat(flutter): load agent catalog from server with offline fallback - #90
Conversation
TOMOKI977
left a comment
There was a problem hiding this comment.
El mapeo, el timeout y el fallback cumplen lo que pide el issue, y el RatingBadge está bien testeado. Un ajuste importante antes de mergear:
FallbackAgentRepository (fallback_agent_repository.dart:19-23) cae al catálogo local ante cualquier error, sin avisar al usuario. En builds release solo queda un debugPrint, que se elimina. El problema es que ese catálogo tiene agentes mock con wallets ficticias, así que el usuario podría intentar contratar un agente que no existe on-chain.
Sugerencias:
- Marcar los datos de fallback como offline en la UI y deshabilitar la contratación para esos agentes.
- Capturar solo errores de red o timeout (no
catch (e)genérico), para que un error de parseo enfromSummaryno quede oculto. - Considerar un timeout menor a 20 s, o mostrar el estado de carga con opción de reintentar.
TOMOKI977
left a comment
There was a problem hiding this comment.
Approving. The mapping, timeout and fallback meet #89, and with the catalog contract aligned to #88 (see #99) nothing here blocks the Stellar Elite demo.
Follow-ups worth doing after the demo, from my earlier review:
FallbackAgentRepositoryfalls back to the bundled catalog on any error, with only adebugPrint(stripped in release). Those mock agents have fake wallets, so mark the fallback as offline in the UI and disable Hire for them.- Catch only network and timeout errors instead of a generic
catch (e), so a parsing bug infromSummarydoesn't hide behind the fallback.
Merge note: retarget this to main once #88 merges, so CI runs before merging.
Closes #89
Stacked on #88 (which is stacked on #86 and #84); retarget to \main\ as each one merges.
Summary
Wires the Flutter marketplace to the Serverpod \�gent.list()\ endpoint added in #88, keeping \AssetAgentRepository\ as a resilient offline fallback when the server is down or unreachable.
ating: 0.0) have their \RatingBadge\ cleanly hidden in both card and detail screens without layout shifts or exceptions.
Acceptance criteria
Verification evidence
\
cd puls3_flutter
flutter test -> 66 passed (baseline 29, +37 new tests)
flutter analyze --fatal-infos -> No issues found!
\\
Verification passed with 0 critical findings and 0 blockers (PASS WITH WARNINGS on non-blocking test composition seams).
Notes for reviewers