-
Notifications
You must be signed in to change notification settings - Fork 489
fix: resolve LSP compatibility issues and merge conflicts #264
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
Conversation
Phase 1: Core CLI Provider & Detection Infrastructure This implements the foundation for dual authentication modes: - API Key mode (existing, unchanged) - CLI Subscription mode (NEW - uses Claude Pro/Max subscription) Key Innovation: Instead of reading OAuth tokens directly, we spawn the Claude CLI as a child process and pipe prompts through it - the CLI handles authentication automatically! New Components: - claude-cli.ts: CLI detection, validation, and process spawning - auth-types.ts: Authentication mode types and configuration - claude-auth-manager.ts: Unified auth manager with smart fallback - claude-cli-client.ts: Streaming CLI client matching SDK format - unified-claude-client.ts: Transparent switching between SDK/CLI Features: ✅ Automatic CLI detection and version checking ✅ Authentication verification for both modes ✅ Smart fallback (CLI → API key) ✅ Streaming interface matching Claude Agent SDK ✅ 1-minute auth status caching ✅ 100% backward compatible with API key flow Benefits: - Pro/Max users can use subscription (no API billing!) - Existing API key users unaffected - Auto mode intelligently chooses best method Status: Phase 1 complete, ready for Phase 2 (API Routes & Frontend) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove unused ChildProcess type import - Remove redundant .then() identity function - Remove redundant promptPayload assignment Closes: DevFlow-42a, DevFlow-npd, DevFlow-1yo
Priority 2 fixes: - Fix duplicate CLI detection calls (pass detection result to checkCLIAuth) - Add type safety for error property access (use 'in' operator guard) - Improve empty message array handling (explicit checks + warning logs) - Fix verifyAuth to use method parameter (implement method-specific verification) All functions now properly handle edge cases and use parameters as intended. Closes: DevFlow-byh, DevFlow-fwo, DevFlow-2h9, DevFlow-o6l
Added @deprecated tag and documentation explaining that multi-turn conversations are not yet supported via CLI mode. Parameter is kept for API compatibility with SDK mode. Closes: DevFlow-bpf
feat: Add Dual Claude Authentication (API Key + CLI Subscription)
- Migrate from .claude_settings.json to .claude/settings.json - Add minimal-claude plugin via extraKnownMarketplaces - Update .gitignore for local Claude settings - Document plugin commands in README 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… configuration validation
feat: Add minimal-claude plugin for team-wide code quality
CodeRabbit Generated Unit Tests: Add test suite and vitest config for configuration validation
This PR implements a complete Kanban board interface for the Beads issue tracking system, providing a visual way to manage issues within DevFlow. ## Changes ### Frontend Components - **beads-view.tsx**: Main entry point with complete UI implementation - **BeadsHeader**: Header with stats, search, and add issue button - **BeadsKanbanBoard**: Drag-and-drop Kanban board with columns (Backlog, Ready, In Progress, Closed) - **BeadsCard**: Individual issue cards with metadata and actions - **BeadsColumn**: Column components with issue count and drop zone - **BeadsBadges**: Status and type badges with color coding ### Custom Hooks - **useBeadsIssues**: Issue fetching and loading state - **useBeadsColumnIssues**: Column filtering and statistics - **useBeadsActions**: CRUD operations for issues - **useBeadsDragDrop**: Drag-and-drop functionality ### Dialogs - **CreateIssueDialog**: Form for creating new issues - **EditIssueDialog**: Form for editing existing issues - **DeleteIssueDialog**: Confirmation dialog with blocking count warning ### API Integration - Added BeadsAPI types to electron.ts - Implemented HTTP API client methods for all Beads operations - Connected frontend to backend endpoints ### Documentation & Tooling - Added Beads UI integration section to README.md - Added npm scripts for beads-ui operations (beads, beads:open, beads:stop, etc.) - Added .env.example file for configuration ## Features - ✅ Visual Kanban board with 4 columns - ✅ Drag-and-drop issue management - ✅ Create, edit, and delete issues - ✅ Search and filter issues - ✅ Issue status tracking (Backlog → Ready → In Progress → Closed) - ✅ Dependency tracking (blocking/blocked counts) - ✅ Responsive design with theme support - ✅ Loading and error states - ✅ Toast notifications for user feedback 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Docstrings generation was requested by @0xtsotsi. * #5 (comment) The following files were modified: * `apps/server/src/routes/beads/common.ts` * `apps/server/src/routes/beads/index.ts` * `apps/server/src/routes/beads/routes/create.ts` * `apps/server/src/routes/beads/routes/delete.ts` * `apps/server/src/routes/beads/routes/list.ts` * `apps/server/src/routes/beads/routes/ready.ts` * `apps/server/src/routes/beads/routes/update.ts` * `apps/server/src/routes/beads/routes/validate.ts` * `apps/ui/src/components/layout/sidebar/hooks/use-navigation.ts` * `apps/ui/src/components/views/beads-view.tsx` * `apps/ui/src/components/views/beads-view/components/beads-badges.tsx` * `apps/ui/src/components/views/beads-view/dialogs/create-issue-dialog.tsx` * `apps/ui/src/components/views/beads-view/dialogs/delete-issue-dialog.tsx` * `apps/ui/src/components/views/beads-view/dialogs/edit-issue-dialog.tsx` * `apps/ui/src/components/views/beads-view/hooks/use-beads-actions.ts` * `apps/ui/src/components/views/beads-view/hooks/use-beads-column-issues.ts` * `apps/ui/src/components/views/beads-view/hooks/use-beads-drag-drop.ts` * `apps/ui/src/components/views/beads-view/hooks/use-beads-issues.ts`
…i-payload-shape-and-secure-cli-i Complete execFile migration in BeadsService helpers
📝 Add docstrings to `change_logo`
…ent-full-kanban-board-ui
…plement-full-kanban-board-ui Fix Beads API payload shape and secure CLI invocation
Implement backend API for Beads integration (df-1 through df-7): - CLI wrapper for bd command execution (spawn, exec, JSON parsing) - Subscription registry for real-time updates with delta computation - List adapters for filtering issues by status, type, priority, labels - API endpoints: connect, ready, list, show, create, update, sync - Shared types in @automaker/types (BeadsIssue, Status, Priority, etc) - Route registration in Express server Beads CLI v0.35.0 installed and verified working in JSONL mode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Merged PR #10 - Full Kanban board UI implementation for Beads issue tracking
Resolved conflicts in: - apps/server/src/routes/beads/*: Kept change_logo branch (has JSDoc comments) - apps/server/src/services/beads-service.ts: Kept change_logo branch (uses execFileAsync) - apps/ui/src/components/views/beads-view/*: Kept change_logo branch (has JSDoc comments) - apps/ui/src/store/app-store.ts: Kept main branch (has Claude Usage tracking) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix TypeScript errors and merge conflicts introduced by Beads feature: - Add missing getBdBin() export in beads common utilities - Fix fs.watch() to use callback-based API from fs module - Convert null to undefined for optional version properties - Add 'beads' keyboard shortcut to KeyboardShortcuts interface - Fix import paths in beads-view components (./hooks → ./beads-view/hooks) - Add BeadsStats interface export for use-beads-column-issues hook - Fix SortableContext items prop to accept string[] instead of ReactNode - Resolve merge conflict markers in beads-view and beads-badges components 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds comprehensive Beads issue tracker integration with backend services and frontend UI, Claude authentication system supporting both API keys and CLI, ESLint configuration for the server, environment configuration scaffolding, and extensive type definitions. Includes new API routes, subscription registry for real-time updates, Kanban board UI components, and detailed documentation and tests. Changes
Sequence DiagramssequenceDiagram
actor User as User/UI
participant BeadsView as BeadsView Component
participant BeadsService as BeadsService
participant CliWrapper as CLI Wrapper
participant BeadsCLI as Beads CLI (bd)
participant Store as App Store
User->>BeadsView: Load project
BeadsView->>BeadsService: listIssues(projectPath)
BeadsService->>CliWrapper: runBdJson(['list', 'all', '--json'])
CliWrapper->>BeadsCLI: spawn bd process
BeadsCLI-->>CliWrapper: stdout (JSON issues)
CliWrapper-->>BeadsService: parsed issues array
BeadsService-->>BeadsView: BeadsIssue[]
BeadsView->>Store: setBeadsIssues(issues)
BeadsView-->>User: Render Kanban board
User->>BeadsView: Create issue (open dialog)
BeadsView->>User: Issue form
User->>BeadsView: Submit form
BeadsView->>BeadsService: createIssue(projectPath, input)
BeadsService->>CliWrapper: runBdJson(['new', '--title', ...])
CliWrapper->>BeadsCLI: spawn bd process
BeadsCLI-->>CliWrapper: stdout (created issue)
CliWrapper-->>BeadsService: parsed issue
BeadsService-->>BeadsView: BeadsIssue
BeadsView->>Store: addBeadsIssue(issue)
BeadsView-->>User: Toast: Issue created
sequenceDiagram
actor User as User
participant App as App Server
participant AuthMgr as Claude Auth Manager
participant APIKey as API Key Check
participant CLIDetect as CLI Detection
participant CLIAuth as CLI Auth Check
User->>App: Request getAuthStatus()
App->>AuthMgr: getAuthStatus(forceRefresh)
rect rgb(200, 220, 255)
note over AuthMgr: Check cache
AuthMgr->>AuthMgr: Check TTL & cache validity
alt cache valid
AuthMgr-->>App: Return cached status
end
end
rect rgb(220, 200, 255)
note over AuthMgr: Evaluate methods
AuthMgr->>APIKey: hasApiKey (check ANTHROPIC_API_KEY)
APIKey-->>AuthMgr: boolean
AuthMgr->>CLIDetect: detectClaudeCLI()
CLIDetect-->>AuthMgr: CLIDetectionResult
end
alt CLI detected
rect rgb(200, 255, 220)
note over AuthMgr: Verify CLI auth
AuthMgr->>CLIAuth: checkCLIAuth()
CLIAuth-->>AuthMgr: authenticated flag
end
end
rect rgb(255, 200, 200)
note over AuthMgr: Compute overall status
AuthMgr->>AuthMgr: Combine API key & CLI states per config.method
AuthMgr->>AuthMgr: Cache result with TTL
end
AuthMgr-->>App: ClaudeAuthStatus
App-->>User: { authenticated, method, ... }
sequenceDiagram
actor User as User
participant KanbanBoard as Kanban Board
participant DragDrop as Drag Drop Handler
participant BeadsService as BeadsService
participant Store as App Store
User->>KanbanBoard: Start drag (issue)
KanbanBoard->>DragDrop: handleDragStart(event)
DragDrop->>DragDrop: setActiveIssue
KanbanBoard-->>User: Render DragOverlay
User->>KanbanBoard: Drag over column
KanbanBoard->>KanbanBoard: Droppable onDragOver
User->>KanbanBoard: Drop on column
KanbanBoard->>DragDrop: handleDragEnd(event)
rect rgb(220, 200, 255)
note over DragDrop: Determine target status
DragDrop->>DragDrop: Find dropped column ID
alt direct column drop
DragDrop->>DragDrop: Map column → status
else drop on issue
DragDrop->>DragDrop: Inspect issue status & blockers
DragDrop->>DragDrop: Infer target column/status
end
end
alt status changed
DragDrop->>BeadsService: updateIssue(issueId, {status: newStatus})
BeadsService-->>DragDrop: updated issue
DragDrop->>Store: updateBeadsIssue(issue)
end
DragDrop->>DragDrop: clearActiveIssue
KanbanBoard-->>User: Render updated board
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (149)
Comment |
Summary of ChangesHello @0xtsotsi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on stabilizing the codebase following the introduction of the Beads issue tracking feature. It addresses critical LSP compatibility issues and resolves merge conflicts, ensuring that the new issue tracking functionality is robust and seamlessly integrated. The changes span both backend services for managing issues and a new frontend UI for visualizing them in a Kanban board, alongside updates to development tooling and documentation. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a comprehensive integration of the Beads AI-native issue tracking system into DevFlow, featuring a new Kanban board UI. Key changes include adding new configuration files for Beads (.beads/.gitignore, .beads/.local_version, .beads/config.yaml, .beads/daemon.lock, .beads/issues.jsonl, .beads/metadata.json, .gitattributes), updating documentation (AGENTS.md, CLAUDE.md, README.md, .env.example) to reflect Beads and Claude Code plugin usage, and implementing backend API routes and services for Beads (apps/server/src/index.ts, apps/server/src/routes/beads/, apps/server/src/services/beads-service.ts).
The UI components for the Beads Kanban board (apps/ui/src/components/views/beads-view/) are added, along with associated hooks and dialogs for issue management (create, edit, delete, status changes, drag-and-drop). The project's ESLint configuration is updated, and new TypeScript types for Beads are introduced (libs/types/src/beads.ts). Additionally, significant refactoring of Claude authentication and CLI interaction logic is performed (apps/server/src/lib/claude-auth-manager.ts, apps/server/src/lib/claude-cli.ts, apps/server/src/lib/claude-cli-client.ts, apps/server/src/lib/unified-claude-client.ts), and various type safety improvements and minor bug fixes are applied across the server and UI codebases.
Review comments highlight several critical areas for improvement before merging. These include addressing type safety issues by replacing any with specific types (e.g., BeadsIssue[], unknown for errors), optimizing performance by debouncing issue loading on project switches and memoizing expensive calculations like getBlockingCounts, and centralizing duplicated logic. Security concerns are raised regarding command injection risks due to user-controlled input in CLI calls, lack of rate limiting on API endpoints, and insufficient input validation. Error handling consistency and the absence of retry logic for transient failures are also noted. Finally, the review emphasizes the need for comprehensive test coverage, as the PR introduces approximately 2,500 lines of new code with no accompanying tests, recommending basic unit and API tests as a prerequisite for merging.
| "node_modules/@electron/node-gyp": { | ||
| "version": "10.2.0-electron.1", | ||
| "resolved": "git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2", | ||
| "resolved": "git+ssh://git@github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resolved URL for @electron/node-gyp uses git+ssh://. This will cause npm install to fail in environments that don't have SSH keys configured for GitHub, such as many CI/CD systems or new developer machines. It's better to use git+https:// for broader compatibility. You can configure git to use HTTPS instead of SSH for GitHub URLs globally by running:
git config --global url."https://github.com/".insteadOf "git@github.com:"After running this, deleting node_modules and package-lock.json and running npm install again should resolve the issue.
| private isNotInitializedError(error: any): boolean { | ||
| const errorMsg = error?.message || error?.toString() || ''; | ||
| return ( | ||
| errorMsg.includes('no such file') || | ||
| errorMsg.includes('database not found') || | ||
| errorMsg.includes('not initialized') | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using any for the error type disables type-checking. It's safer to use unknown and then perform a type check before accessing its properties. This ensures that the code doesn't throw a runtime error if a non-Error object is caught.
| private isNotInitializedError(error: any): boolean { | |
| const errorMsg = error?.message || error?.toString() || ''; | |
| return ( | |
| errorMsg.includes('no such file') || | |
| errorMsg.includes('database not found') || | |
| errorMsg.includes('not initialized') | |
| ); | |
| } | |
| private isNotInitializedError(error: unknown): boolean { | |
| const errorMsg = error instanceof Error ? error.message : String(error); | |
| return ( | |
| errorMsg.includes('no such file') || | |
| errorMsg.includes('database not found') || | |
| errorMsg.includes('not initialized') | |
| ); | |
| } |
| const getBlockingCounts = useCallback( | ||
| (issue: BeadsIssue) => { | ||
| const blockingCount = issues.filter((otherIssue) => | ||
| otherIssue.dependencies?.some((dep) => dep.issueId === issue.id && dep.type === 'blocks') | ||
| ).length; | ||
|
|
||
| const blockedCount = | ||
| issue.dependencies?.filter((dep) => { | ||
| const depIssue = issues.find((i) => i.id === dep.issueId); | ||
| return ( | ||
| dep.type === 'blocks' && | ||
| depIssue && | ||
| (depIssue.status === 'open' || depIssue.status === 'in_progress') | ||
| ); | ||
| }).length || 0; | ||
|
|
||
| return { blockingCount, blockedCount }; | ||
| }, | ||
| [issues] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This getBlockingCounts function is recalculated on every render, and it iterates over the entire issues array. For a large number of issues, this could become a performance bottleneck. Consider memoizing this calculation using useMemo to create a map of issue IDs to their blocking counts. This would be more efficient, especially since this logic is also duplicated in beads-kanban-board.tsx.
| // Helper to count blockers and blocking issues | ||
| const getBlockingCounts = (issue: BeadsIssue) => { | ||
| const blockingCount = issues.filter((otherIssue) => | ||
| otherIssue.dependencies?.some((dep) => dep.issueId === issue.id && dep.type === 'blocks') | ||
| ).length; | ||
|
|
||
| const blockedCount = | ||
| issue.dependencies?.filter((dep) => { | ||
| const depIssue = issues.find((i) => i.id === dep.issueId); | ||
| return ( | ||
| dep.type === 'blocks' && | ||
| depIssue && | ||
| (depIssue.status === 'open' || depIssue.status === 'in_progress') | ||
| ); | ||
| }).length || 0; | ||
|
|
||
| return { blockingCount, blockedCount }; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This getBlockingCounts helper function is duplicated from beads-view.tsx. This duplicated logic can lead to inconsistencies and maintenance issues. It would be better to centralize this calculation, perhaps in the useBeadsColumnIssues hook, and pass the counts down as props. This would improve both performance and maintainability.
| useEffect(() => { | ||
| loadIssues(); | ||
| }, [loadIssues]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The useEffect hook calls loadIssues every time the currentProject changes. If a user switches between projects quickly, this can trigger a rapid series of API calls. It's a good practice to debounce this effect to prevent unnecessary network requests and server load.
useEffect(() => {
const handler = setTimeout(() => {
loadIssues();
}, 300); // 300ms debounce
return () => {
clearTimeout(handler);
};
}, [loadIssues]);
Summary
Fixes TypeScript errors and resolves merge conflicts introduced by the Beads issue tracking feature. This commit ensures all code is compatible with the existing codebase structure and passes LSP diagnostics.
Changes
Server-side fixes
getBdBin()export in beads common utilitiesfs.watch()to use callback-based API fromfsmodule instead of promises APInulltoundefinedfor optional version properties in type definitionsgetBdBin()UI fixes
'beads'keyboard shortcut to all keyboard shortcut definitionsbeads-view.tsx(changed from./hooks/*to./beads-view/hooks/*)BeadsStatsinterface export for type compatibilitySortableContextto useitemIdsarray instead of ReactNodebeads-view.tsxandbeads-badges.tsxFiles changed
Quality Checks
✅ TypeScript: No errors
✅ ESLint: No errors (only minor warnings about unused imports)
✅ Prettier: All files formatted correctly
Testing
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Improvements
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.