Files
hope-voice-api/ios/.artifacts/20260831-105824-plan-code-ui-audit/iterations/02-request.md
T
2026-10-04 07:23:49 -04:00

2.9 KiB

Iteration 02 Request

  • Task: 20260831-105824-plan-code-ui-audit
  • Requested by: build after implementation inspection
  • Owner: coder
  • Status: changes-requested

Required Corrections

  1. ConversationView.textModeBinding has a no-op setter, so the visible conversation toggle can no longer change mode. Remove the single-slot SettingsStore.onTextModeChange callback approach. Prefer normal $settings.textMode/a setter that persists, plus .onChange(of: settings.textMode) in ConversationView so changes from either the conversation or Settings apply to the current session after session replacement.
  2. Transcript UI dedupe remains incorrect. Add a regression test for primary final followed by identical data final asserting both events.count == 1 and history count 1, then fix it. When a data final arrives for a role with an open partial, the documented rule is to replace the appropriate open partial rather than mark a differing partial final and append a second row. Update the differing-partial test to expect one final row containing the final text.
  3. Remove/fix the appliedDesired gate. It breaks the required late-audio reconciliation: a state can be desired=playing while audio_url=nil; when the same track later gains audio_url, the source is wired but play is never retried because desired did not change. Preserve idempotence without preventing desired=playing && source available && player paused from invoking play.
  4. Strengthen MediaReconcileTests: the current desired-state test only checks that the initial value belongs to a hardcoded list after polling an unreachable server, so it cannot catch the original bug. Expose the smallest reasonable internal seam (or another deterministic approach) and assert reconciling explicit paused/playing/stopped states updates desired. Add coverage or a clearly reasoned code-level assertion for the late-audio path.
  5. Make join-mode synchronization independent from voice/model sync failures. A failed set_voice or invalid persisted model must not prevent set_mode from being sent. Use separate best-effort operations or route join through applyTextMode; avoid duplicate mode sends.
  6. In media reporting, capture trackID before spawning asynchronous report/publish tasks so stop() does not clear the track before the report reads it. Set local desired coherently on explicit stop/pause/play actions or document why polling latency is intentional. Ensure the correction does not duplicate reports excessively.
  7. Re-run all tests and simulator build. Keep the first-round POST fix and other valid changes.

Deliverables

  • Write iterations/02-implementation.md with actual model, exact diffs, tests/tools/results, and residual risks.
  • Update implementation.md summary to reflect the correction round without erasing prior history.
  • Do not claim independent approval; reviewer service is currently unavailable.