feat: Epic 13 (Structured Questions) + Epic 14 (Native STT) - #8
feat: Epic 13 (Structured Questions) + Epic 14 (Native STT)#8don-petry wants to merge 254 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR scaffolds the TalkTerm Electron (Forge + Vite) application and establishes the initial shared domain/port types, renderer UI components (setup + overlay/display primitives), speech adapters, and CI/tooling configuration.
Changes:
- Add project build/test/tooling configuration (Vite configs, TS strict config, ESLint/Prettier/Husky, Vitest + coverage, Tailwind/PostCSS, GitHub Actions).
- Introduce shared domain + port types (sessions, writeback, IPC envelopes/channels, agent events/errors, value objects).
- Implement initial renderer components/hooks and main-process stubs/utilities with accompanying unit tests.
Reviewed changes
Copilot reviewed 147 out of 162 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Adds Vitest configuration with coverage thresholds. |
| vite.renderer.config.ts | Configures PostCSS pipeline for the renderer build. |
| vite.preload.config.ts | Adds preload Vite config placeholder. |
| vite.main.config.ts | Adds main-process Vite resolution settings. |
| tsconfig.json | Enables strict TypeScript options and path mapping. |
| test/setup-renderer.ts | Adds Testing Library jest-dom matchers for Vitest. |
| tailwind.config.ts | Defines design tokens (colors/type/spacing) for Tailwind. |
| src/shared/types/ports/text-to-speech.ts | Defines TextToSpeech port contract. |
| src/shared/types/ports/speech-to-text.ts | Defines SpeechToText port contract. |
| src/shared/types/ports/agent-backend.ts | Defines AgentBackend port + session config. |
| src/shared/types/ports/.gitkeep | Keeps ports directory in VCS. |
| src/shared/types/domain/writeback.ts | Adds writeback target types + default selection by origin. |
| src/shared/types/domain/writeback.test.ts | Tests default writeback selection. |
| src/shared/types/domain/value-objects.ts | Adds branded value objects + constructors. |
| src/shared/types/domain/value-objects.test.ts | Tests value-object validation. |
| src/shared/types/domain/user-profile.ts | Adds UserProfile type + factory. |
| src/shared/types/domain/user-profile.test.ts | Tests UserProfile factory behavior. |
| src/shared/types/domain/session.ts | Adds Session type + factory. |
| src/shared/types/domain/session.test.ts | Tests Session factory behavior. |
| src/shared/types/domain/project.test.ts | Sanity tests for TS strictness flags. |
| src/shared/types/domain/preference.ts | Adds preference threshold utilities/constants. |
| src/shared/types/domain/preference.test.ts | Tests preference threshold logic. |
| src/shared/types/domain/launch-state.ts | Adds setup-step routing helper. |
| src/shared/types/domain/launch-state.test.ts | Tests setup-step routing priority. |
| src/shared/types/domain/ipc-message.ts | Adds IPC message envelope + factory. |
| src/shared/types/domain/ipc-message.test.ts | Tests IPC message factory timestamping. |
| src/shared/types/domain/ipc-channels.ts | Defines canonical IPC channel constants + type. |
| src/shared/types/domain/ipc-channels.test.ts | Tests channel naming + uniqueness. |
| src/shared/types/domain/electron-api.ts | Declares preload bridge contract type for renderer. |
| src/shared/types/domain/avatar-persona.ts | Adds MVP persona roster. |
| src/shared/types/domain/avatar-persona.test.ts | Tests persona roster shape/uniqueness. |
| src/shared/types/domain/audit-entry.ts | Adds AuditEntry type + factory. |
| src/shared/types/domain/audit-entry.test.ts | Tests AuditEntry factory behavior. |
| src/shared/types/domain/api-key-state.ts | Defines API key state + validation result types. |
| src/shared/types/domain/agent-event.ts | Adds AgentEvent union for streaming events. |
| src/shared/types/domain/agent-error.ts | Adds error classification + user-friendly messaging. |
| src/shared/types/domain/agent-error.test.ts | Tests error classification and message safety. |
| src/shared/types/domain/.gitkeep | Keeps domain directory in VCS. |
| src/renderer/types/web-speech.d.ts | Adds Web Speech API window typings. |
| src/renderer/types/.gitkeep | Keeps renderer types directory in VCS. |
| src/renderer/styles/global.css | Adds Tailwind directives + global font/body styles. |
| src/renderer/speech/web-speech-tts.ts | Implements TTS adapter using Web Speech API. |
| src/renderer/speech/web-speech-tts.test.ts | Tests WebSpeechTts behavior under jsdom mocks. |
| src/renderer/speech/web-speech-stt.ts | Implements STT adapter using Web Speech API. |
| src/renderer/speech/web-speech-stt.test.ts | Tests WebSpeechStt behavior under jsdom mocks. |
| src/renderer/speech/barge-in-controller.ts | Adds barge-in state controller (TTS stop + STT start). |
| src/renderer/speech/barge-in-controller.test.ts | Tests barge-in state transitions and calls. |
| src/renderer/speech/.gitkeep | Keeps speech directory in VCS. |
| src/renderer/renderer.tsx | Adds React entrypoint mounting App. |
| src/renderer/hooks/useLayoutState.ts | Adds reducer-driven layout mode hook. |
| src/renderer/hooks/useLayoutState.test.ts | Tests layout mode transitions. |
| src/renderer/hooks/useDisplayMode.ts | Adds display-mode selection state hook. |
| src/renderer/hooks/useDisplayMode.test.ts | Tests display-mode state updates. |
| src/renderer/hooks/useAvatarState.ts | Adds avatar animation-state reducer hook. |
| src/renderer/hooks/useAvatarState.test.ts | Tests avatar state transitions. |
| src/renderer/hooks/.gitkeep | Keeps hooks directory in VCS. |
| src/renderer/context/.gitkeep | Keeps context directory in VCS. |
| src/renderer/components/setup/WorkspaceSelection.tsx | Adds workspace selection UI. |
| src/renderer/components/setup/WorkspaceSelection.test.tsx | Tests workspace selection callbacks. |
| src/renderer/components/setup/ProfileSetup.tsx | Adds profile setup UI. |
| src/renderer/components/setup/ProfileSetup.test.tsx | Tests profile setup interactions. |
| src/renderer/components/setup/AvatarSelection.tsx | Adds avatar selection UI using MVP personas. |
| src/renderer/components/setup/AvatarSelection.test.tsx | Tests avatar selection callback. |
| src/renderer/components/setup/ApiKeySetup.tsx | Adds API key entry/validation UI (stub validation). |
| src/renderer/components/setup/ApiKeySetup.test.tsx | Tests API key setup basic rendering. |
| src/renderer/components/setup/AdminBlockScreen.tsx | Adds blocking admin-privileges screen UI. |
| src/renderer/components/setup/AdminBlockScreen.test.tsx | Tests admin block screen rendering and buttons. |
| src/renderer/components/overlay/ActionPanel.tsx | Adds action panel container (listbox) UI. |
| src/renderer/components/overlay/ActionPanel.test.tsx | Tests action panel rendering and selection. |
| src/renderer/components/overlay/ActionCard.tsx | Adds action card UI with option semantics. |
| src/renderer/components/overlay/ActionCard.test.tsx | Tests action card semantics and interactions. |
| src/renderer/components/display/TaskProgress.tsx | Adds task progress display mode. |
| src/renderer/components/display/TaskProgress.test.tsx | Tests task progress rendering. |
| src/renderer/components/display/DocumentView.tsx | Adds basic document display mode. |
| src/renderer/components/display/DocumentView.test.tsx | Tests document rendering/path display. |
| src/renderer/components/display/ComparisonTable.tsx | Adds comparison table display mode. |
| src/renderer/components/display/ComparisonTable.test.tsx | Tests comparison table expand behavior. |
| src/renderer/components/display/ClusteredCards.tsx | Adds clustered cards display mode. |
| src/renderer/components/display/ClusteredCards.test.tsx | Tests clustered cards expand/priority tags. |
| src/renderer/components/display/ActivityFeed.tsx | Adds activity feed display mode. |
| src/renderer/components/display/ActivityFeed.test.tsx | Tests activity feed visibility/rendering. |
| src/renderer/components/avatar/TextInput.tsx | Adds text input w/ Enter-to-send and mic button. |
| src/renderer/components/avatar/TextInput.test.tsx | Tests text input send/newline/mic behavior. |
| src/renderer/components/avatar/StatusIndicator.tsx | Adds avatar status pill. |
| src/renderer/components/avatar/StatusIndicator.test.tsx | Tests status pill rendering and role=status. |
| src/renderer/components/avatar/CaptionBar.tsx | Adds caption bar w/ delayed hide logic. |
| src/renderer/components/avatar/CaptionBar.test.tsx | Tests caption bar basic rendering conditions. |
| src/renderer/components/.gitkeep | Keeps components directory in VCS. |
| src/renderer/App.tsx | Adds minimal App shell. |
| src/preload/preload.ts | Adds preload bridge stub via contextBridge. |
| src/main/storage/.gitkeep | Keeps storage directory in VCS. |
| src/main/security/admin-check.ts | Adds admin privilege check helper + instructions. |
| src/main/security/admin-check.test.ts | Tests admin privilege check across platforms. |
| src/main/security/.gitkeep | Keeps security directory in VCS. |
| src/main/main.ts | Adds Electron main window creation and lifecycle wiring. |
| src/main/ipc/.gitkeep | Keeps IPC directory in VCS. |
| src/main/agent/fake-agent-backend.ts | Adds FakeAgentBackend test double. |
| src/main/agent/fake-agent-backend.test.ts | Tests FakeAgentBackend event streaming/cancel. |
| src/main/agent/agent-message-router.ts | Adds router forwarding backend events to handler. |
| src/main/agent/agent-message-router.test.ts | Tests router event forwarding and cancel. |
| src/main/agent/.gitkeep | Keeps agent directory in VCS. |
| postcss.config.js | Adds PostCSS config for Tailwind/autoprefixer. |
| package.json | Adds dependencies, scripts, lint-staged config. |
| index.html | Adds renderer entry HTML. |
| forge.config.ts | Configures Electron Forge + Vite plugin + makers. |
| eslint.config.mjs | Adds ESLint flat config with strict TS + React rules. |
| .prettierrc | Adds Prettier config. |
| .prettierignore | Adds Prettier ignore rules. |
| .husky/pre-commit | Adds pre-commit quality gate commands. |
| .gitignore | Adds repo ignore rules (build artifacts/coverage). |
| .github/workflows/release.yml | Adds release workflow for tag builds. |
| .github/workflows/ci.yml | Adds CI workflow with 3-OS matrix quality gates. |
| _bmad-output/implementation-artifacts/*.md | Adds planning/implementation artifacts for stories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Auto-rebase failed — merge conflict — this branch has conflicts with Please resolve the conflicts and push: |
|
@claude Please address all open review comments on this PR from CodeRabbit and Copilot. |
|
Claude finished @don-petry's task in 5m 30s —— View job Addressing Open Review CommentsFinding: All 7 Copilot review items were already addressed in prior commits (the PR has 36 commits made after the review was posted). One gap remained: Tasks
What was committed (
Cannot address (GitHub App permissions restrict
|
dddc998 to
11dd524
Compare
Pull request was converted to draft
|
@dev-lead - please fix this PR |
…igh/low vulnerabilities Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add SuggestionChips component test to improve new code coverage - Simplify forge.config.ts by removing problematic afterCopy hook and rebuildConfig that caused packaging errors - All 633 unit tests pass with 93.32% statement coverage The E2E build still encounters a "done is not a function" error in electron-forge core's package.js (line 76) that appears to be an incompatibility issue. This may require updating electron-forge or investigating the Node.js/Electron version compatibility separately. The E2E job is marked with continue-on-error: true and does not block PR merge. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add IpcSpeechStt (renderer-side STT) unit tests covering lifecycle, audio result handling, error handling, and IPC subscription management — 9 new tests achieving 100% coverage - Add SpeechIPCHandler (main-process IPC bridge) unit tests covering handler registration, audio data processing, error handling, and WebContents availability — 11 new tests achieving full coverage These tests improve test coverage for audio/STT infrastructure, bringing speech module test count to 20 tests with 100% statement coverage. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add optional `confidence` field to `SpeechToTextResult` so tests that assert on speech recognition confidence values compile correctly, and cast the `IpcMain.on` mock to its correct return type to satisfy strict TypeScript checking. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fixed speech-ipc-handler test: properly typed mock objects for Electron IpcMain, replaced `any` types with specific interfaces, suppressed unavoidable Vitest mock type incompatibilities with @ts-expect-error - Fixed ipc-speech-stt test: removed unsafe `any` types, added proper TypeScript interfaces for mock objects, used vi.isMockFunction() for type-safe checks - All 653 tests pass, zero ESLint warnings, full TypeScript compliance Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add @types/node to devDependencies: fixes TS2591 errors on Node.js globals (process, Buffer, require, etc.) that were blocking typecheck - Add --no-sandbox flag to all Electron.launch() calls in E2E tests: allows tests to run in containerized CI environments where SUID sandbox is unavailable (fixes the "SUID sandbox helper binary was found, but is not configured correctly" error) These changes enable: 1. Full TypeScript type checking to pass (was failing on 50+ errors) 2. E2E tests to launch Electron in CI without sandbox errors Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2578cfd to
24e69c4
Compare
Dev-Lead — rebase (applied)Rebase completed and pushed. |
CI Failure: SonarCloud Code AnalysisStep: Quality Gate evaluation The SonarCloud Quality Gate failed on 3 conditions for new code: coverage is 44.9% (needs ≥80%), duplication is 4.5% (needs ≤3%), and Reliability Rating is C (needs ≥A). The Reliability hit traces to a flagged bug-level issue — Suggested fix: Add a real assertion to the empty test in |
Add test case for SafeStorageKeyManager.retrieveKey() error path when decryption fails. This improves new code coverage by testing the error handling branch that returns null when decryption throws an exception. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Dev-Lead — fix-bot-comment (applied)Changes committed and pushed. |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
CI Failure: SonarCloud Code AnalysisStep: Quality Gate SonarCloud's Quality Gate failed on three conditions: New Code coverage is 44.9% (required ≥ 80%), duplication is 4.5% (required ≤ 3%), and the Reliability Rating on New Code is C (required ≥ A). This PR adds ~37k lines (Question Card Stack UI + sherpa-onnx native STT pipeline) without enough accompanying unit tests, and static analysis flagged bug-prone patterns that dragged the reliability score down. Suggested fix: Add unit tests for the under-covered new modules ( |
|
CI Failure: SonarCloud Code AnalysisStep: SonarCloud Quality Gate evaluation The SonarCloud Quality Gate failed on the new code introduced by this PR, tripping three conditions: coverage is 44.9% (required ≥80%), duplicated lines are 4.5% (required ≤3%), and the Reliability Rating is C (required ≥A, meaning static analysis flagged likely bugs). This is a static-analysis quality gate, not a build or test-runner failure — the pipeline itself ran fine, but the new code does not meet the project's code-quality thresholds. Suggested fix: Add unit tests for the newly added/changed code paths to raise New Code coverage to ≥80%, which is the largest gap; then review the SonarCloud reliability issues list to fix the flagged bug-prone patterns and de-duplicate the repeated code blocks. |
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
|
Auto-rebase failed — merge conflict — this branch has conflicts with dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |




Summary
Commits (stacked)
docs:Spec updates — PRD v2.4 (FR57-FR62), UX spec v1.3 (Journey 7), Epics (Epic 13 stories), Sprint statusfeat:Epic 13 implementation — question-parser.ts, QuestionCardStack, QuestionReview, SuggestionChips, E2E testsfeat:Epic 14 implementation — sherpa-onnx-node adapter, IPC audio pipeline, mic permission handlersNew Files
src/shared/types/domain/question-parser.tssrc/renderer/components/session/QuestionCardStack.tsxsrc/renderer/components/session/QuestionReview.tsxsrc/renderer/components/session/SuggestionChips.tsxsrc/main/speech/sherpa-onnx-stt.tssrc/main/ipc/speech-ipc-handler.tssrc/renderer/speech/ipc-speech-stt.tsTest plan
🤖 Generated with Claude Code