feat(connectivity): restyle offline and reconnect banners
Tint the mini player's reconnecting/error sub-states with the offlineAccent token (added in WU1, unused until now): the status label, the reconnect spinner, and the error retry icon now read as visually distinct "connectivity trouble" states instead of blending into the ordinary loading/paused look. Plain buffering keeps the default colour, confirmed by a dedicated regression test. Verify-first gate (task 16.1): ControladorReconexion.intentos exists, but ServicioAudio never surfaces it past a debug log line, and its estadoStream only carries the EstadoReproduccion enum. Adding an attempt-count label would require a getter/stream on servicio_audio.dart, one of the files this change must keep at an empty diff against main. Ship the restyle without the counter, per the risk register's own fallback. WU16.
This commit is contained in:
@@ -971,7 +971,7 @@ real capability living in the header, not decorative chrome).
|
||||
- [x] 15b.6 Verify — scoped suite green: 605/605 (up from 604), 2 skipped (unchanged, both pre-existing WU15
|
||||
documented skips). `flutter analyze`: 1 issue, identical to baseline. Literal-encoding scan: zero hits.
|
||||
|
||||
|
||||
## WU16 — Connectivity banner restyle (offline / reconnect)
|
||||
|
||||
**Commit**: `feat(connectivity): restyle offline and reconnect banners`
|
||||
**Depends on**: WU1
|
||||
@@ -979,16 +979,31 @@ real capability living in the header, not decorative chrome).
|
||||
**Verify**: `flutter test test/widgets/reconnect_ui_test.dart test/servicios/servicio_audio_reconnect_test.dart && flutter analyze && dart format --set-exit-if-changed $(git diff --name-only --diff-filter=ACM HEAD -- '*.dart')`
|
||||
**Modified tests**: `reconnect_ui_test.dart`. `servicio_audio_reconnect_test.dart` must pass unmodified.
|
||||
|
||||
- [ ] 16.1 Verify-first — run `servicio_audio_reconnect_test.dart` and inspect the reconnect controller: confirm
|
||||
whether it tracks an attempt count.
|
||||
- [ ] 16.2 RED — restyle test for the offline banner (visual only) and, **only if 16.1 confirms an attempt count
|
||||
exists**, a test for the "Reconectando · intento N de M" label.
|
||||
- [ ] 16.3 GREEN — restyle the offline banner to the new visual language.
|
||||
- [ ] 16.4 GREEN — **conditionally**: wire the attempt-count label only if the controller exposes one; otherwise
|
||||
ship the restyle without the counter — do not add new plumbing to invent one.
|
||||
- [ ] 16.5 REFACTOR — confirm shimmer skeletons (`TarjetaEmisoraShimmer`) are unchanged.
|
||||
- [ ] 16.6 Verify — `reconnect_ui_test.dart` updated and green; `servicio_audio_reconnect_test.dart` unmodified and
|
||||
green.
|
||||
- [x] 16.1 Verify-first — run `servicio_audio_reconnect_test.dart` and inspect the reconnect controller: confirm
|
||||
whether it tracks an attempt count. **Result: it does NOT reach the UI.** `ControladorReconexion.intentos`
|
||||
exists as a getter, but `ServicioAudio` (`lib/servicios/servicio_audio.dart`) only ever reads it inside a
|
||||
`developer.log` debug line (line 413) — its public `estadoStream` maps every playback state to the
|
||||
`EstadoReproduccion` enum (no attempt-count payload) and `_handler.reconectando` is a bare bool. Wiring a
|
||||
count to the UI would require adding a getter/stream to `servicio_audio.dart`, which is one of the four
|
||||
files this change must keep at an **empty git diff vs `main`** — structurally blocked, not just untested.
|
||||
Shipping without the counter per 16.4, exactly as the risk register anticipated.
|
||||
- [x] 16.2 RED — 3 new `testWidgets` cases added to `reconnect_ui_test.dart` (no attempt-count test, per 16.1):
|
||||
reconnecting tints the spinner + status label with `offlineAccent`; plain `cargando` keeps the default
|
||||
spinner colour (regression guard proving the tint is reconnect-specific, not blanket-loading); error tints
|
||||
the retry icon + status label with `offlineAccent`. Confirmed RED: 2 of the 3 failed (`Actual: <null>`)
|
||||
against the pre-restyle widget.
|
||||
- [x] 16.3 GREEN — `lib/widgets/mini_reproductor.dart`: the status-label `Text` and the reconnect spinner /
|
||||
error retry icon now read `context.pluriTokens.offlineAccent` (WU1's previously-unused token, whose own
|
||||
doc comment already named it for this WU) whenever the stream reports `reconectando` or `error`. Plain
|
||||
`cargando` explicitly keeps `color: null` (the theme default) — verified by 16.2's regression test.
|
||||
- [x] 16.4 GREEN — conditional step confirmed moot: no attempt-count label added, no new plumbing introduced.
|
||||
- [x] 16.5 REFACTOR — `TarjetaEmisoraShimmer` (`lib/widgets/tarjeta_emisora.dart`, consumed by
|
||||
`pantalla_buscar.dart`) is untouched by this commit — confirmed via `git diff --stat`, zero lines.
|
||||
- [x] 16.6 Verify — scoped suite green: 16/16 (5 `reconnect_ui_test.dart` + 8 `servicio_audio_reconnect_test.dart`
|
||||
[byte-identical, unmodified] + 3 `mini_reproductor_configurar_test.dart` re-run as an adjacent-file
|
||||
regression check). `flutter analyze`: 1 issue, identical to baseline. Scoped `dart format`: reformatted the
|
||||
hand-written production file once (whitespace only), stable on re-run. Literal-encoding scan: zero hits on
|
||||
the 2 touched files.
|
||||
|
||||
## WU17 — Welcome / onboarding screen
|
||||
|
||||
|
||||
Reference in New Issue
Block a user