Skip to content

release: merge develop into main (Issues #372, #373, #374, #376)#381

Merged
Kewton merged 20 commits intomainfrom
develop
Feb 28, 2026
Merged

release: merge develop into main (Issues #372, #373, #374, #376)#381
Kewton merged 20 commits intomainfrom
develop

Conversation

@Kewton
Copy link
Owner

@Kewton Kewton commented Feb 28, 2026

Summary

Changes

Bug Fixes

  • Codex CLI prompt detection: added MAX_CONTINUATION_LINES=5 to prevent infinite scan in indented TUI output, bufferReset flag in ExtractionResult to handle tmux buffer shrinking
  • External Apps proxy: buildUpstreamUrl() now preserves /proxy/{pathPrefix} in upstream URL, matching the design requirement for basePath-configured apps
  • Mobile: safe-area-inset-top support, CMATE tab header visibility, main content padding adjustment

New Features

  • Vibe Local --context-window option: DB column vibe_local_context_window, UI input in AgentSettingsPane, API support in PATCH /api/worktrees/[id]
  • AGENTS.md for Codex workflow guidance

Infrastructure

  • DB migration v20: vibe_local_context_window column
  • New CLI tool type helpers (getContextWindowFlag(), isContextWindowSupported())

Test plan

  • Codex CLI prompts appear correctly in CommandMate UI
  • Vibe Local context window setting persists and applies to session
  • External Apps proxy routes correctly to basePath-configured apps
  • Mobile UI displays correctly with safe-area-inset

🤖 Generated with Claude Code

Kewton and others added 20 commits February 27, 2026 00:28
On notched iPhones, MobileHeader uses pt-safe which adds
safe-area-inset-top padding. The Auto-Yes row and main content
padding did not account for this, causing CMATE sub-tabs
(Notes/Schedules/Agent) to be hidden behind fixed elements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Auto-Yes row actual height (53px) was larger than the estimated
value, causing sub-tabs to overlap by 9px. On iPhones with safe-area
inset (~47px), the overlap increased to ~56px, hiding CMATE sub-tabs
entirely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codex CLI uses › (U+203A) as default option indicator instead of ❯ (U+276F).
Added U+203A to DEFAULT_OPTION_PATTERN and barrier check so Codex command
confirmation prompts are detected as multiple_choice and trigger the popup.

Closes #372

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codex command confirmation prompts (› 1. Yes, proceed) were matching
CODEX_PROMPT_PATTERN, causing isCodexOrGeminiComplete to fire and
truncating the response before prompt options. Extended early prompt
detection check to include Codex so prompts are detected before the
completion path fires.

Refs #372

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
docs: add AGENTS.md for codex workflow guidance
…truncated re-detection

When extractResponse() early check detects a Codex prompt using the full tmux
output, the detection result is now carried through ExtractionResult.promptDetection
to checkForResponse(). This prevents the second detectPromptWithOptions() call
from failing due to the extracted portion (from lastCapturedLine) potentially
missing the › indicator line.

Root cause: Codex TUI renders prompts progressively. When CODEX_PROMPT_PATTERN
matches the › line before all options are rendered, isCodexOrGeminiComplete fires
and extraction stops at the › line. The response is saved as type=normal with
lineCount=endIndex. On the next poll, the early detection finds the full prompt
but buildPromptExtractionResult only extracts from lastCapturedLine onwards,
potentially excluding the › indicator line from the extracted content.

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

Two issues prevented Codex CLI confirmation prompts from being detected:

1. Prompt detector continuation line scan traversed entire command output
   because Codex TUI indents all lines with 2 spaces, matching
   isContinuationLine(). This caused numbered lists in body text to be
   collected as false options, breaking isConsecutiveFromOne() validation.
   Fixed by adding MAX_CONTINUATION_LINES=5 limit.

2. Buffer reset (TUI redraw) caused lineCount < lastCapturedLine, triggering
   the duplicate prevention check incorrectly. Fixed by propagating
   bufferReset flag through ExtractionResult and skipping duplicate checks
   when buffer reset is detected.

Also added logging for silent session-not-running poller stops.

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

- Add VIBE_LOCAL_CONTEXT_WINDOW_MIN/MAX constants and isValidVibeLocalContextWindow()
  type guard to types.ts (DRY: shared between API and CLI layers)
- Add vibeLocalContextWindow field to Worktree interface (models.ts)
- Add DB migration v20: vibe_local_context_window INTEGER DEFAULT NULL column
- Add updateVibeLocalContextWindow() DB function; update getWorktrees/getWorktreeById
  SELECT statements (6 modification points)
- Add PATCH API validation for vibeLocalContextWindow with isValidVibeLocalContextWindow()
- Add --context-window CLI argument in vibe-local.ts startSession() with defense-in-depth
  validation and Number() cast for template literal safety
- Add Context Window number input UI in AgentSettingsPane (vibe-local only)
- Add i18n keys (en/ja) for vibeLocalContextWindow and vibeLocalContextWindowDefault
- Props propagation through NotesAndLogsPane and WorktreeDetailRefactored
- Add unit tests for isValidVibeLocalContextWindow() (21 test cases)
- Update db-migrations.test.ts CURRENT_SCHEMA_VERSION expectations to 20
- Update component test props factories

Resolves #374

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

- Replace hardcoded min/max values (128/2097152) in AgentSettingsPane
  with VIBE_LOCAL_CONTEXT_WINDOW_MIN/MAX constants (DRY principle)
- Use constant-derived error message in API route validation
- Handle NaN from parseInt in client-side context window input
- Align migration v20 down-message style with v19 pattern
- Add boundary and invariant tests for context window constants
- Add OLLAMA_MODEL_PATTERN validation tests (defense-in-depth coverage)

Quality Metrics:
- TypeScript errors: 0
- ESLint errors: 0
- Tests: 4057 -> 4079 (22 new tests added)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update module descriptions for types.ts, vibe-local.ts, and
AgentSettingsPane.tsx with Issue #374 changes. Add design policy,
review reports, work plan, and TDD results.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: add --context-window setting for Vibe Local (#374)
The context window input was firing API calls on every keystroke,
causing intermediate values (below min 128) to be rejected by the
server. Since the input is a controlled component, React would revert
the input to the previous prop value, making typing impossible.

Fix by decoupling input state from the parent prop:
- onChange updates local state only (free typing)
- onBlur sends the final value to the API
- Reverts to previous value on API failure or network error
- Skips API call if value hasn't changed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(#374): use local state + onBlur for context window input
… apps

- Fix path construction in route.ts to forward /proxy/{pathPrefix}/... to upstream
- Remove double prefix in logger.ts log message construction
- Update JSDoc and comments in handler.ts to reflect new behavior
- Update logger.test.ts test data to use full path format
- Add new test in handler.test.ts for proxy prefix forwarding
- Add route.test.ts integration tests for pathPrefix preservation

Resolves #376

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract common mock setup in route.test.ts into createMockApp() and
setupProxyMocks() helpers to reduce duplication (DRY). Remove unused
http-proxy mock from handler.test.ts (dead code from prior implementation).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(#376): preserve pathPrefix in proxy route for basePath-configured apps
@Kewton Kewton merged commit 44dfe18 into main Feb 28, 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