From b7256dbfe4ac0de8378170c0476f9f03f7008697 Mon Sep 17 00:00:00 2001 From: Pedram Amini Date: Tue, 9 Dec 2025 10:30:21 -0600 Subject: [PATCH] about modal tweaks --- .gitignore | 2 +- Auto Run Docs/Phase-01-Wizard-Foundation.md | 54 ------------------- Auto Run Docs/Phase-02-Conversation-Screen.md | 21 -------- Auto Run Docs/Phase-03-Document-Generation.md | 20 ------- Auto Run Docs/Phase-04-Phase-Review-Screen.md | 23 -------- Auto Run Docs/Phase-05-Tour-Overlay-System.md | 24 --------- .../Phase-06-First-Run-Celebration.md | 20 ------- Auto Run Docs/Phase-07-Resume-And-Polish.md | 27 ---------- .../Phase-08-Extra-Credit-Interactive-Tour.md | 19 ------- src/renderer/components/AboutModal.tsx | 42 ++++++++------- 10 files changed, 25 insertions(+), 227 deletions(-) delete mode 100644 Auto Run Docs/Phase-01-Wizard-Foundation.md delete mode 100644 Auto Run Docs/Phase-02-Conversation-Screen.md delete mode 100644 Auto Run Docs/Phase-03-Document-Generation.md delete mode 100644 Auto Run Docs/Phase-04-Phase-Review-Screen.md delete mode 100644 Auto Run Docs/Phase-05-Tour-Overlay-System.md delete mode 100644 Auto Run Docs/Phase-06-First-Run-Celebration.md delete mode 100644 Auto Run Docs/Phase-07-Resume-And-Polish.md delete mode 100644 Auto Run Docs/Phase-08-Extra-Credit-Interactive-Tour.md diff --git a/.gitignore b/.gitignore index 864d39ef..2317ad93 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Maestro -Auto\ Run\ Docs +Auto\ Run\ Docs/ # Tests coverage/ diff --git a/Auto Run Docs/Phase-01-Wizard-Foundation.md b/Auto Run Docs/Phase-01-Wizard-Foundation.md deleted file mode 100644 index 573b6363..00000000 --- a/Auto Run Docs/Phase-01-Wizard-Foundation.md +++ /dev/null @@ -1,54 +0,0 @@ -# Polymarket API Research - -## Objective -Understand Polymarket's API structure, authentication, market data formats, and trading capabilities to build an automated edge detection system. - -we have keys in /Users/pedram/Projects/Polymarket-Arbitrage/.env - ---- - -## Research Tasks - -### API Discovery -- [ ] Document base API endpoints (REST and WebSocket) -- [ ] Identify authentication mechanism (API keys, OAuth, wallet signing) -- [ ] Map rate limits and throttling policies -- [ ] Determine data freshness and update frequencies - -### Market Data Structure -- [ ] Document market object schema (id, question, outcomes, resolution criteria) -- [ ] Understand CLOB (Central Limit Order Book) data format -- [ ] Map order book depth and liquidity metrics -- [ ] Identify historical price/volume data availability - -### Trading Mechanics -- [ ] Document order types (limit, market, etc.) -- [ ] Understand fee structure and slippage -- [ ] Map position management endpoints -- [ ] Document settlement and resolution process - -### Market Categories -- [ ] List all available market categories -- [ ] Identify category-specific metadata -- [ ] Document market lifecycle (creation → trading → resolution) -- [ ] Find markets with resolution date patterns - -### Compliance & Limits -- [ ] Review Terms of Service for API usage -- [ ] Document geographic restrictions -- [ ] Identify position limits per market -- [ ] Understand KYC requirements for trading - ---- - -## Deliverables -- [ ] API documentation summary document -- [ ] TypeScript/Python type definitions for market data -- [ ] Sample API client with authentication -- [ ] Market data fetching utility - ---- - -## Notes -_Add research findings here as discovered_ - diff --git a/Auto Run Docs/Phase-02-Conversation-Screen.md b/Auto Run Docs/Phase-02-Conversation-Screen.md deleted file mode 100644 index 2a72fad8..00000000 --- a/Auto Run Docs/Phase-02-Conversation-Screen.md +++ /dev/null @@ -1,21 +0,0 @@ -# Phase 02: Conversation Screen - -Build the AI-driven conversation screen with structured output parsing, confidence meter, and project discovery flow. - -## Tasks - -- [ ] Create `services/wizardPrompts.ts` with the system prompt template that includes: agent name interpolation `{{AGENT_NAME}}`, agent path interpolation `{{AGENT_PATH}}`, instruction to only create/modify files in that directory, instruction to ask clarifying questions about project type (coding, research, analysis, etc.), instruction to keep exchanges minimal but gather enough clarity, instruction to respond in structured JSON format -- [ ] Define structured output JSON schema in `wizardPrompts.ts`: `{"confidence": number (0-100), "ready": boolean, "message": string}` -- [ ] Create response parser utility in `services/wizardPrompts.ts` that extracts confidence, ready status, and message from agent responses, with fallback handling if agent doesn't follow format -- [ ] Create `services/conversationManager.ts` to handle the back-and-forth conversation flow: sending messages to agent, appending structured output reminder to each user message, parsing responses, tracking conversation history -- [ ] Create `screens/ConversationScreen.tsx` with AI Terminal-like interface for familiarity, confidence progress bar at top showing 0-100% with smooth animations, conversation display area showing exchange history, input field at bottom for user responses, "Let's get started!" button that appears when ready=true and confidence>80 -- [ ] Style the confidence meter as a horizontal progress bar with gradient fill (red to yellow to green as confidence increases) -- [ ] Add visual indicator when agent is "thinking" (typing indicator or spinner) -- [ ] Implement the initial static question display: "What would you like to build? A coding project? Research notes? Something else entirely?" shown before first agent response arrives -- [ ] Wire up conversation to actual agent process: spawn agent with wizard system prompt, send user messages with structured output suffix, parse and display responses -- [ ] Create prompt suffix constant that reminds agent to respond in JSON format with confidence score after each user message -- [ ] Handle edge cases: agent not responding (show retry option), agent not following format (extract message best-effort, assume low confidence), agent errors (show error state with retry) -- [ ] Add keyboard support: Enter to send message, Escape to go back to previous screen (with confirmation if conversation started) -- [ ] Store conversation history in WizardContext for later use in document generation -- [ ] When ready=true and confidence>80, show transition prompt: "I think I have a good understanding of your project. Ready to create your action plan?" with "Let's Go!" button -- [ ] Ensure conversation will become the "Project Discovery" tab content after wizard completes diff --git a/Auto Run Docs/Phase-03-Document-Generation.md b/Auto Run Docs/Phase-03-Document-Generation.md deleted file mode 100644 index 26ccc7e2..00000000 --- a/Auto Run Docs/Phase-03-Document-Generation.md +++ /dev/null @@ -1,20 +0,0 @@ -# Phase 03: Document Generation - -Build the phased document generation system that creates Auto Run markdown files based on the conversation. - -## Tasks - -- [ ] Create `services/phaseGenerator.ts` with the document generation prompt template that instructs agent to: create multiple phased markdown documents, make Phase 1 achievable without user input, make Phase 1 deliver a working prototype that excites the user, use checkbox task format `- [ ] Task description`, name files as `Phase-XX-Description.md`, focus on actionable tasks not documentation -- [ ] Design the generation prompt to emphasize: Phase 1 should be completable in a single Auto Run session, each phase should build on the previous, tasks should be specific and unambiguous, avoid tasks that require user decisions mid-execution -- [ ] Implement document generation flow: send generation prompt with full conversation context, parse response to extract individual markdown documents, validate each document has proper task format -- [ ] Create `Auto Run Docs` folder in the agent's configured directory if it doesn't exist using `window.maestro.fs` or appropriate IPC -- [ ] Save generated documents to the Auto Run Docs folder with proper naming: `Phase-01-*.md`, `Phase-02-*.md`, etc. -- [ ] Add IPC handler in `src/main/index.ts` for creating directories if not already available -- [ ] Add IPC handler for writing files to arbitrary paths (within agent directory) if not already available -- [ ] Implement loading state UI during document generation with message "Creating your action plan..." -- [ ] Handle generation errors gracefully: show error message, offer retry, allow manual progression -- [ ] Store generated document paths in WizardContext for the next screen -- [ ] Parse Phase 1 document content for display in the review screen -- [ ] Validate generated documents have at least one task each -- [ ] If agent generates a single large document, intelligently split it into phases or accept as single phase -- [ ] Add generation timeout handling (generous timeout, 2+ minutes) with progress indication diff --git a/Auto Run Docs/Phase-04-Phase-Review-Screen.md b/Auto Run Docs/Phase-04-Phase-Review-Screen.md deleted file mode 100644 index 7dc8dfd9..00000000 --- a/Auto Run Docs/Phase-04-Phase-Review-Screen.md +++ /dev/null @@ -1,23 +0,0 @@ -# Phase 04: Phase Review Screen - -Build the Phase 1 document review screen with markdown editor, preview mode, and launch options. - -## Tasks - -- [ ] Create `screens/PhaseReviewScreen.tsx` that displays Phase 1 markdown document in full modal width -- [ ] Integrate the same markdown editor component used in Auto Run (`AutoRunEditor` or equivalent) for consistency and user familiarity -- [ ] Add Edit/Preview toggle buttons matching the Auto Run interface style -- [ ] Add image attachment support matching Auto Run interface (attach button, drag-drop zone) -- [ ] Implement markdown preview rendering with proper styling for task checkboxes -- [ ] Allow user to edit the Phase 1 document directly before proceeding -- [ ] Auto-save edits back to the file as user makes changes (debounced) -- [ ] Display document title prominently at top of the screen -- [ ] Show count of tasks in the document (e.g., "12 tasks ready to run") -- [ ] Create two large action buttons at bottom: "I'm Ready to Go" (primary, default focus) and "I'm Ready, But Walk Me Through the Interface" (secondary) -- [ ] Style buttons to be visually prominent and easily distinguishable -- [ ] Wire "I'm Ready to Go" button to: create session with configured agent and directory, set first tab name to "Project Discovery", populate tab with conversation history, select Phase 1 document in Auto Run, start Auto Run execution, close wizard -- [ ] Wire "Walk Me Through" button to: do everything above, then trigger tour overlay -- [ ] Add keyboard support: Tab between buttons, Enter to activate focused button, Escape to go back (with confirmation since documents are generated) -- [ ] Show loading state while session is being created and Auto Run is starting -- [ ] Handle errors during session creation or Auto Run start gracefully -- [ ] Store user's choice (tour or no tour) for analytics/future reference diff --git a/Auto Run Docs/Phase-05-Tour-Overlay-System.md b/Auto Run Docs/Phase-05-Tour-Overlay-System.md deleted file mode 100644 index 5d423fa1..00000000 --- a/Auto Run Docs/Phase-05-Tour-Overlay-System.md +++ /dev/null @@ -1,24 +0,0 @@ -# Phase 05: Tour Overlay System - -Build the spotlight tour overlay that guides users through the interface with visual walkthroughs. - -## Tasks - -- [ ] Create `tour/TourOverlay.tsx` component that renders a full-screen dark overlay with a "cutout" for the spotlighted area -- [ ] Implement spotlight cutout using CSS clip-path or SVG mask to create a transparent window in the dark overlay -- [ ] Ensure overlay covers the entire viewport with semi-transparent dark background (similar to modal backdrop) -- [ ] Create `tour/TourStep.tsx` component for individual tour step with: spotlight position/size, title text, description text, "Continue Tour" button, step indicator (e.g., "3 of 8") -- [ ] Position tour step tooltip near the spotlighted element (above, below, left, or right based on available space) -- [ ] Add arrow/pointer from tooltip to spotlighted element for visual connection -- [ ] Create `tour/tourSteps.ts` defining all tour steps with: element selector or ref to spotlight, title, description, position preference for tooltip -- [ ] Define tour step sequence: 1) Auto Run panel - explain what's running right now, 2) Auto Run document selector - show other phase documents created, 3) Files tab - show file explorer, 4) History tab - explain auto vs manual entries, 5) Left panel hamburger menu - show menu options, 6) Left panel session list - explain sessions and groups, 7) Main terminal area - explain AI Terminal vs Command Terminal, 8) Input area - explain read-only during Auto Run, 9) Header area - explain status indicators and controls, 10) Keyboard shortcuts hint - mention Cmd+Shift+? for all shortcuts -- [ ] Implement `useTour` hook to manage tour state: current step, total steps, next/previous/skip functions -- [ ] Add smooth transitions between tour steps (fade out spotlight, fade in at new position) -- [ ] Implement keyboard support: Enter or Space to advance, Escape to exit tour entirely -- [ ] Before each spotlight, programmatically switch to the correct UI state: switch to Auto Run tab before spotlighting it, switch to Files tab before spotlighting it, switch to History tab before spotlighting it, open hamburger menu before spotlighting menu items -- [ ] Disable all interactions outside the spotlight area (pointer-events: none on overlay, pointer-events: auto on spotlight... actually NO - make spotlight view-only too for simplicity) -- [ ] Actually, make the entire tour view-only: spotlight highlights areas but clicking does nothing, only "Continue Tour" button advances -- [ ] Add "Skip Tour" link in tour tooltip for users who want to exit early -- [ ] When tour completes, show brief completion message and dismiss overlay -- [ ] Set `tourCompleted: true` in settings when tour finishes or is skipped -- [ ] Ensure tour works correctly regardless of current window size (responsive spotlight positioning) diff --git a/Auto Run Docs/Phase-06-First-Run-Celebration.md b/Auto Run Docs/Phase-06-First-Run-Celebration.md deleted file mode 100644 index 55d652d7..00000000 --- a/Auto Run Docs/Phase-06-First-Run-Celebration.md +++ /dev/null @@ -1,20 +0,0 @@ -# Phase 06: First Run Celebration - -Build the celebratory experience for first Auto Run completion with confetti, achievement modal, and next steps guidance. - -## Tasks - -- [ ] Create `components/FirstRunCelebration.tsx` modal component for the first Auto Run completion celebration -- [ ] Add confetti animation library or implement simple confetti effect using CSS animations or canvas -- [ ] Design celebration modal with: confetti animation in background, "Congratulations!" header, duration of the Auto Run displayed (e.g., "Your first Auto Run completed in 4 minutes 32 seconds"), encouraging message about Auto Run capabilities ("A properly configured Auto Run can go on for hours if not days"), next steps section -- [ ] Create next steps content: "Explore the additional phase documents we created", "Each phase builds on the previous one", "Select a document in the Auto Run tab to continue building your project", link or button to Auto Run documentation -- [ ] Add "Got It!" primary button to dismiss the modal -- [ ] Implement confetti animation that triggers when modal appears and runs for 3-5 seconds -- [ ] Add `firstAutoRunCompleted` flag to settings to ensure celebration only shows once ever -- [ ] Hook celebration trigger into Auto Run completion detection: when an Auto Run completes AND `firstAutoRunCompleted` is false, show celebration modal, set `firstAutoRunCompleted` to true -- [ ] Add special "Standing Ovation" achievement variation if first Auto Run exceeds 15 minutes with extra celebratory messaging like "Your AI worked autonomously for over 15 minutes!" -- [ ] Ensure celebration modal has proper priority in LayerStack (above normal modals) -- [ ] Add keyboard support: Enter or Escape to dismiss -- [ ] Make confetti respect reduced motion preferences (disable if user prefers reduced motion) -- [ ] Style modal to feel special and celebratory while maintaining Maestro's design language -- [ ] After dismissing celebration, ensure user can easily find and select other phase documents diff --git a/Auto Run Docs/Phase-07-Resume-And-Polish.md b/Auto Run Docs/Phase-07-Resume-And-Polish.md deleted file mode 100644 index e9e96aec..00000000 --- a/Auto Run Docs/Phase-07-Resume-And-Polish.md +++ /dev/null @@ -1,27 +0,0 @@ -# Phase 07: Resume and Polish - -Implement wizard resume functionality, edge cases, and final polish for a seamless first-run experience. - -## Tasks - -- [ ] Create wizard state persistence: save wizard progress to settings or separate storage after each screen completion, store: current step, selected agent, agent name, directory path, conversation history, generated document paths -- [ ] Implement resume detection on app launch: if wizard state exists and is incomplete, show "Resume Setup?" dialog with options "Resume" and "Start Fresh" -- [ ] If user chooses "Resume", restore wizard to the appropriate screen with all previous data -- [ ] If user chooses "Start Fresh", clear wizard state and start from screen 1 -- [ ] Clear wizard state when wizard completes successfully -- [ ] Add confirmation dialog when pressing Escape mid-wizard (after screen 1): "Are you sure you want to exit the setup wizard? Your progress will be saved." -- [ ] Handle edge case: user selected directory no longer exists on resume (show error, allow re-selection) -- [ ] Handle edge case: agent no longer available on resume (show error, return to agent selection) -- [ ] Add loading states for all async operations: agent detection, directory validation, agent spawning, document generation, session creation -- [ ] Ensure all wizard screens have consistent padding, spacing, and typography -- [ ] Add subtle fade animations between all screen transitions -- [ ] Test keyboard navigation flow through entire wizard: Tab, Shift+Tab, Enter, Escape, Arrow keys -- [ ] Ensure focus management: each screen should auto-focus the primary interactive element -- [ ] Add screen reader announcements for screen changes and important state updates -- [ ] Test wizard with all themes to ensure proper styling -- [ ] Add telemetry/analytics hooks for wizard completion rate, tour completion rate, average conversation exchanges (optional, respect privacy settings) -- [ ] Create unit tests for WizardContext state management -- [ ] Create unit tests for structured output parser -- [ ] Create integration tests for full wizard flow -- [ ] Update CLAUDE.md with wizard documentation: components, flow, customization points -- [ ] Add wizard to the "What's New" or changelog if applicable diff --git a/Auto Run Docs/Phase-08-Extra-Credit-Interactive-Tour.md b/Auto Run Docs/Phase-08-Extra-Credit-Interactive-Tour.md deleted file mode 100644 index 8643dad9..00000000 --- a/Auto Run Docs/Phase-08-Extra-Credit-Interactive-Tour.md +++ /dev/null @@ -1,19 +0,0 @@ -# Phase 08: Extra Credit - Interactive Tour - -OPTIONAL: Enhance the tour with actual interactive elements where users perform actions rather than just viewing. - -## Tasks - -- [ ] Identify safe interaction points in the tour where user actions won't break the flow -- [ ] Modify TourOverlay to allow pointer events on spotlighted elements for specific interactive steps -- [ ] Create interactive tour step for hamburger menu: spotlight menu button, prompt user "Click to open the menu", wait for menu open event, advance to next step showing menu contents -- [ ] Create interactive tour step for tab switching: spotlight the tabs, prompt user "Click on Files to explore your project", wait for tab change event, advance after brief exploration time or user clicks continue -- [ ] Create interactive tour step for keyboard shortcut: prompt user "Press Cmd+T to switch between AI and Terminal mode", listen for the keypress, show success feedback, advance -- [ ] Add visual feedback for successful interactions: green checkmark, brief highlight, subtle sound (optional) -- [ ] Handle failed interactions gracefully: if user doesn't interact within 10 seconds, show "Skip this step?" option -- [ ] Add "Let me do it" vs "Show me" options for each interactive step for users who prefer passive learning -- [ ] Track which interactions the user completed vs skipped for potential onboarding improvements -- [ ] Ensure interactive tour doesn't interfere with ongoing Auto Run execution -- [ ] Add safeguards to prevent user from navigating away from current session during interactive tour -- [ ] Test interactive elements with keyboard-only navigation (not just mouse clicks) -- [ ] Consider adding practice mode where user can try multiple times before moving on diff --git a/src/renderer/components/AboutModal.tsx b/src/renderer/components/AboutModal.tsx index e3528b59..9eb78f08 100644 --- a/src/renderer/components/AboutModal.tsx +++ b/src/renderer/components/AboutModal.tsx @@ -212,11 +212,11 @@ export function AboutModal({ theme, sessions, autoRunStats, onClose }: AboutModa {/* Sessions & Messages */}
Sessions - {globalStats.totalSessions} + {formatTokens(globalStats.totalSessions)}
Messages - {globalStats.totalMessages} + {formatTokens(globalStats.totalMessages)}
{/* Tokens */} @@ -243,23 +243,29 @@ export function AboutModal({ theme, sessions, autoRunStats, onClose }: AboutModa )} - {/* Active Time (from current Maestro sessions) */} - {totalActiveTimeMs > 0 && ( -
- Active Time - {formatDuration(totalActiveTimeMs)} -
- )} - - {/* Total Cost - shows pulsing green while counting, solid green when complete */} + {/* Active Time & Total Cost - merged into single line */}
- Total Cost - - ${globalStats.totalCostUsd.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} - + {totalActiveTimeMs > 0 ? ( + <> + {formatDuration(totalActiveTimeMs)} + + ${globalStats.totalCostUsd.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} + + + ) : ( + <> + Total Cost + + ${globalStats.totalCostUsd.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} + + + )}
) : (