Skip to content

Commit b5417a2

Browse files
authored
feat: add plan review comment system (#1)
* feat: add plan review system with inline comments Implement GitHub-style code review for plan files: - Click blocks to select and add comments - Bottom bar shows all comments with line indicators - Generate consolidated review prompt - Copy to clipboard for coding agent feedback - Persistent storage in .comments.json sidecar files - Integrated clipboard support from feat/voice-to-text Backend: - Add load_comments, save_comments, hash_file Tauri commands - Add Comment and CommentsFile structs for persistence - Integrate tauri-plugin-clipboard-manager and sha2 deps Frontend: - Block selection with visual highlight - Comment CRUD operations with badges - Bottom bar UI (200px height, resizable) - Review prompt generation with unresolved filtering - Theme-aware styling for all new components UI Components: - Bottom bar with comment list and actions - Comment modal for adding feedback - Review modal with prompt preview - Line indicators (L<number>) for navigation - Badge counters on commented blocks * fix: move bottom bar event listeners to end of script Event listeners were being registered before DOM elements existed, causing blank screen on app load. Moved all bottom bar and comment modal event listeners to execute after theme initialization and initial file load. * fix: serve frontend directly instead of expecting dev server Remove devUrl from tauri.conf.json to serve static files directly from frontendDist. The app was trying to connect to http://localhost:1420 but no server was running on that port. Also add defensive checks in updateBottomBar() and selectBlock() to handle cases where DOM elements don't exist yet during initial load. * fix: configure HTTP server for dev mode with correct MIME types Add beforeDevCommand to start Python HTTP server on port 1420. This ensures CSS files are served with correct MIME types instead of being rejected by browser strict mode. * fix: use npm serve instead of Python for dev server Replace python3 dependency with npm serve package for cross-platform compatibility. This works on any system with Node.js installed (which is already required for the project). * revert: remove unnecessary serve package and beforeDevCommand Tauri already serves static files automatically in dev mode. The beforeDevCommand was unnecessary complexity. Restore to original working configuration. * fix: remove devUrl to use Tauri's built-in static file serving Tauri can serve static files directly from frontendDist without needing an external dev server. This is simpler and works correctly with proper MIME types. * build: add http-server for Tauri dev mode - Add http-server dependency for serving static files - Configure beforeDevCommand to auto-start dev server - Remove center positioning from recording window * feat: start app hidden, show only when file is loaded Window starts with visible:false and only appears when a file is opened, avoiding empty window taking up screen space. * fix: show window on startup when no initial file provided If app starts without a file argument, show window so user can use the Open File button. Window only stays hidden if launched with a file that will trigger show() via loadFile(). * fix: remove visible:false, let window show normally on startup The visible:false configuration was preventing window from appearing. Removed to allow normal window behavior. * feat: add plan review comment system with multi-selection - Add collapsible bottom bar for plan review comments - Support multi-selection of markdown blocks (Cmd/Ctrl+click) - Generate review prompts with quoted block content - Persist comments in .comments.json sidecar files - Add window state persistence plugin - Fix light theme icon and refresh button padding - Ignore *.comments.json files * fix: address code review feedback from PR #1 - Distinguish NotFound from other IO errors in load_comments - Replace console.warn with user-visible stale comments banner - Use data attribute + CSS ::after for badge count to prevent text leak - Clear selection state when loading a new file - Use color-mix() for theme-aware selected block highlight - Add ARIA attributes to comment and review modals - Remove debug console.log from delete flow * fix: hash raw bytes and clear UI state on comment load failure * fix: address remaining code review feedback from PR #1 - Fix ellipsis always appended on short preview text - Surface save errors via banner instead of console only - Use descriptive block chip labels (H, P, Li, C, Q) with tooltips - Replace hardcoded padding with CSS variable * fix: theme-aware banners, dedicated save-error UI, Tauri dialog API - Replace hardcoded banner colors with CSS variables (--warning-bg, --warning-text, --error-bg, --error-text) for light/dark themes - Create dedicated save-error-banner instead of reusing stale-comments-banner - Use Tauri dialog confirm() instead of blocking native confirm() - Replace hardcoded RGBA in .bottom-bar-item.highlight with color-mix() - Extract shared banner styles into .notification-banner base class * fix: serialize saves, add aria-live banners, fix CSS lint - Queue concurrent saveCommentsForFile calls to prevent out-of-order writes from overwriting newer data - Add aria-live roles to notification banners for screen reader support - Add empty line before standard declarations in #bottom-bar CSS * refactor(ui): improve bottom bar and review modal styling - Replace parentheses with GitHub-style pill badge for comment count - Unify Generate Review button style with Add Comment button - Make review modal responsive with flexible height to prevent button clipping * refactor(ui): improve bottom bar animation and standardize icon buttons - Replace height animation with transform for better performance (GPU-accelerated) - Add dedicated toggle button for bottom bar expand/collapse - Standardize all icon buttons with .icon-button class - Reduce bottom bar border to 1px and height to 46px - Normalize icon sizes to 14px across all buttons - Remove text from refresh button for consistency * feat(review): make review prompt editable - Remove readonly attribute from review prompt textarea - Change resize from none to vertical for user customization - Use code-bg background for subtle visual differentiation
1 parent 7879820 commit b5417a2

11 files changed

Lines changed: 2034 additions & 28 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,6 @@ yarn-error.log*
9494

9595
# Certificates
9696
.certificates/
97+
98+
# Plan review comments
99+
*.comments.json

0 commit comments

Comments
 (0)