-
Notifications
You must be signed in to change notification settings - Fork 63
Feature/macos permissions integration #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add OpenAI Agents SDK dependencies (@openai/agents, @openai/agents-realtime) - Create new /realtime-agent-v2 route for parallel implementation - Implement MainV2.vue using SDK's RealtimeAgent and RealtimeSession - Migrate all 6 coaching tools to SDK's tool() format with Zod schemas - Update audio pipeline to use SDK's session.sendAudio() method - Add TypeScript declarations for SDK types - Maintain dual-agent architecture (salesperson + customer coach) - Use gpt-4o-mini models for cost optimization
- Extract 14 components from monolithic Main.vue (1558 lines) - Implement 3 Pinia stores for state management: - realtimeAgent: Business logic and conversation state - settings: UI preferences and toggles - openai: SDK agent management - Create modular component structure: - Navigation: TitleBar, CoachSelector, ConnectionStatus, etc. - Content: LiveTranscription, CustomerIntelligence, KeyInsights, etc. - Actions: CommitmentsList, PostCallActions - Modals: CustomerInfoModal - Integrate OpenAI Agents SDK while preserving exact UI - Maintain all 6 coaching function tools with SDK implementation - Preserve original 3-column grid layout and styling - Fix Tailwind CSS v4 @apply directive issues - Fix Zod nullable fields for OpenAI Realtime API compatibility - Update API endpoints to match existing routes
- Create comprehensive mock data service with realistic sales conversation - Add TypeScript interfaces for mock data structures - Implement mock mode toggle in navigation bar - Update store with mock data loading and simulation capabilities - Fix transcript styling: remove horizontal scroll, subtle borders - Include customer insights, coaching tips, and performance metrics - Enable easy UI testing without API calls
- Fix double scrollbar issue by using h-screen overflow-hidden pattern - Fix dropdown functionality with proper event handling - Fix template fetching to handle wrapped API response structure - Swap Discussion Topics and Post-Call Actions positions - Set column 3 component heights: Contextual 50%, Commitments 30%, Topics 20% - Fix overlay mode transparency by properly using useOverlayMode composable - Fix Customer Intelligence progress bar visibility in overlay mode - Fix Discussion Topics pill height to be fixed instead of stretching
- Fix hidden cards in single column view by adding minimum heights - Key Insights: min-h-[200px], Post-Call Actions: min-h-[150px] - Contextual Info: min-h-[250px], Commitments: min-h-[150px], Topics: min-h-[120px] - Update all card backgrounds to bg-gray-50/dark:bg-gray-900 for consistency - Simplify responsive layout to use only lg breakpoint for better mobile experience
- Adjust VAD settings for coach session: threshold 0.3, silence 100ms, padding 200ms - Add aggressive real-time analysis instructions to coach prompt - Fix duplicate transcript handlers - use input_audio_transcription.completed events - Add function call event handlers for coach analytics - Update conversation context on each customer message - Fix dropdown z-index with Teleport solution - Remove screen recording blocked indicator - Add debug logging for function calls
The architecture documentation has been moved to a more appropriate location or is no longer needed.
- TitleBar.vue: Add ESLint comment for false positive on props usage - MainV2.vue: Remove unused imports (RealtimeSessionOptions, ref) and unused variables (currentAudioData, calculateAudioLevel) - openai.ts: Remove unused RealtimeAgentConfiguration import - openai-agents.d.ts: Replace Function type with proper function signatures All linting issues resolved - npm run lint now passes successfully
- Remove screen darkening effect from protection mode - Update card backgrounds to white for better contrast in light theme - Remove shadows from transcription message bubbles - Update system messages to professional gray theme - Fix WebSocket connection errors by correcting parameter names - Implement smart transcript grouping to combine messages from same speaker - Fix tool configuration format for coach session - Add 5-second time window for message grouping These changes improve the visual appearance and functionality of the realtime agent interface.
- Update AppSidebar logo link to /realtime-agent-v2 - Update Conversations page link to /realtime-agent-v2 - Update Onboarding page link to /realtime-agent-v2 All navigation now points to the new V2 implementation instead of the legacy version.
- Replace Swift-based system audio capture with electron-audio-loopback - Add microphone permission handling for macOS - Fix screen recording permission loop issue - Add NSScreenCaptureUsageDescription to Info.plist - Create Audio Test page for testing mic and system audio - Add navigation links between Audio Test, Agent V1, and Agent V2 - Update MainV2 to use electron-audio-loopback for system audio - Add microphone entitlement com.apple.security.device.audio-input - Create API endpoints for checking and requesting media permissions - Add comprehensive troubleshooting documentation
- Remove V2 badge from MainV2.vue - Remove Audio Test and Agent V2 links from navigation - Remove Agent V1 link for cleaner navigation - Remove Mock Mode button from UI - Add console commands for mock mode (window.clueless.enableMockMode/disableMockMode) - Improve connection status display with better visual representation - Show 'Connected' in green, 'Connecting...' in yellow with animation - Use 'Not Connected' instead of 'disconnected' - Add color-coded text and smooth transitions - Simplify developer tools to essential commands only
- Remove debug console.log statements throughout the component - Keep only critical error messages and error handling logs - Remove audio capture status checks and session configuration logs - Remove transcription completion logs and transport event logs - Remove permission status logs and audio sending debug logs - Clean up mock mode console messages - Remove developer commands listing on startup - Maintain clean console output for production use
- Fix missing closing brace in onaudioprocess callback - Remove unnecessary nested try-catch block for audio loopback - Ensure all async/await code is properly contained within async functions - Build now completes successfully
- Remove unused closeMobileMenu function from MobileMenu.vue - Remove unused parameters from catch blocks in MainV2.vue - Remove unused event parameters from event handlers - Use parameterless catch blocks where error object is not needed - All ESLint checks now pass
- Remove 19 debug logs from useScreenProtection.ts - Remove 50+ debug logs from RealtimeAgent/Main.vue - Remove 6 debug logs from AudioTest/Index.vue - Remove 10 debug logs from audioCapture.ts - Remove 4 debug logs from electronPermissions.ts - Remove 1 debug log from MainV2.vue - Fix ESLint errors from orphaned console.log arguments - Keep legitimate error handling console.error statements
- Replace window.audioLoopback with Native.ipcRendererInvoke - Use dynamic IPC channel names: enable-loopback-audio, disable-loopback-audio - Consistent with new NativePHP extension system
- Fixed electron-audio-loopback integration in NativePHP extension - Removed duplicate IPC handler registration that was causing conflicts - Updated MainV2.vue to use Native.ipcRendererInvoke for audio loopback - Added comprehensive logging for debugging audio capture flow - Added nativephp-electron to .gitignore for local development setup The key fix was allowing the electron-audio-loopback package to register its own IPC handlers without interference from manual implementations.
- Add node-mac-permissions dependency to NativePHP package - Create permissions.js module with IPC handlers for camera, microphone, screen, and folder permissions - Fix native module bundling issue by externalizing node-mac-permissions in vite config - Update API calls to use correct node-mac-permissions methods (getAuthStatus, askForMicrophoneAccess, etc.) - Add contextBridge API exposure in preload script for secure renderer access - Enable contextIsolation and integrate permission buttons in TitleBar.vue - Remove redundant macPermissions.ts utility file - Clean up .DS_Store files and build artifacts
…anch - Switch from local path to GitHub repository - Use feature/macos-permissions-enhanced branch with permissions support - Update composer.lock with latest dependencies
- Fixed 'permissions is not defined' error in MainV2.vue by declaring variable outside try block - Added defensive checks for permissions object properties - Updated composer.json to use local NativePHP package via symlink - Cleaned up console logs and debug statements - Added proper error handling for permission checks
…on compatibility - Update composer.json to use local nativephp-electron package - Modify useScreenProtection composable to use new IPC-based approach - Add support for window.macPermissions.screenProtection API - Maintain fallback to window.remote for backward compatibility - Fix 'N/A' display issue when context isolation is enabled
- Implement overlay mode IPC handlers in permissions.js - Update preload script to expose overlay mode methods via contextBridge - Refactor useOverlayMode composable to use IPC as primary method - Fix settings store initialization in Main.vue - Maintain backward compatibility with window.remote fallback - Enable transparency and window opacity controls via secure IPC
- Remove console.log statements for permission checks when successful - Hide mic/screen permission buttons in TitleBar when permissions are granted - Remove success messages for permissions and dual audio capture - Update call started message to be more concise - Only show logs and UI elements when there's a problem - Update composer.json to use GitHub repository for nativephp/electron
Claude finished @vijaythecoder's task —— View job Code Review - macOS Permissions IntegrationI've completed a comprehensive review of this large PR adding macOS permissions integration. Here are my findings: 🔍 Overall AssessmentThis is a substantial feature addition implementing macOS-specific permissions for microphone and screen capture, along with a new RealtimeAgent architecture. The implementation shows good architectural thinking but has several areas for improvement. ✅ StrengthsArchitecture & Design
Features
|
- Remove customer info modal - calls now start immediately - Change 'Call History' to 'Dashboard' in navigation - Fix all ESLint errors in nativephp-extension.js - Fix PHP code style issues with Laravel Pint - Remove local nativephp-electron folder (now using GitHub package) - All tests passing successfully
Claude finished @vijaythecoder's task —— View job PR Code Review - macOS Permissions IntegrationReview Checklist:
🎯 Final Verdict: MAJOR CHANGES REQUIREDThis PR implements valuable macOS permissions functionality but has critical issues that must be addressed before merging. 🚨 Blocking Issues1. Security Vulnerabilities
2. Performance Problems
3. Zero Test Coverage
📋 Required ActionsHigh Priority (Blocking)
Medium Priority
Low Priority
💡 Recommendations
🏗️ Positive Aspects
Bottom Line: The core functionality is well-designed, but implementation quality needs significant improvement. Focus on security, testing, and performance before considering this production-ready. |
…form CI - Moved node-mac-permissions from dependencies to optionalDependencies - Updated GitHub Actions workflows to use npm ci --omit=optional - Fixes EBADPLATFORM error on Linux CI runners - Package still installs on macOS but is skipped on other platforms
Claude finished @vijaythecoder's task —— View job PR Code Review - macOS Permissions IntegrationReview Checklist:
🎯 Final Verdict: MAJOR CHANGES REQUIREDThis PR implements valuable macOS permissions functionality but has critical issues that must be addressed before merging. 🚨 Blocking Issues1. Security Vulnerabilities
2. Performance Problems
3. Zero Test Coverage
📋 Required ActionsHigh Priority (Blocking)
Medium Priority
Low Priority
💡 Recommendations
🏗️ Positive Aspects
Bottom Line: The core functionality is well-designed, but implementation quality needs significant improvement. Focus on security, testing, and performance before considering this production-ready. |
- Remove CheckOnboarding middleware and its test - Delete standalone Onboarding.vue page component - Add new OnboardingModal.vue component for inline onboarding - Update MainV2.vue to integrate onboarding modal - Remove onboarding route from web.php - Simplify bootstrap/app.php by removing onboarding middleware This change improves UX by keeping users in context during onboarding rather than redirecting to a separate page.
Claude finished @vijaythecoder's task —— View job PR Code Review - macOS Permissions IntegrationReview Checklist:
🎯 Final Verdict: MAJOR CHANGES REQUIREDThis PR implements valuable macOS permissions functionality but has critical issues that must be addressed before merging. 🚨 Blocking Issues1. Security Vulnerabilities
2. Performance Problems
3. Zero Test Coverage
📋 Required ActionsHigh Priority (Blocking)
Medium Priority
Low Priority
💡 Recommendations
🏗️ Positive Aspects
Bottom Line: The core functionality is well-designed, but implementation quality needs significant improvement. Focus on security, testing, and performance before considering this production-ready. |
- Add public/hot to cleanup_exclude_files to prevent Vite dev mode in production - Add npm install step before npm run build in prebuild commands - Create build-prepare.sh script for clean production builds - Add comprehensive build fix documentation This ensures frontend assets are properly built and included when distributing the NativePHP application, fixing "Vite not found" errors on fresh installations.
Claude finished @vijaythecoder's task —— View job Code Review - macOS Permissions IntegrationReview Checklist:
🎯 Final Verdict: MAJOR CHANGES REQUIREDThis PR implements valuable macOS permissions functionality but has critical issues that must be addressed before merging. 🚨 Blocking Issues1. Security Vulnerabilities
2. Performance Problems
3. Zero Test Coverage
📋 Required ActionsHigh Priority (Blocking)
Medium Priority
Low Priority
💡 Recommendations
🏗️ Positive Aspects
Bottom Line: The core functionality is well-designed, but implementation quality needs significant improvement. Focus on security, testing, and performance before considering this production-ready. |
Claude finished @vijaythecoder's task —— View job Code Review - macOS Permissions IntegrationReview Checklist:
🎯 Final Verdict: MAJOR CHANGES REQUIREDThis PR implements valuable macOS permissions functionality but has critical issues that must be addressed before merging. 🚨 Blocking Issues1. Security Vulnerabilities
2. Performance Problems
3. Zero Test Coverage
📋 Required ActionsHigh Priority (Blocking)
Medium Priority
Low Priority
💡 Recommendations
🏗️ Positive Aspects
Bottom Line: The core functionality is well-designed, but implementation quality needs significant improvement. Focus on security, testing, and performance before considering this production-ready. |
Pull Request
Description
Please provide a brief description of the changes in this PR. Include the motivation for these changes and any relevant context.
Type of Change
Please check the type of change your PR introduces:
Testing Performed
Please describe the tests you've run to verify your changes. Provide instructions so reviewers can reproduce.
composer test
)npm run build
)php artisan pint
andnpm run format
)Test Configuration
Manual Testing Steps
Checklist
Please review the following items before submitting your PR:
Code Quality
any
types unless absolutely necessary)Database Changes (if applicable)
database.sqlite
andnativephp.sqlite
)Frontend Changes (if applicable)
Testing
Related Issues
Please link any related issues here using the format
Fixes #issue_number
orRelates to #issue_number
Screenshots (if applicable)
If your changes include UI updates, please add screenshots showing:
Before
After
Dark Mode (if UI changes)
Additional Notes
Add any additional notes, concerns, or discussion points for reviewers.
Reviewer Checklist
For reviewers to complete: