Conversation
syncWorktreesToDB() now returns SyncResult with deletedIds, enabling callers to clean up orphaned tmux sessions. Added killWorktreeSession() and syncWorktreesAndCleanup() helpers to session-cleanup.ts for DRY compliance. Updated all sync call sites (sync/scan/restore routes, clone-manager, server.ts). Parallelized cleanupMultipleWorktrees() with Promise.allSettled(). Sanitized cleanup warnings for API responses. Resolves #526 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… format Replace inconsistent log message formats (e.g., 'logprefix-failed-to-*', 'error-scanning-*') with structured 'module:action' naming convention used throughout the codebase. Remove unnecessary TODO comment from SyncResult interface. Remove extra blank lines. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Migrate Auto-Yes state management from worktreeId to worktreeId:cliToolId composite keys, enabling independent Auto-Yes control per agent. Phase 1: auto-yes-state.ts - Add COMPOSITE_KEY_SEPARATOR, buildCompositeKey, extractWorktreeId, extractCliToolId - Update setAutoYesEnabled, getAutoYesState, disableAutoYes signatures with cliToolId - Update deleteAutoYesState, checkStopCondition to accept compositeKey - Add getCompositeKeysByWorktree, deleteAutoYesStateByWorktree helpers Phase 2: auto-yes-poller.ts - Migrate pollerStates Map to compositeKey - Update stopAutoYesPolling, isPollerActive, getLastServerResponseTimestamp - Add stopAutoYesPollingByWorktree, isAnyPollerActiveForWorktree Phase 3: API layer - auto-yes/route.ts: cliToolId query param (GET), per-agent enable/disable (POST) - current-output/route.ts: compositeKey for state/poller lookups Phase 4: Cleanup - session-cleanup.ts: use byWorktree helpers - resource-cleanup.ts: extract worktreeId from composite keys for DB validation - worktree-status-helper.ts: compositeKey for timestamp lookup All 5239 unit tests pass, 0 ESLint errors, 0 TypeScript errors. Resolves #525 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract filterCompositeKeysByWorktree shared utility to eliminate
duplicated byWorktree filtering pattern across auto-yes-state.ts
and auto-yes-poller.ts
- Replace hardcoded key.split(':') with extractCliToolId in auto-yes
API route for COMPOSITE_KEY_SEPARATOR consistency
- Rename getAutoYesStateWorktreeIds/getAutoYesPollerWorktreeIds to
getAutoYesStateCompositeKeys/getAutoYesPollerCompositeKeys for
accuracy (deprecated aliases retained for backward compatibility)
- Update resource-cleanup.ts and tests to use new function names
Quality: 5247 tests pass, 0 ESLint errors, 0 TypeScript errors
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cs (#525) - Fix POST disable without cliToolId to disable all agents (not just default claude) - Show agent name in AutoYesToggle regardless of enabled state - Add unit tests for AutoYesToggle and AutoYesConfirmDialog agent name display - Update CLAUDE.md module descriptions with Issue #525 references - Add design policy, review reports, work plan, UAT report Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: Auto-Yesエージェント毎独立制御 (#525)
Add comprehensive development artifacts for the sync tmux cleanup fix: - Design policy document with 4-stage review findings - Issue review reports (8 stages) - Work plan, TDD/acceptance/refactor results - UAT report (14/14 pass) - Update CLAUDE.md module description for session-cleanup.ts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix two CI-only test failures caused by vi.resetAllMocks() timing differences between local and CI environments: - pollerErrors assertion now uses greaterThanOrEqual instead of exact count - syncWorktreesAndCleanup test validates sanitization instead of exact empty array Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: syncWorktreesToDB()でworktree削除時にtmuxセッションをクリーンアップ (#526)
Change autoYesEnabled/autoYesExpiresAt from single values to a
Map<CLIToolType, {enabled, expiresAt}> so each agent tab displays
its own auto-yes state immediately on tab switch without waiting
for the next polling cycle.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: Auto-YesのUI状態をエージェント毎に分離 (#525)
- feat: /orchestrate command for parallel issue development lifecycle - feat: /pr-merge-pipeline command for PR creation through merge automation - feat: /uat-fix-loop command for UAT failure repair cycle automation - refactor: /release skill to use git worktree + commandmatedev delegation - fix: add execute permission to bin/commandmate.js Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(session-history): retain message history after session clear - Add archived column to chat_messages (migration v22) - Change deleteAllMessages/deleteMessagesByCliTool from physical DELETE to logical UPDATE (archived=1) - Add ACTIVE_FILTER constant for consistent archived filtering across all queries - Update getMessages to options object pattern with includeArchived parameter - Add clearLastUserMessage for sidebar cleanup after archiving - Update kill-session API to call clearLastUserMessage - Add includeArchived query parameter to messages API - Add showArchived toggle UI in HistoryPane with localStorage persistence - Apply opacity-60 styling to archived messages in conversation view - Update all call sites and existing tests for new getMessages signature Resolves #168 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(session-history): add archived field to ChatMessage in test files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(session-history): add design policy and review reports for issue #168 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(timer): implement delayed message sending feature - Add timer-constants.ts with MIN/MAX/STEP dynamic delay generation [DP-001] - Add v23 DB migration for timer_messages table with indexes - Add timer-db.ts with full CRUD operations (src/lib/db/) - Add timer-manager.ts with globalThis singleton, setTimeout management - Add Timer API route (POST/GET/DELETE) with security validations - Integrate timer lifecycle in server.ts (init/stop) - Integrate stopTimersForWorktree in session-cleanup.ts - Integrate orphan detection in resource-cleanup.ts [CON-SF-003] - Add TimerPane.tsx with countdown, polling, visibilitychange support - Add Timer sub-tab to NotesAndLogsPane.tsx - Add i18n translations (en/ja) for timer UI - Update barrel export in db.ts - Coverage: 99% (timer-constants 100%, timer-db 100%, timer-manager 98%) - All static analysis checks passed (tsc, ESLint) Resolves #534 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor(timer): improve code quality and eliminate duplication Apply DRY and KISS principles to timer feature (Issue #534): - Extract MAX_TIMER_MESSAGE_LENGTH to timer-constants.ts (was duplicated as local constant in timers/route.ts and magic number in TimerPane.tsx) - Extract TIMER_COLUMNS constant in timer-db.ts (SQL column list was repeated in 3 SELECT queries) - Optimize stopTimersForWorktree to use in-memory timerWorktrees map instead of redundant DB query (KISS: data already available in memory) - Update tests to match refactored implementation Quality Metrics: - Coverage: 99% (maintained) - ESLint errors: 0 (maintained) - TypeScript errors: 0 (maintained) - Tests: 5329 passed (57 timer-specific, +1 new) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(timer): add design policy, review reports, and update module reference Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(timer): implement delayed message sending feature - Add timer-constants.ts with MIN/MAX/STEP dynamic delay generation [DP-001] - Add v23 DB migration for timer_messages table with indexes - Add timer-db.ts with full CRUD operations (src/lib/db/) - Add timer-manager.ts with globalThis singleton, setTimeout management - Add Timer API route (POST/GET/DELETE) with security validations - Integrate timer lifecycle in server.ts (init/stop) - Integrate stopTimersForWorktree in session-cleanup.ts - Integrate orphan detection in resource-cleanup.ts [CON-SF-003] - Add TimerPane.tsx with countdown, polling, visibilitychange support - Add Timer sub-tab to NotesAndLogsPane.tsx - Add i18n translations (en/ja) for timer UI - Update barrel export in db.ts - Coverage: 99% (timer-constants 100%, timer-db 100%, timer-manager 98%) - All static analysis checks passed (tsc, ESLint) Resolves #534 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor(timer): improve code quality and eliminate duplication Apply DRY and KISS principles to timer feature (Issue #534): - Extract MAX_TIMER_MESSAGE_LENGTH to timer-constants.ts (was duplicated as local constant in timers/route.ts and magic number in TimerPane.tsx) - Extract TIMER_COLUMNS constant in timer-db.ts (SQL column list was repeated in 3 SELECT queries) - Optimize stopTimersForWorktree to use in-memory timerWorktrees map instead of redundant DB query (KISS: data already available in memory) - Update tests to match refactored implementation Quality Metrics: - Coverage: 99% (maintained) - ESLint errors: 0 (maintained) - TypeScript errors: 0 (maintained) - Tests: 5329 passed (57 timer-specific, +1 new) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(timer): add design policy, review reports, and update module reference Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously the timer always used the first selected agent from AgentSettingsPane. Now users can choose which agent to send the delayed message to via a dropdown in the timer form. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add isRunning() check in executeTimer() to detect no-session state - Add TIMER_STATUS.NO_SESSION constant and i18n translations - Add session warning in POST API response (non-blocking) - Add worktreeId ownership check in DELETE API (SEC-001) - Add warning UI in TimerPane for session_not_running - Add unit tests for session check scenarios Resolves #539 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(timer): add history limit, pagination, and cleanup (#540) - Add DEFAULT_TIMER_HISTORY_LIMIT=50, MAX_TIMER_QUERY_LIMIT=100, TIMER_CLEANUP_RETENTION_DAYS=30 constants - Add cursor-based pagination to getTimersByWorktree (backward compatible) - Add cleanupOldTimers, clearTimerHistory, recoverStuckSendingTimers DB functions - Add automatic cleanup/recovery on initTimerManager startup - Add hasMore flag and before/limit query params to GET /timers - Add worktreeId ownership check to DELETE /timers (SEC-MF-001) - Add DELETE /timers/history endpoint for manual history clear - Add "Load more" and "Clear history" buttons to TimerPane - Add i18n keys for timer pagination/cleanup - All 5351 unit tests pass, 0 ESLint/TypeScript errors Resolves #540 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor(timer): improve TimerPane DRY and fix flaky boundary test - Extract startIntervals/stopIntervals helpers in TimerPane to eliminate duplicated interval setup logic across initial mount, visibility change resume, and cleanup - Fix flaky cleanupOldTimers boundary test that failed due to Date.now() drift between insert and cleanup calls; use fixed timestamps instead - Split boundary test into two deterministic cases (newer/older than cutoff) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(copilot): add GitHub Copilot CLI tool support - Create CopilotTool class with gh-based command and 2-stage isInstalled() check [SEC4-001] - Add getCommandForTool() to claude-executor for copilot->gh command mapping [DR2-001] - Derive ALLOWED_CLI_TOOLS from CLI_TOOL_IDS [DR2-002] - Add copilot to CLI_TOOL_IDS, CLI_TOOL_DISPLAY_NAMES, and CLI-side cli-tool-ids - Register CopilotTool in CLIToolManager - Add copilot patterns (placeholder) to cli-patterns.ts with switch case dispatch - Add copilot to response-poller completion detection and cleaning - Add cleanCopilotResponse to response-cleaner - Replace hardcoded tool name mappings in log-manager with CLI_TOOL_DISPLAY_NAMES - Add copilot to cmate-parser/validator permission handling - Add GH_DEBUG to env-sanitizer SENSITIVE_ENV_KEYS [SEC4-003] - Update all existing tests for 6-tool support Resolves #545 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(copilot): add design policy, review reports, and update references Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ction (#547) (#553) * fix(copilot): add builtin slash commands and selection window detection - Add COPILOT_SELECTION_LIST_PATTERN for detecting Copilot CLI selection UIs - Add getCopilotBuiltinCommands() with /model command (cliTools: ['copilot']) - Add STATUS_REASON.COPILOT_SELECTION_LIST and SELECTION_LIST_REASONS Set - Replace OR-chain with SELECTION_LIST_REASONS.has() in current-output route - Add 'builtin' to SlashCommandSource type - Add unit tests for all new functionality Resolves #547 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add design policy and review reports --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(mobile): enable vertical scrolling on mobile main container - Change overflow-hidden to overflow-y-auto on mobile layout main element - Remove dead code pb-32 class (overridden by inline style paddingBottom) - Add tests verifying mobile container CSS classes Resolves #548 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add design policy and review reports --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(worktree-info): add copy-to-clipboard for Path and Repository Path fields - Add ClipboardCopy/Check icons to Path and Repository Path in WorktreeInfoFields - Copy buttons show Check icon for 2s after successful copy, with timer cleanup - Add 10 unit tests covering copy, revert, rapid-click, unmount cleanup, and error handling Resolves #552 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add design policy and review reports --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor(test): improve mobile overflow test robustness (#548) Replace fragile source splitting approach with MobileContent-anchored regex matching for more resilient CSS class verification. Add guard test to detect parsing failures early. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add progress report and UAT report for #548 --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add overflow-hidden to mobile files container to constrain child height - Increase paddingBottom from 8rem to 12rem for input bar + tab bar clearance Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ion (#547) (#557) * fix(copilot): add builtin slash commands and selection window detection - Add COPILOT_SELECTION_LIST_PATTERN for detecting Copilot CLI selection UIs - Add getCopilotBuiltinCommands() with /model command (cliTools: ['copilot']) - Add STATUS_REASON.COPILOT_SELECTION_LIST and SELECTION_LIST_REASONS Set - Replace OR-chain with SELECTION_LIST_REASONS.has() in current-output route - Add 'builtin' to SlashCommandSource type - Add unit tests for all new functionality Resolves #547 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add design policy and review reports * fix(copilot): add all Copilot CLI slash commands and fix selection list pattern - Add 46 Copilot CLI interactive commands (was only /model) covering: models, agents, code, permissions, session, help, etc. - Fix COPILOT_SELECTION_LIST_PATTERN to also match inquirer-style "Enter to select · Tab/Arrow keys to navigate" footer pattern (Copilot CLI uses same @inquirer/prompts as Claude CLI) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… TUI output (#547) - Change COPILOT_SELECTION_LIST_PATTERN to detect "Search models..." and "Select Model" - Previous pattern expected inquirer-style footer text that Copilot CLI doesn't emit Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…547) (#558) * fix(copilot): add builtin slash commands and selection window detection - Add COPILOT_SELECTION_LIST_PATTERN for detecting Copilot CLI selection UIs - Add getCopilotBuiltinCommands() with /model command (cliTools: ['copilot']) - Add STATUS_REASON.COPILOT_SELECTION_LIST and SELECTION_LIST_REASONS Set - Replace OR-chain with SELECTION_LIST_REASONS.has() in current-output route - Add 'builtin' to SlashCommandSource type - Add unit tests for all new functionality Resolves #547 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add design policy and review reports * fix(copilot): add all Copilot CLI slash commands and fix selection list pattern - Add 46 Copilot CLI interactive commands (was only /model) covering: models, agents, code, permissions, session, help, etc. - Fix COPILOT_SELECTION_LIST_PATTERN to also match inquirer-style "Enter to select · Tab/Arrow keys to navigate" footer pattern (Copilot CLI uses same @inquirer/prompts as Claude CLI) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(copilot): prevent /model text leaking into selection list search field - Add SELECTION_LIST_COMMANDS set (model, agent, theme) in copilot.ts - For these commands, use sendKeys with Enter flag and wait for selection list to appear before returning - Prevents extra input from flowing into the search field after the selection list opens - Update tests to match origin/develop selection list pattern (Search models.../Select Model) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… detection window (#547) - terminal/route.ts: Use cliTool.sendMessage() for copilot to handle slash commands properly - status-detector.ts: Use cleanOutput instead of lastLines for copilot selection list detection (model list exceeds 15-line lastLines window) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ols (#547) - Reverts copilot-specific sendMessage routing that caused UI to freeze (waitForPrompt 15s + waitForSelectionList 5s blocked HTTP response) - All tools use sendKeys directly (non-blocking) - Selection list detection works via status-detector polling (cleanOutput) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…scope (#547) - cli-patterns.ts: Update COPILOT_PROMPT_PATTERN to match "❯ " with trailing text (was requiring line-end after ❯, but Copilot shows hint text after cursor) - status-detector.ts: Use 30-line window for copilot selection list detection (not full cleanOutput which matches scrollback buffer after list is closed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…547) - COPILOT_THINKING_PATTERN: Add "(Esc to cancel" for processing actions - COPILOT_SELECTION_LIST_PATTERN: Add "to navigate.*Enter to select" for trust dialog - status-detector: Copilot thinking detection runs before prompt detection (copilot keeps ❯ prompt visible during processing) - Use 15-line window for copilot thinking, 30-line for selection list Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…execution (#559) (#560) * fix(copilot): delegate all Copilot commands to sendMessage() in terminal API - Add Copilot delegation logic in terminal/route.ts (cliToolId === 'copilot') - Add 5 unit tests for Copilot delegation (slash commands, regular text, non-copilot unaffected, error handling, no invalidateCache) - Update CLAUDE.md module reference for terminal/route.ts - All 13 terminal-route tests pass, full suite 5423 tests pass Resolves #559 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add design policy and review reports for #559 --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(mobile): default to preview tab in mobile markdown viewer - Add useEffect to set mobileTab to 'preview' when isMobile is true - Add initialViewMode="split" to mobile MarkdownEditor in WorktreeDetailRefactored - Add dedicated test file for mobile default preview tab behavior Resolves #549 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add design policy and review reports for #549 * fix: sync package-lock.json --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mediate refresh - NavigationButtons: Add onKeysSent callback, trigger 100ms after key send - WorktreeDetailRefactored: Pass fetchCurrentOutput as onKeysSent to both desktop and mobile NavigationButtons - Eliminates up to 2s polling delay after pressing Up/Down/Enter/Esc buttons - Applies to all CLI tools (Claude, OpenCode, Copilot, Codex) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
) - terminal/route.ts: Revert copilot sendMessage delegation, use sendKeys for all tools - send/route.ts: Use sendKeys directly for copilot to avoid waitForPrompt blocking - Copilot's sendMessage().waitForPrompt() blocks 15s+ causing /model to fail - Other tools continue to use sendMessage() as before Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ect path - Copilot now uses sendKeys directly instead of sendMessage delegation - Updated 4 tests to verify sendKeys is called for copilot commands Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Key changes
be69adc3fix(copilot): use sendKeys directly in both terminal and send APIs8ab7914bfix(navigation): improve selection list button responsiveness153a65b0feat: mobile markdown viewer default preview (スマホ版にてmarkdownファイル表示時、初期表示をビューワにしてほしい #549)9429b09cfix(copilot): thinking detection and selection list patterns (fix: Copilot CLIのデフォルトスラッシュコマンドと選択ウィンドウが動作しない #547)Quality
Test plan
🤖 Generated with Claude Code