VoiceAssist Docs

Conversations

Managing history, exports, and controls

stabledocs2025-11-27frontend
userguide

VoiceAssist User Guide

Version: 1.0 Last Updated: 2025-11-21


Welcome to VoiceAssist

VoiceAssist is an AI-powered medical assistant that helps healthcare professionals with voice-based queries, document management, and medical knowledge retrieval.


Table of Contents

  1. Getting Started
  2. User Interface
  3. Voice Interactions
  4. Document Management
  5. Medical Queries
  6. Calendar & Scheduling
  7. Settings & Preferences
  8. Security & Privacy
  9. Troubleshooting
  10. FAQs

Getting Started

Creating Your Account

  1. Navigate to the VoiceAssist login page
  2. Click "Register" or "Create Account"
  3. Enter your email address and create a secure password
  4. Verify your email address (check your inbox)
  5. Complete your profile setup

First Login

  1. Enter your email and password
  2. You'll be redirected to the dashboard
  3. Complete the welcome tutorial (recommended)
  4. Configure your preferences

Dashboard Overview

The dashboard shows:

  • Recent queries and conversations
  • Quick access to voice assistant
  • Document upload area
  • Calendar and appointments
  • Recent notifications

User Interface

┌─────────────────────────────────────┐
│  [Logo] VoiceAssist     [Profile ▼] │
├─────────────────────────────────────┤
│  Dashboard  |  Voice  |  Documents  │
│  Calendar   |  Search |  Settings   │
├─────────────────────────────────────┤
│                                     │
│         Main Content Area           │
│                                     │
│                                     │
└─────────────────────────────────────┘

Quick Access Bar

  • Voice Button: Start voice interaction (microphone icon)
  • Search: Quick search across all content
  • Notifications: View recent alerts and updates
  • Help: Access contextual help and documentation

Voice Interactions

Starting a Voice Session

  1. Click the microphone icon or press Ctrl+Shift+V
  2. Allow microphone access (first time only)
  3. Speak your query clearly
  4. Wait for transcription and response

Voice Commands

Medical Queries:

"What are the symptoms of diabetes?"
"Tell me about hypertension treatment"
"What's the dosage for amoxicillin in children?"

Document Requests:

"Find my patient records for John Doe"
"Show recent lab results"
"Open the treatment protocol for pneumonia"

Scheduling:

"Schedule an appointment for next Tuesday at 2 PM"
"What's on my calendar today?"
"Cancel my 3 PM meeting"

Voice Tips

Do:

  • Speak clearly and at a normal pace
  • Use medical terminology when appropriate
  • Provide context for ambiguous queries
  • Confirm important actions verbally

Don't:

  • Speak too quickly or mumble
  • Use background noise environments
  • Mix multiple queries in one sentence
  • Share sensitive information in public spaces

Clarifications

If VoiceAssist needs clarification:

  1. It will ask a specific question
  2. Respond with the requested information
  3. The system will continue processing

Example:

You: "Find patient records"
VoiceAssist: "Which patient are you looking for?"
You: "John Smith, born 1985"
VoiceAssist: "Found 2 patients matching that name. Which one:
              1. John Smith - DOB 03/15/1985
              2. John Smith - DOB 11/22/1985?"
You: "The first one"

Document Management

Uploading Documents

  1. Go to Documents section
  2. Click "Upload" or drag and drop files
  3. Select file type (medical record, lab result, image, etc.)
  4. Add description and tags (optional)
  5. Click "Upload"

Supported Formats:

  • PDF (.pdf)
  • Images (.jpg, .png, .tiff)
  • Documents (.docx, .doc)
  • Spreadsheets (.xlsx, .xls)
  • Text files (.txt, .rtf)

Organizing Documents

Folders:

  • Create custom folders
  • Move documents between folders
  • Share folders with colleagues (if permissions allow)

Tags:

  • Add multiple tags per document
  • Search by tags
  • Auto-tagging based on content

Search:

- By filename: "lab_results_2024"
- By content: "glucose levels"
- By date: "uploaded:last-week"
- By type: "type:lab-result"
- Combined: "patient:smith type:xray date:2024"

Document Processing

VoiceAssist automatically:

  • Extracts text from PDFs and images (OCR)
  • Indexes content for search
  • Generates summaries for long documents
  • Identifies key medical terms
  • Suggests related documents

Medical Queries

Knowledge Base

VoiceAssist has access to:

  • Medical textbooks and guidelines
  • Clinical practice guidelines
  • Drug databases
  • Research papers
  • Your uploaded documents

Query Types

1. Information Lookup

"What is the ICD-10 code for pneumonia?"
"Explain the pathophysiology of diabetes"

2. Treatment Recommendations

"What's the first-line treatment for strep throat?"
"Recommend antibiotics for UTI in adults"

3. Differential Diagnosis

"Patient presents with fever and cough, what could it be?"
"Differential diagnosis for chest pain"

4. Drug Information

"Side effects of metformin"
"Drug interactions with warfarin"
"Dosage for ibuprofen in a 10-year-old"

Response Format

Responses include:

  • Answer: Direct response to your query
  • Sources: References and citations
  • Confidence: AI confidence level
  • Related: Related topics and queries

Saving Queries

  • Bookmark important queries
  • Add to favorites
  • Export query history
  • Share with colleagues (redacted)

Calendar & Scheduling

Viewing Calendar

  • Day View: Hourly breakdown
  • Week View: 7-day overview
  • Month View: Monthly calendar
  • Agenda View: List of upcoming events

Creating Appointments

  1. Click a time slot or "New Appointment"
  2. Enter appointment details:
    • Patient name
    • Appointment type
    • Duration
    • Location
    • Notes
  3. Set reminders (optional)
  4. Click "Save"

Reminders

  • Email notifications
  • SMS reminders (if configured)
  • In-app notifications
  • Voice reminders

Calendar Integration

Syncs with:

  • Google Calendar
  • Outlook Calendar
  • Apple Calendar
  • Nextcloud Calendar

Settings & Preferences

Profile Settings

  • Update name and email
  • Change password
  • Set timezone
  • Configure language preferences

Voice Settings

  • Preferred voice assistant personality
  • Speech recognition sensitivity
  • Auto-transcription settings
  • Voice feedback options

Privacy Settings

  • Data sharing preferences
  • Cookie consent
  • Analytics opt-in/out
  • Data export options

Notification Settings

  • Email notifications
  • Push notifications
  • SMS alerts
  • Notification frequency

Security & Privacy

Data Security

VoiceAssist uses:

  • Encryption: AES-256 for data at rest, TLS 1.3 for data in transit
  • Authentication: Multi-factor authentication (MFA) available
  • Access Control: Role-based access control (RBAC)
  • Audit Logging: All actions are logged

HIPAA Compliance

VoiceAssist is HIPAA-compliant:

  • Business Associate Agreement (BAA) available
  • PHI data is encrypted and protected
  • Access logs maintained for 7 years
  • Regular security audits

Your Privacy Rights

You can:

  • Export all your data
  • Delete your account and data
  • Request data corrections
  • Opt-out of analytics
  • Review access logs

Best Practices

  1. Strong Passwords:

    • At least 12 characters
    • Mix of upper/lowercase, numbers, symbols
    • Unique to VoiceAssist
  2. Enable MFA:

    • Use authenticator app or hardware key
    • Backup codes securely stored
  3. Regular Reviews:

    • Review access logs monthly
    • Check authorized devices
    • Update security questions
  4. Secure Access:

    • Use VPN on public networks
    • Lock screen when away
    • Log out on shared devices

Troubleshooting

Voice Not Working

Problem: Microphone not detected Solution:

  1. Check browser permissions (Settings → Privacy → Microphone)
  2. Allow VoiceAssist to access microphone
  3. Test microphone with system settings
  4. Try a different browser

Problem: Poor transcription quality Solution:

  1. Speak more clearly and slowly
  2. Reduce background noise
  3. Check microphone positioning
  4. Use a headset microphone

Login Issues

Problem: Forgot password Solution:

  1. Click "Forgot Password" on login page
  2. Enter your email address
  3. Check email for reset link
  4. Create new password

Problem: Account locked Solution:

  1. Wait 15 minutes (automatic unlock)
  2. Or contact administrator
  3. Enable MFA to prevent future lockouts

Document Upload Failing

Problem: File too large Solution:

  • Maximum file size: 50 MB
  • Compress PDF or image files
  • Split large documents

Problem: Unsupported format Solution:

  • Convert to supported format (PDF, DOCX, JPG, PNG)
  • Use online converters
  • Contact support for special formats

FAQs

General

Q: Is VoiceAssist free? A: Pricing depends on your organization's plan. Contact your administrator.

Q: Can I use VoiceAssist on mobile? A: Yes, VoiceAssist is mobile-responsive. Native apps coming soon.

Q: How accurate is the AI? A: Medical responses are based on peer-reviewed sources. Always verify critical information.

Q: Is my data backed up? A: Yes, daily automated backups with 30-day retention.

Voice

Q: What languages are supported? A: Currently English. Additional languages in development.

Q: Can I use voice in noisy environments? A: Noise-canceling headsets recommended for best results.

Privacy

Q: Who can see my data? A: Only you and authorized users (based on permissions). Admins can view audit logs but not content.

Q: Is my voice recorded? A: Voice is transcribed in real-time and not stored permanently (unless you save transcripts).

Q: Can I delete my data? A: Yes, go to Settings → Privacy → Delete My Data


Support

Help Desk: support@voiceassist.example.com Documentation: https://docs.voiceassist.example.com Community Forum: https://forum.voiceassist.example.com Phone Support: 1-800-VOICE-AI

Hours: Monday-Friday: 8 AM - 6 PM EST Emergency Support: 24/7


Version: 1.0 Last Updated: 2025-11-21 Phase 13: Final Testing & Documentation Complete


Message Editing & Regeneration - Implementation Progress

Date: 2025-11-23 Status: Phases 1-2 Complete, Phase 3-5 Pending Next Session: Wire up components and complete testing


✅ Completed (This Session)

Phase 1: Enhanced MessageBubble Component

File: apps/web-app/src/components/chat/MessageBubble.tsx

Changes:

  • ✅ Added editing state management (isEditing, editedContent, isSaving)
  • ✅ Integrated MessageActionMenu component with action callbacks
  • ✅ Implemented inline edit UI with textarea
  • ✅ Save/cancel handlers with async error handling
  • ✅ Keyboard shortcuts: Ctrl/Cmd+Enter (save), Escape (cancel)
  • ✅ Updated MessageBubbleProps interface:
    • onEditSave?: (messageId: string, newContent: string) => Promise<void>
    • onRegenerate?: (messageId: string) => Promise<void>
    • onDelete?: (messageId: string) => Promise<void>
  • ✅ Added group class for hover-based action menu visibility

Phase 2: Updated useChatSession Hook

File: apps/web-app/src/hooks/useChatSession.ts

Changes:

  • ✅ Imported useAuth hook to access apiClient
  • ✅ Added editingMessageId state tracking
  • ✅ Implemented editMessage(messageId, newContent):
    • Calls apiClient.editMessage
    • Updates local message state
    • Clears editing state on success
  • ✅ Implemented regenerateMessage(messageId):
    • Finds assistant message and previous user message
    • Removes old assistant response
    • Re-sends user message via WebSocket
  • ✅ Implemented deleteMessage(messageId):
    • Confirms with user before deletion
    • Calls apiClient.deleteMessage
    • Updates local state
  • ✅ Updated UseChatSessionReturn interface with new functions
  • ✅ All functions properly memoized with useCallback

Additional Fixes

  • ✅ Fixed lint errors in useConversations.ts (removed unused index parameters)
  • ✅ Updated Vitest config to inline ESM modules

📋 Remaining Work

Phase 3: Wire Up Components ⏳

Files to Modify:

  • apps/web-app/src/pages/ChatPage.tsx
  • apps/web-app/src/components/chat/MessageList.tsx

Tasks:

  1. Update ChatPage to destructure new functions from useChatSession:

    const { messages, connectionStatus, isTyping, editingMessageId, sendMessage, editMessage, // NEW regenerateMessage, // NEW deleteMessage, // NEW reconnect, } = useChatSession({ conversationId: activeConversationId || "", onError: handleError, initialMessages, });
  2. Pass functions to MessageList as props

  3. Update MessageList to forward props to MessageBubble:

    <MessageBubble message={message} isStreaming={isStreaming && index === messages.length - 1} onEditSave={onEditSave} onRegenerate={onRegenerate} onDelete={onDelete} />

Phase 4: Comprehensive Tests ⏳

Files to Create:

4.1 MessageActionMenu Tests

File: apps/web-app/src/components/chat/__tests__/MessageActionMenu.test.tsx

Test Cases (6 minimum):

  1. Renders menu button
  2. Shows edit option for user messages only
  3. Shows regenerate option for assistant messages only
  4. Does not render for system messages
  5. Calls onEdit when edit is clicked
  6. Closes menu after action

4.2 useChatSession Editing Tests

File: apps/web-app/src/hooks/__tests__/useChatSession-editing.test.ts

Test Cases (4 minimum):

  1. Should edit a message successfully
  2. Should delete a message successfully
  3. Should regenerate assistant message
  4. Should handle edit errors gracefully

4.3 MessageBubble Editing Tests

File: apps/web-app/src/components/chat/__tests__/MessageBubble-editing.test.tsx

Test Cases (6 minimum):

  1. Shows edit button on hover for user messages
  2. Enters edit mode when edit is clicked
  3. Saves edited message when save is clicked
  4. Cancels edit when cancel is clicked
  5. Saves on Ctrl+Enter keyboard shortcut
  6. Cancels on Escape keyboard shortcut

Phase 5: Polish & Accessibility ⏳

Tasks:

  1. Add loading states during save operations
  2. Add error toast notifications (integrate with toast system)
  3. Test keyboard navigation through action menu
  4. Test with screen reader (NVDA/JAWS)
  5. Verify ARIA attributes are correct
  6. Update component documentation with examples
  7. Update FRONTEND_PHASE1_PHASE2_SUMMARY.md

⚠️ Known Issues

Test Environment - ESM Import Issues

Issue: 4 test suites failing with ESM import errors for react-syntax-highlighter Error: require() of ES Module ... refractor@5.0.0 ... not supported

Affected Tests:

  • src/__tests__/AppSmoke.test.tsx
  • src/__tests__/integration/ChatFlow.test.tsx
  • src/components/chat/__tests__/MessageBubble.test.tsx
  • src/components/chat/__tests__/MessageList.test.tsx

Additional Failures: 4 tests in useChatSession.test.ts (timeout/mock issues - pre-existing)

Attempted Fixes:

  1. ✅ Added ESM modules to deps.inline in vitest.config.mts
  2. ✅ Created mock file at src/__mocks__/react-syntax-highlighter.ts
  3. ✅ Added alias in vitest.config.mts resolve section
  4. ❌ Tests still failing (mock not being used correctly)

Root Cause: react-syntax-highlighter imports ESM-only refractor package via CommonJS, causing incompatibility in Vitest's test environment.

Impact:

  • Production: ✅ NO IMPACT - Code works fine in browser
  • Development: ⚠️ 4 test suites cannot run (118/122 passing tests unaffected)
  • Phase 1-2: ✅ Implementations complete and committed (8cf91f0)

Recommendation: Proceed with Phase 3 (component wiring) since this is a pre-existing test infrastructure issue unrelated to the message editing feature. The failing tests are smoke tests and integration tests that will need to be fixed separately as part of test infrastructure maintenance.

Future Fix Options:

  1. Replace react-syntax-highlighter with a different syntax highlighting library
  2. Lazy-load syntax highlighter only when needed (code blocks present)
  3. Configure Vitest to use Vite's SSR mode for better ESM support
  4. Wait for react-syntax-highlighter to release CommonJS-compatible version

📝 Implementation Notes

API Integration

  • Edit/delete operations call REST API via apiClient
  • Regenerate operation uses existing WebSocket streaming
  • All operations update local state optimistically after server response

State Management

  • Editing state managed in MessageBubble component (local)
  • Message updates flow through useChatSession hook
  • WebSocket connection maintained throughout editing

User Experience

  • Inline editing with textarea (no modal)
  • Keyboard shortcuts for power users
  • Confirmation dialog for destructive actions (delete)
  • Save button disabled during async operations
  • Original content restored on cancel

🚀 Next Session Plan

  1. Fix Test Environment (30 min)

    • Investigate and resolve ESM import issues
    • Ensure all existing tests pass
    • Run pnpm test to verify baseline
  2. Phase 3: Wire Up Components (60 min)

    • Update ChatPage.tsx
    • Update MessageList.tsx
    • Manual testing in browser
  3. Phase 4: Write Tests (90 min)

    • MessageActionMenu tests (6 tests)
    • useChatSession editing tests (4 tests)
    • MessageBubble editing tests (6 tests)
    • Run full suite and fix failures
  4. Phase 5: Polish (45 min)

    • Loading states and error handling
    • Accessibility audit
    • Documentation updates
  5. Final Verification (30 min)

    • make test (backend)
    • pnpm lint (should pass with warnings only)
    • pnpm test (all tests green)
    • Manual E2E testing
  6. Commit & Push (15 min)

    • Clear commit message
    • Update CHANGELOG if applicable
    • Push to origin/main

Estimated Total: 4-5 hours


📚 Reference Documents

  • Full specification: docs/REMAINING_MESSAGE_EDIT_WORK.md
  • Feature specs: docs/client-implementation/WEB_APP_FEATURE_SPECS.md
  • Phase summary: docs/client-implementation/FRONTEND_PHASE1_PHASE2_SUMMARY.md

Last Updated: 2025-11-23 Next Update: After Phase 3 completion