Skip to content

Conversation

@0xtsotsi
Copy link

@0xtsotsi 0xtsotsi commented Dec 24, 2025

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

  • Added missing getBdBin() export in beads common utilities
  • Fixed fs.watch() to use callback-based API from fs module instead of promises API
  • Converted null to undefined for optional version properties in type definitions
  • Made CLI wrapper functions async to properly handle getBdBin()

UI fixes

  • Added 'beads' keyboard shortcut to all keyboard shortcut definitions
  • Fixed import paths in beads-view.tsx (changed from ./hooks/* to ./beads-view/hooks/*)
  • Added BeadsStats interface export for type compatibility
  • Fixed SortableContext to use itemIds array instead of ReactNode
  • Resolved merge conflict markers in beads-view.tsx and beads-badges.tsx

Files changed

  • 22 files changed, 89 insertions(+), 40 deletions(-)

Quality Checks

✅ TypeScript: No errors
✅ ESLint: No errors (only minor warnings about unused imports)
✅ Prettier: All files formatted correctly

Testing

  • All TypeScript compilation passes for both server and UI
  • Code follows existing clean code patterns
  • No breaking changes to existing functionality

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Beads issue tracker integration with Kanban board view, drag-and-drop, and real-time synchronization
    • Issue creation, editing, and deletion dialogs with dependency and blocking tracking
    • Claude Code Plugin setup with automated commands for code quality workflows
    • Enhanced Claude authentication supporting both API key and CLI subscription modes
    • Project metadata and configuration management system
  • Improvements

    • Better error handling and type safety across the application
    • Improved project initialization and validation
  • Documentation

    • New guides for Beads workflows and agent task management

✏️ Tip: You can customize this high-level summary in your review settings.

0xtsotsi and others added 23 commits December 23, 2025 09:35
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>
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
…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>
@coderabbitai
Copy link

coderabbitai bot commented Dec 24, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
Beads Backend Services
apps/server/src/services/beads-service.ts, apps/server/src/routes/beads/index.ts, apps/server/src/routes/beads/common.ts
New BeadsService class providing programmatic access to Beads CLI with methods for CRUD operations, dependency management, ready work, and database watching. Exported route factory and common CLI utilities.
Beads Client & Adapters
apps/server/src/routes/beads/client/cli-wrapper.ts, apps/server/src/routes/beads/client/list-adapters.ts, apps/server/src/routes/beads/client/subscription-registry.ts, apps/server/src/routes/beads/client/index.ts
CLI wrapper for executing bd commands, typed adapters mapping subscription keys to Beads queries, real-time subscription registry with delta computation and subscriber management, and central re-export index.
Beads API Routes
apps/server/src/routes/beads/routes/{list,create,update,delete,ready,show,sync,connect,validate}.ts
Eight new Express route handlers managing Beads issue operations, database connection validation, and Git synchronization with request validation and error handling.
Claude Authentication
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, apps/server/src/types/auth-types.ts
Dual authentication system supporting API key and Claude CLI with caching, fallback logic, CLI process spawning, streaming CLI output parsing, and unified client abstracting both methods. Includes type definitions for auth configurations and statuses.
Server Type & Configuration
apps/server/eslint.config.js, apps/server/src/index.ts, apps/server/src/providers/claude-provider.ts
New ESLint config with TypeScript support, integration of BeadsService into main server, and SDKUserMessage type improvements for prompt handling.
Beads Project Configuration
.beads/.gitignore, .beads/.local_version, .beads/config.yaml, .beads/metadata.json, .beads/issues.jsonl, .beads/README.md
Project-specific Beads configuration including version tracking, runtime settings, metadata, comprehensive integration roadmap with dependencies, and detailed project documentation.
Claude Code Integration
.claude/commands/{commit,fix}.md, .claude/settings.json, .gitignore, README.md, CLAUDE.md, AGENTS.md
Claude Code plugin setup with commit and fix workflows, marketplace configuration for minimal-claude plugin, documentation for development flow and agent guidelines, and gitignore updates for local settings protection.
Beads UI Components
apps/ui/src/components/views/beads-view.tsx, apps/ui/src/components/views/beads-view/{beads-header,beads-kanban-board}.tsx, apps/ui/src/components/views/beads-view/components/{beads-badges,beads-card,beads-column}.tsx, apps/ui/src/components/views/beads-view/dialogs/{create,edit,delete}-issue-dialog.tsx
Main Beads view component with header, Kanban board, issue cards, and dialogs for CRUD operations. Includes badges for priority, type, blocking counts, and labels with drag-and-drop integration.
Beads UI Hooks
apps/ui/src/components/views/beads-view/hooks/use-beads-*.ts
Four hooks: useBeadsIssues (load/manage issues), useBeadsColumnIssues (compute per-column mappings and stats), useBeadsActions (handlers for create/update/delete/status-change), useBeadsDragDrop (drag-and-drop with status inference).
Beads UI Constants & Store
apps/ui/src/components/views/beads-view/constants.ts, apps/ui/src/store/app-store.ts
Beads column configuration, priority/type color mappings, and extended AppState/AppActions with Beads issue management and watching.
Type Definitions
libs/types/src/beads.ts, libs/types/src/index.ts
New Beads types module exporting issue/dependency/status/type/priority interfaces and filters for validation and CRUD operations.
Electron API & HTTP Client
apps/ui/src/lib/electron.ts, apps/ui/src/lib/http-api-client.ts, apps/ui/src/types/electron.d.ts
Extended ElectronAPI with BeadsAPI, FeaturesAPI, templates, and setup namespaces; HTTP client implementation mapping to /api/beads/* endpoints with progress callback typing improvements.
Environment & Build Config
.env.example, .gitattributes, package.json
Example environment variables for Beads UI and server, custom merge driver for issues.jsonl, and new npm scripts (beads, beads:open, beads:stop, etc.) plus Node.js dependency.
Type Safety & Refactoring
apps/server/src/routes/{app-spec,fs,models,setup,suggestions,terminal,worktree}/*.ts, apps/ui/src/components/views/{board-view,chat-history,context,interview,settings}/*.ts, apps/ui/src/hooks/use-*.ts, apps/ui/src/config/terminal-themes.ts
Systematic type improvements: replace any with unknown, add type guards, strengthen error handling, remove unused imports/variables, and tighten component prop typing across multiple files. Minor refactoring: catch clause parameter removal, optional-chaining improvements, and improved window type access.
Testing & Documentation
test/config/{claude-settings,gitignore-validation,readme-validation}.test.ts, test/README.md, test/CONFIG_TESTS.md, test/TEST_SUMMARY.md, vitest.config.ts, PR5_REVIEW_REPORT.md
Comprehensive test suite for configuration files using Vitest (3 test files, ~926 lines, 150+ tests), documentation on test organization, configuration review report, and test runner setup.

Sequence Diagrams

sequenceDiagram
    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
Loading
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, ... }
Loading
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
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • Implement planning/speckits rebase #160: Both PRs introduce planning/plan-approval surfaces (planningMode, planSpec, Feature extensions, AppStore plan actions, plan approval flows) with overlapping Feature/AppStore/UI/server changes.
  • refactor: sidebar #210: Both PRs modify the sidebar navigation hook (apps/ui/src/components/layout/sidebar/hooks/use-navigation.ts) with new navigation items and public props, directly related at the code level.
  • refactor: migrate frontend from next.js to vite + tanStack router #148: Both PRs extend the Electron API surface (apps/ui/src/lib/electron.ts) and HTTP client (apps/ui/src/lib/http-api-client.ts) to add Beads API endpoints and related type exports.

Suggested labels

feature, beads-integration, claude-auth, ui-components, backend-services


🐰 Beads and auth now bloom so bright,
Kanban boards arranged just right,
Drag-drop magic, issues flow,
Type-safe paths where'er we go—
A worthy merge, I do declare! 🌟

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91eeda3 and 3d19aa8.

⛔ Files ignored due to path filters (3)
  • .beads/beads.db is excluded by !**/*.db
  • .beads/daemon.lock is excluded by !**/*.lock
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (149)
  • .beads/.gitignore
  • .beads/.local_version
  • .beads/README.md
  • .beads/config.yaml
  • .beads/interactions.jsonl
  • .beads/issues.jsonl
  • .beads/metadata.json
  • .claude/commands/commit.md
  • .claude/commands/fix.md
  • .claude/settings.json
  • .env.example
  • .gitattributes
  • .gitignore
  • AGENTS.md
  • CLAUDE.md
  • PR5_REVIEW_REPORT.md
  • README.md
  • TEST_GENERATION_REPORT.md
  • apps/server/eslint.config.js
  • apps/server/package.json
  • apps/server/src/index.ts
  • apps/server/src/lib/claude-auth-manager.ts
  • apps/server/src/lib/claude-cli-client.ts
  • apps/server/src/lib/claude-cli.ts
  • apps/server/src/lib/unified-claude-client.ts
  • apps/server/src/lib/worktree-metadata.ts
  • apps/server/src/providers/claude-provider.ts
  • apps/server/src/routes/agent/routes/send.ts
  • apps/server/src/routes/agent/routes/start.ts
  • apps/server/src/routes/app-spec/common.ts
  • apps/server/src/routes/app-spec/generate-features-from-spec.ts
  • apps/server/src/routes/app-spec/generate-spec.ts
  • apps/server/src/routes/beads/client/cli-wrapper.ts
  • apps/server/src/routes/beads/client/index.ts
  • apps/server/src/routes/beads/client/list-adapters.ts
  • apps/server/src/routes/beads/client/subscription-registry.ts
  • apps/server/src/routes/beads/common.ts
  • apps/server/src/routes/beads/index.ts
  • apps/server/src/routes/beads/routes/connect.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/show.ts
  • apps/server/src/routes/beads/routes/sync.ts
  • apps/server/src/routes/beads/routes/update.ts
  • apps/server/src/routes/beads/routes/validate.ts
  • apps/server/src/routes/fs/routes/mkdir.ts
  • apps/server/src/routes/fs/routes/resolve-directory.ts
  • apps/server/src/routes/fs/routes/save-board-background.ts
  • apps/server/src/routes/fs/routes/save-image.ts
  • apps/server/src/routes/models/routes/providers.ts
  • apps/server/src/routes/running-agents/routes/index.ts
  • apps/server/src/routes/setup/routes/verify-claude-auth.ts
  • apps/server/src/routes/suggestions/generate-suggestions.ts
  • apps/server/src/routes/suggestions/routes/generate.ts
  • apps/server/src/routes/terminal/common.ts
  • apps/server/src/routes/terminal/routes/auth.ts
  • apps/server/src/routes/worktree/common.ts
  • apps/server/src/routes/worktree/routes/branch-tracking.ts
  • apps/server/src/routes/worktree/routes/checkout-branch.ts
  • apps/server/src/routes/worktree/routes/create-pr.ts
  • apps/server/src/routes/worktree/routes/delete.ts
  • apps/server/src/routes/worktree/routes/merge.ts
  • apps/server/src/routes/worktree/routes/open-in-editor.ts
  • apps/server/src/services/agent-service.ts
  • apps/server/src/services/auto-mode-service.ts
  • apps/server/src/services/beads-service.ts
  • apps/server/src/services/claude-usage-service.ts
  • apps/server/src/services/dev-server-service.ts
  • apps/server/src/services/feature-loader.ts
  • apps/server/src/types/auth-types.ts
  • apps/ui/src/components/dialogs/new-project-modal.tsx
  • apps/ui/src/components/layout/sidebar/components/sidebar-navigation.tsx
  • apps/ui/src/components/layout/sidebar/hooks/use-navigation.ts
  • apps/ui/src/components/layout/sidebar/hooks/use-project-creation.ts
  • apps/ui/src/components/ui/keyboard-map.tsx
  • apps/ui/src/components/ui/log-viewer.tsx
  • apps/ui/src/components/ui/task-progress-panel.tsx
  • apps/ui/src/components/views/agent-tools-view.tsx
  • apps/ui/src/components/views/analysis-view.tsx
  • apps/ui/src/components/views/beads-view.tsx
  • apps/ui/src/components/views/beads-view/beads-header.tsx
  • apps/ui/src/components/views/beads-view/beads-kanban-board.tsx
  • apps/ui/src/components/views/beads-view/components/beads-badges.tsx
  • apps/ui/src/components/views/beads-view/components/beads-card.tsx
  • apps/ui/src/components/views/beads-view/components/beads-column.tsx
  • apps/ui/src/components/views/beads-view/constants.ts
  • 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
  • apps/ui/src/components/views/board-view.tsx
  • apps/ui/src/components/views/board-view/components/kanban-card/agent-info-panel.tsx
  • apps/ui/src/components/views/board-view/components/kanban-card/card-badges.tsx
  • apps/ui/src/components/views/board-view/dialogs/add-feature-dialog.tsx
  • apps/ui/src/components/views/board-view/dialogs/agent-output-modal.tsx
  • apps/ui/src/components/views/board-view/dialogs/edit-feature-dialog.tsx
  • apps/ui/src/components/views/board-view/dialogs/feature-suggestions-dialog.tsx
  • apps/ui/src/components/views/board-view/dialogs/follow-up-dialog.tsx
  • apps/ui/src/components/views/board-view/hooks/use-board-column-features.ts
  • apps/ui/src/components/views/board-view/hooks/use-board-drag-drop.ts
  • apps/ui/src/components/views/board-view/hooks/use-board-effects.ts
  • apps/ui/src/components/views/board-view/hooks/use-board-features.ts
  • apps/ui/src/components/views/board-view/kanban-board.tsx
  • apps/ui/src/components/views/board-view/shared/model-selector.tsx
  • apps/ui/src/components/views/board-view/worktree-panel/components/worktree-tab.tsx
  • apps/ui/src/components/views/board-view/worktree-panel/worktree-panel.tsx
  • apps/ui/src/components/views/chat-history.tsx
  • apps/ui/src/components/views/context-view.tsx
  • apps/ui/src/components/views/graph-view/components/graph-controls.tsx
  • apps/ui/src/components/views/graph-view/hooks/use-graph-layout.ts
  • apps/ui/src/components/views/interview-view.tsx
  • apps/ui/src/components/views/profiles-view/utils.ts
  • apps/ui/src/components/views/settings-view/api-keys/api-keys-section.tsx
  • apps/ui/src/components/views/settings-view/api-keys/hooks/use-api-key-management.ts
  • apps/ui/src/components/views/setup-view/hooks/use-cli-installation.ts
  • apps/ui/src/components/views/setup-view/hooks/use-cli-status.ts
  • apps/ui/src/components/views/setup-view/steps/claude-setup-step.tsx
  • apps/ui/src/components/views/spec-view.tsx
  • apps/ui/src/components/views/terminal-view.tsx
  • apps/ui/src/components/views/terminal-view/terminal-panel.tsx
  • apps/ui/src/config/terminal-themes.ts
  • apps/ui/src/hooks/use-electron-agent.ts
  • apps/ui/src/hooks/use-responsive-kanban.ts
  • apps/ui/src/lib/electron.ts
  • apps/ui/src/lib/file-picker.ts
  • apps/ui/src/lib/http-api-client.ts
  • apps/ui/src/store/app-store.ts
  • apps/ui/src/types/electron.d.ts
  • apps/ui/tests/context/add-context-image.spec.ts
  • apps/ui/tests/utils/project/setup.ts
  • libs/types/src/beads.ts
  • libs/types/src/index.ts
  • lint-server-output.txt
  • lint-ui-output.txt
  • package.json
  • test/CONFIG_TESTS.md
  • test/README.md
  • test/TEST_SUMMARY.md
  • test/config/claude-settings.test.ts
  • test/config/gitignore-validation.test.ts
  • test/config/readme-validation.test.ts
  • typecheck-server-output.txt
  • typecheck-ui-output.txt
  • vitest.config.ts

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • LSP Compatibility & Merge Conflict Resolution: This pull request primarily addresses and resolves various TypeScript errors and merge conflicts that arose from the integration of the new Beads issue tracking feature, ensuring the codebase remains compatible and passes Language Server Protocol (LSP) diagnostics.
  • Beads Issue Tracking Integration: A significant portion of the changes introduces the full integration of the Beads issue tracking system. This includes new server-side API routes and services for managing Beads issues (list, create, update, delete, ready work, validate), along with a comprehensive UI for a Kanban-style board to visualize and interact with these issues.
  • Claude Code Plugin Enhancements: The project's Claude Code configuration has been updated, including new command definitions (commit.md, fix.md), a renamed settings file (.claude/settings.json), and documentation (AGENTS.md, CLAUDE.md, README.md updates) to support the minimal-claude plugin for code quality automation and agent guidelines.
  • TypeScript Strictness & Type Safety: Numerous type-related fixes have been implemented across the codebase, including adding explicit types, refining existing ones, converting null to undefined for optional properties, and introducing type guards to improve overall type safety and resolve any usages.
  • Frontend UI Refinements: UI components related to the Beads view have been added, including a Kanban board, issue cards, and dialogs for creating, editing, and deleting issues. Keyboard shortcuts have been updated to include 'beads' navigation, and import paths in beads-view.tsx were corrected.
  • Build & Dependency Updates: The package.json and package-lock.json files have been updated to include new ESLint and TypeScript dependencies, as well as a node dependency. New npm scripts for Beads UI operations (beads, beads:open, beads:stop, beads:status, beads:issues) have been added.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@0xtsotsi 0xtsotsi closed this Dec 24, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Comment on lines +374 to +381
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')
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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')
);
}

Comment on lines +61 to +79
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]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Comment on lines +59 to +76
// 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 };
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Comment on lines +86 to +88
useEffect(() => {
loadIssues();
}, [loadIssues]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant