Skip to content

feat: Issue #286, #287, #288 の機能追加・バグ修正#297

Merged
Kewton merged 25 commits intomainfrom
develop
Feb 17, 2026
Merged

feat: Issue #286, #287, #288 の機能追加・バグ修正#297
Kewton merged 25 commits intomainfrom
develop

Conversation

@Kewton
Copy link
Owner

@Kewton Kewton commented Feb 17, 2026

Summary

Changes

  • 147ファイル変更(+15,770 / -328)
  • 設計レビュー・Issueレビュー・受入テスト報告書を含む

Test plan

  • 単体テスト(MessageInput, SlashCommandSelector, useAutoYes, prompt-answer-sender, prompt-response-body-builder)
  • 結合テスト(issue-288-acceptance, worktree-detail-integration, prompt-response-verification)
  • TypeScript型チェック通過
  • ビルド成功確認

🤖 Generated with Claude Code

Kewton and others added 25 commits February 15, 2026 22:42
…ponse API

When promptCheck re-verification fails (capture error), the API now falls
back to body.promptType and body.defaultOptionNumber to determine whether
cursor-key navigation should be used for Claude Code multiple-choice prompts.
This prevents the bug where a failed re-verification causes multiple_choice
prompts to be sent as plain text instead of cursor keys.

- route.ts: Accept optional promptType/defaultOptionNumber in request body;
  use as fallback when promptCheck is null
- WorktreeDetailRefactored.tsx: Include promptType and defaultOptionNumber
  in handlePromptRespond request body from state.prompt.data
- useAutoYes.ts: Include promptType and defaultOptionNumber in auto-response
  request body to prevent same bug in auto-yes path
- Tests: Add 6 unit tests for fallback behavior, 6 tests for useAutoYes hook,
  and 2 integration tests for request body validation

Resolves #287

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ve coverage

Extract duplicated prompt-response request body construction logic
from useAutoYes hook and WorktreeDetailRefactored into shared
buildPromptResponseBody() utility (DRY principle).

Extract buildNavigationKeys() helper in route.ts to eliminate
duplicated cursor offset-to-direction-keys logic between
multi-select and single-select code paths.

Add CHECKBOX_OPTION_PATTERN constant to replace inline regex
duplication for checkbox-style option detection.

Add comprehensive tests for previously uncovered paths:
- Session not running error (400)
- Multi-select checkbox prompt navigation
- sendKeys/sendSpecialKeys error handling (500)
- Malformed JSON body (outer catch)
- Non-Error thrown from sendKeys

Quality Metrics:
- route.ts Lines: 73.84% -> 100%
- route.ts Branches: 69.04% -> 92.1%
- route.ts Functions: 80% -> 100%
- ESLint errors: 0 -> 0
- TypeScript errors: 0 -> 0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…orts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(#287): promptCheck再検証失敗時のフォールバック不備修正
This reverts commit 4ef4018, reversing
changes made to d7deb09.
…ponse API

When promptCheck re-verification fails (capture error), the API now falls
back to body.promptType and body.defaultOptionNumber to determine whether
cursor-key navigation should be used for Claude Code multiple-choice prompts.
This prevents the bug where a failed re-verification causes multiple_choice
prompts to be sent as plain text instead of cursor keys.

- route.ts: Accept optional promptType/defaultOptionNumber in request body;
  use as fallback when promptCheck is null
- WorktreeDetailRefactored.tsx: Include promptType and defaultOptionNumber
  in handlePromptRespond request body from state.prompt.data
- useAutoYes.ts: Include promptType and defaultOptionNumber in auto-response
  request body to prevent same bug in auto-yes path
- Tests: Add 6 unit tests for fallback behavior, 6 tests for useAutoYes hook,
  and 2 integration tests for request body validation

Resolves #287

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ve coverage

Extract duplicated prompt-response request body construction logic
from useAutoYes hook and WorktreeDetailRefactored into shared
buildPromptResponseBody() utility (DRY principle).

Extract buildNavigationKeys() helper in route.ts to eliminate
duplicated cursor offset-to-direction-keys logic between
multi-select and single-select code paths.

Add CHECKBOX_OPTION_PATTERN constant to replace inline regex
duplication for checkbox-style option detection.

Add comprehensive tests for previously uncovered paths:
- Session not running error (400)
- Multi-select checkbox prompt navigation
- sendKeys/sendSpecialKeys error handling (500)
- Malformed JSON body (outer catch)
- Non-Error thrown from sendKeys

Quality Metrics:
- route.ts Lines: 73.84% -> 100%
- route.ts Branches: 69.04% -> 92.1%
- route.ts Functions: 80% -> 100%
- ESLint errors: 0 -> 0
- TypeScript errors: 0 -> 0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…orts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The fallback condition `(promptCheck === null && bodyPromptType === 'multiple_choice')`
only covered the case when promptCheck was null. When promptCheck was non-null but
its type was not 'multiple_choice' (e.g., 'yes_no'), the fallback did not activate,
causing cursor-key navigation to be skipped. Simplified the condition to
`|| bodyPromptType === 'multiple_choice'` which correctly falls back in all cases
where promptCheck does not provide multiple_choice data. Added 2 new test cases
for the type mismatch and undefined promptData scenarios.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(#287): promptCheck再検証失敗時のフォールバック不備修正
…-key logic duplication

Bug2: route.ts and auto-yes-manager.ts had fully duplicated cursor-key
sending logic. When Bug1 fix (fallbackPromptType) was applied to route.ts,
auto-yes-manager.ts was missed. Extract shared sendPromptAnswer() into
src/lib/prompt-answer-sender.ts to ensure both modules use identical logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tection

Add U+276F (❯) barrier in Pass 2 backward scan of detectMultipleChoicePrompt().
When no options have been collected and the line starts with ❯ but does not
match DEFAULT_OPTION_PATTERN, scanning stops to prevent historical numbered
lists from being falsely detected as active prompts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(#287): プロンプト検出の誤検出防止とカーソルキーロジック統合
Restructure both English and Japanese READMEs to serve as effective
GitHub landing pages, following 11 improvement points from Issue #286.

Key changes:
- Add badges (npm version, downloads, license, CI)
- Consolidate catchphrase to single line with 3 benefit bullet points
- Add "Who is this for?" and "What makes it unique?" sections
- Compress Quick Start to 3 copy-paste steps
- Add Troubleshooting section (CLI path, port, tmux session inspection)
- Add Mermaid architecture diagram (How it works)
- Add Use Cases section (commute, childcare, parallel dev)
- Reorganize Security section with recommended/prohibited configurations
- Reorganize FAQ (move items to relevant sections)
- Add screenshots in <details> fold, manual TOC, Status: Beta
- Add tmux session naming convention and direct inspection commands
- Fix broken security-guide.md link path
- Add Gemini CLI to supported tools list

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Expand CLI Commands section from 6 to 30+ commands organized by category:
- Basic: init/start/stop/status with all options (--force, --dev, etc.)
- Worktree: --issue and --auto-port for parallel development
- GitHub Issue: create/search/list with template options (requires gh CLI)
- Documentation: docs command with --section/--search/--all

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add --question, --title, --body, --labels options for issue create command
in both English and Japanese README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
docs(#286): improve README and add complete CLI command reference
…ring custom command input

- Add isFreeInputMode useState to MessageInput component
- Set flag true in handleFreeInput(), reset in submitMessage/handleCommandCancel/empty message
- Skip selector display logic in handleMessageChange when isFreeInputMode is true
- Guard mobile command button to reset isFreeInputMode before showing selector (Stage 2 SF-001)
- Add 7 test cases (TC-1 through TC-7) covering all free input mode transitions
- Coverage: MessageInput.tsx 89% statements, 84% branches

Resolves #288

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…coverage

Apply DRY principle to MessageInput test code by extracting shared mock
data, default props, and user-interaction helpers into a new shared module
(tests/helpers/message-input-test-utils.ts). Add coverage-improving tests
for IME composition edge cases (timeout clearing, justFinishedComposing
reset), error handling, and default cliToolId fallback.

Improvements:
- Extract shared test utilities (mockCommandGroups, createDefaultProps,
  DOM query helpers, user interaction helpers) to eliminate duplication
  between unit tests and acceptance tests
- Add @tests path alias to tsconfig.json and vitest.config.ts
- Add tests for IME composition timeout clearing (lines 100-101, 114-115)
- Add test for justFinishedComposing timeout expiry (line 118)
- Add tests for error handling and whitespace-only message guard
- Add test for default cliToolId fallback when prop is omitted
- Fix onMessageSent mock typing for strict TypeScript compliance

Quality Metrics:
- MessageInput.tsx Statement Coverage: 93.61% -> 100%
- MessageInput.tsx Branch Coverage: 86.20% -> 96.55%
- MessageInput.tsx Function Coverage: 92.85% -> 100%
- MessageInput.tsx Line Coverage: 93.61% -> 100%
- Test count: 28 -> 33 (+5 new tests)
- ESLint errors: 0
- TypeScript errors: 0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add design policy document for isFreeInputMode fix
- Add issue review reports (hypothesis verification, multi-stage review)
- Add design review reports (consistency, impact, security)
- Add work plan, TDD results, acceptance test results, and progress report
- Update CLAUDE.md with MessageInput.tsx and test helper entries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(#288): Enter custom command選択後のセレクター再表示バグ修正
…to free input mode

- Conditionally register SlashCommandSelector document-level keyboard
  listener only when isOpen=true to prevent Enter key interception
- Allow Enter key submission in isFreeInputMode even when selector is open
- Pass filter text from SlashCommandSelector to handleFreeInput so typed
  text carries over to textarea (e.g., typing "aiueo" in filter results
  in "/aiueo" in textarea)
- Add TC-8/TC-9 tests for free input Enter submission and selector guard

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(#288): resolve Enter key interception and filter text carry-over in free input mode
@Kewton Kewton merged commit f39d766 into main Feb 17, 2026
10 checks passed
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