Add search, generation cancellation, brainstorm mode, and test suite - #3
Open
Unconfirmed2 wants to merge 13 commits into
Open
Add search, generation cancellation, brainstorm mode, and test suite#3Unconfirmed2 wants to merge 13 commits into
Unconfirmed2 wants to merge 13 commits into
Conversation
- Fix TypeScript errors: remove incorrect 'use server' from API routes, type implicit any params - Add error boundary component wrapping the app in layout.tsx - Extract HelpDialog and HistoryDialog from monolithic page.tsx - Add retry with exponential backoff for Claude API (429/500/503/529) - Add input length validation in server actions (Zod schemas) - Add localStorage storage monitoring with warnings near 5MB limit - Add security headers (X-Content-Type-Options, X-Frame-Options, X-XSS-Protection, Referrer-Policy) - Enable TypeScript and ESLint checks during builds (was previously disabled) - Validate ANTHROPIC_API_KEY at module load time - Add .env.example for environment variable documentation - Add Jest test suite with 41 tests for utils and json-to-tree - Add GitHub Actions CI pipeline (lint, typecheck, test, build) - Clean up dead code: remove empty preview-change.ts, unused imports, persona comments https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
Add a top-level toggle (Brainstorm | Plan) that filters which view tabs are visible. Brainstorm shows List, Mind Map, Execution, Comments, Summary. Plan shows List, Kanban, Execution, Comments, Summary. Status markers, checkboxes, progress counts, and completion strikethrough are hidden in Brainstorm mode and only visible in Plan mode. https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
- Add shared formatTaskToText/formatTasksToText utilities using tabs for indentation and optional outline numbering (1. / 1.1. / 1.1.1.) - Replace duplicated formatTaskToString in tree-view with shared utility - Add numbering toggle (ListOrdered icon) and copy-all button to tree view toolbar - Add copy button and numbering toggle to mind map view toolbar - Status markers only included in copy when in Plan mode - Add 9 tests for the new formatting functions (50 total) https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
…fixes Mind map: - Replace wheel-zoom scroll with drag-to-pan (window listeners for smooth drag) - Remove overflow-auto; container is overflow-hidden so controls stay fixed - Controls (copy, layout, zoom) anchored to top-right with backdrop blur - Improved node styling: rounded-xl, subtask count badge on parent nodes - Wider gaps between children (gap-6/gap-5) for better readability - Connector lines use per-child wrappers for cleaner alignment - Copy: when viewing an activeTask, prints it as title then numbers children from 1 Tree view: - Pass numbered state to TaskNode so per-task copy respects toggle - Per-task "Copy as Text" in numbered mode: task is title, children start at 1. https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
…obile nav - Add Cmd/Ctrl+K quick search modal across all projects and tasks - Add double-click to rename tasks and projects in sidebar - Add tooltips on sidebar progress bars showing completion percentage - Add JSON import/export for projects - Add task filtering by status (todo/inprogress/done) and source (ai/manual) - Add kanban drag-and-drop to move tasks between columns - Add generation step progress indicator in confirmation dialog - Add mobile bottom tab bar for view switching - Improve empty state with onboarding steps and action buttons - Add search button in header with keyboard shortcut hint https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
- Add generation ID tracking with cancellation ref pattern - Show cancel button in goal input area during generation - Show "Stop generation" button in confirmation dialog during AI calls - Show "Stop execution" button in execute scope dialog - Add inline progress bar with cancel between form and breadcrumbs - Discard stale AI responses after cancellation (all await points checked) - Toast notification when generation is cancelled https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
- Add AI settings type with 5 Claude models (Opus 4, Sonnet 4, Haiku 4, 3.5 Sonnet, 3.5 Haiku) persisted to localStorage - Add "AI Model" section to Settings dialog with model dropdown, temperature slider (0-1), and max tokens input (100-128k) - Thread aiSettings through all server actions and AI flow functions (generateContent, generateContentBlocks) so model/temp/tokens are respected in every API call - Update claude.ts helpers to accept optional AiSettings overrides https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
Add production hosting support with Neon PostgreSQL database, NextAuth authentication (Google OAuth + email/password credentials), and dual persistence (localStorage cache + debounced DB sync). - Prisma schema with Neon driver adapter for serverless PostgreSQL - NextAuth v4 with JWT sessions, Google and Credentials providers - Server actions for project CRUD with transactional upserts - Database setup script (scripts/setup-db.sh) - Sign-in page with register/login toggle - Dual persistence in use-projects hook (localStorage + DB) https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
Uses npm ci for a clean install from the lockfile, preventing corrupted node_modules from stale directory conflicts. https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
- Rewrote README.md with clear About and How To Use sections - Updated tech stack info (Prisma/Neon DB, NextAuth, Google OAuth) - Added environment variable reference table and setup instructions - Cleaned up USER_GUIDE.md for conciseness - Removed APP_DESCRIPTION.md (referenced outdated Genkit/Gemini stack) - Removed blueprint.md (referenced old "DeepDive Navigator" name) - Removed empty docs/USER_WORKFLOW_LIST_VIEW.md https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
Multi-section guide with sidebar navigation matching the settings dialog pattern. Includes About, Getting Started, How To, Views, Keyboard Shortcuts, and Tips sections with step-by-step instructions, feature descriptions, and practical advice. https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
Removed the 'New scope in Unassigned...' form at the bottom of the sidebar, along with the associated state and handler. https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
Functionality fixes: - Fix stale closure in async dialog callbacks by capturing project before IIFE - Add null guard for empty convertRawToTasks result in subscope/regenerate flow - Remove unsafe (activeProject as Project) casts, add null checks - Prevent double-submission with isGenerating guard - Remove non-serializable File object from state, store only dataUri - Add null check in Kanban handleDrop for missing task lookup UX improvements: - Remove non-functional settings fields (phone, country, city, zip, camera) - Persist sidebar collapsed state in localStorage - Replace inline marginLeft styles with Tailwind classes in comments - Clean up setTimeout on unmount in search modal focus handler - Add streaming helper (generateContentStream) to Claude client Optimization: - Memoize sortTasksShallow in tree-view with useMemo - Build flat Map<id, Task> for O(1) selectedTasks lookup - Add TTL-based cleanup for recentlyChanged (10s expiry) - Extract getTargetProject helper to deduplicate lookup pattern - Add resetConfirmationState helper to consolidate state cleanup https://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces several significant UX and testing improvements to the Scope application, including a search modal for quick task navigation, generation cancellation support, a brainstorm/plan mode toggle, comprehensive test coverage, and improved error handling.
Key Changes
Search & Navigation
SearchModalcomponent): New Cmd/Ctrl+K keyboard shortcut opens a searchable modal to quickly find and navigate to tasks across all projectsGeneration Management
startGeneration(),cancelGeneration(), andisStale()utilities to track and validate generation stateBrainstorm vs Plan Modes
activeSectionstate switches between 'brainstorm' and 'plan' modesMind Map Enhancements
Kanban View Improvements
Testing Infrastructure
jest.config.tswith TypeScript support and module path mapping__tests__/utils.test.ts: 371 lines covering task counting, progress calculation, sorting, and text formatting utilities__tests__/json-to-tree.test.ts: 192 lines testing JSON-to-tree parsing for primitives, objects, and arraysCode Quality & Error Handling
ErrorBoundarycomponent wraps application to gracefully handle runtime errorsignoreBuildErrorsandignoreDuringBuildsin Next.js configUtility Enhancements
formatTaskToText()andformatTasksToText()utilities for exporting tasks as formatted text with optional numbering and statusFormatTextOptionstype for flexible text export configurationUI/UX Improvements
Lightbulb,ClipboardList,Search,Download,Upload,Filter,X,ListOrdered,CopyDocumentation
.env.examplewith required and optional environment variablesNotable Implementation Details
makeTask,makeProject,makeComment) for consistent test data creationhttps://claude.ai/code/session_01PWZQ1JhnGTBwGuZH7nrt4N