Skip to content

fix(frontend): reconcile pending questions by directory and improve TTS fallback#204

Merged
chriswritescode-dev merged 3 commits intomainfrom
fix/pending-action-navigation
Apr 28, 2026
Merged

fix(frontend): reconcile pending questions by directory and improve TTS fallback#204
chriswritescode-dev merged 3 commits intomainfrom
fix/pending-action-navigation

Conversation

@chriswritescode-dev
Copy link
Copy Markdown
Owner

Summary

  • Replace per-session question replacement with directory-scoped reconciliation that groups questions by session and removes stale entries
  • Auto-dismiss questions from local state after reply/reject succeeds
  • Extract TTS text extraction into reusable helpers and fall back to previous assistant message when the latest one has no text content (e.g. errored tool calls)

Changes

  • frontend/src/contexts/EventContext.tsx - Directory-scoped question reconciliation, auto-dismiss after reply/reject
  • frontend/src/contexts/EventContext.test.tsx - Tests for reconciliation, stale cleanup, dismiss, and reply
  • frontend/src/hooks/useAutoPlayLastResponse.ts - Extract getAssistantText and getLatestPlayableAssistantMessage
  • frontend/src/hooks/__tests__/useAutoPlayLastResponse.test.tsx - Tests for new utility functions
  • frontend/src/pages/SessionDetail.tsx - Use extracted helpers for TTS button with fallback

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation

Checklist

  • Code follows project style (no comments, named imports)
  • TypeScript types are properly defined
  • Tests added/updated (80% coverage target)
  • pnpm lint passes locally
  • pnpm test passes locally (612/612)

Chris Scott and others added 3 commits April 27, 2026 23:18
Refetch the active session and messages when the SSE stream reconnects so missed updates appear without navigating away.
Track pending action session directories so header notifications can open the correct session even when React Query has not cached that session yet.
…TS fallback

Replace per-session question replacement with directory-scoped reconciliation
that groups questions by session and removes stale entries. Auto-dismiss
questions after reply/reject succeeds. Extract TTS text extraction into
reusable helpers and fall back to previous assistant message when the
latest one has no text content.
@chriswritescode-dev chriswritescode-dev merged commit 62c8a41 into main Apr 28, 2026
3 checks passed
@chriswritescode-dev chriswritescode-dev deleted the fix/pending-action-navigation branch April 28, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant