Skip to content

Releases: vibe-coding-labs/vibe-focus

v0.0.22

05 May 19:16

Choose a tag to compare

What's Changed

Performance

  • Restore performance optimized: Replaced all fixed usleep() waits with poll-based verification in SpaceController, ToggleEngine, and WindowManager restore paths. Estimated improvement from ~2.5s to ~500-800ms.
  • Hotkey cooldown reduced: Toggle cooldown reduced from 800ms to 50ms, dedup interval from 400ms to 150ms. Rapid hotkey presses no longer get ignored.

Observability

  • Full traceID logging: Added traceID propagation through the entire restore pipeline (HookEventHandler → ToggleEngine → SpaceController). Each operation can now be traced end-to-end in vibefocus-events.jsonl.
  • Duration markers: Added resolveDurationMs, terminalResolveMs, preRestoreMs, restoreMs, totalMs fields to key log points for performance diagnosis.

Bug Fixes

  • Fixed misleading token regeneration warning in SettingsUI

Full Changelog: v0.0.21...v0.0.22

v0.0.21

05 May 16:36

Choose a tag to compare

Bug Fixes

  • fix(restore): prevent unnecessary space switch when target display already on correct space — ToggleEngine.restore was comparing the window's current space (space 1 on main screen) against the target space, instead of checking the target display's visible space. This caused every UserPromptSubmit restore to trigger an unwanted focusSpace (Ctrl+Left/Right) that changed the wrong display's workspace. Now uses displayVisibleSpace() for the correct comparison and switchDisplayToSpace() for targeted switching.

🤖 Generated with Claude Code

v0.0.20

05 May 16:20

Choose a tag to compare

What's Changed

Major: Toggle/Restore Rewrite with Correct Space Switching

  • Rewrite restore space switching: check target display's current space BEFORE applying AX frame, switch via yabai/CGEvent if needed, then apply frame
  • Fix display center mapping: query yabai display frame instead of wrong NSScreen.screens[displayIndex-1] index mapping (NSScreen order ≠ yabai order)
  • Add CGEvent fallback: when yabai space --focus fails (needs scripting-addition), move cursor to target display via yabai frame → Ctrl+Left/Right → restore cursor
  • Add ToggleEngine: SQLite-backed toggle/restore replacing in-memory registry, using windowID-based lookup

Data & Storage

  • Migrate from dual-table to unified windows table with PK=(pid, tty)
  • Migrate window state and session bindings from UserDefaults to SQLite
  • Store cwd and model in windows table, add window-closure cleanup
  • Add completed_at column, fix iterm_session_id always NULL

Bug Fixes

  • Add windowID mismatch check in handleUserPromptSubmit
  • Add window position validation before restore to prevent wrong-window movement
  • Add windowID-based matching in updateToggleState when tty is nil
  • Add PID validation to prevent cross-process window mismatch
  • Resolve AX windowNumber at bind time when available
  • Resolve PID-only toggle state lookup when tty is nil
  • Fix binding: remove ALL fuzzy/fallback matching — only precise binding
  • Add 30s debounce to Stop handler
  • Auto-sync hook-config.json on startup to prevent token mismatch 401
  • Fix spaces: detect scripting-addition load status on startup

Refactoring

  • Split WindowManagerSupport (1882→0 lines) and ClaudeHookServer into focused modules
  • Cleanup legacy session_bindings table, cap window_states growth

Full Changelog: v0.0.19...v0.0.20

v0.0.19

02 May 05:44

Choose a tag to compare

What's Changed

Bug Fixes

  • fix(restore): fix crash, state save, and admin prompt bugs; optimize restore perf — 修复 EXC_BAD_ACCESS 崩溃、状态保存错误和管理员权限提示循环问题,优化恢复性能

Features

  • feat(crash): install POSIX signal handlers to capture fatal signal context on crash — 安装 POSIX 信号处理器,在崩溃时捕获致命信号上下文,便于诊断

Performance

  • perf(log): default to debug log level for detailed diagnostics — 默认启用 debug 级别日志,便于问题诊断
  • perf(logging): add dense debug-level logging across all 21 source files — 在所有 21 个源文件中添加 debug 级别日志
  • perf(logging): add ultra-dense debug logging in critical paths (+854 lines) — 在关键路径添加超密集 debug 日志

Full Changelog

v0.0.18...v0.0.19

v0.0.18

12 Apr 19:00

Choose a tag to compare

What's Changed

Bug Fixes

  • fix(window-matching): replace JXA TTY matching with CGWindowList + process info — JXA Application('Terminal') 从 VibeFocus.app 进程调用时始终失败 (Error -2700),导致终端上下文匹配完全失效。新方案通过 ps 获取 TTY 上的进程 PID,通过 lsof 获取 CWD,再通过 CGWindowList 匹配终端窗口标题,完全避免 JXA/AppleScript。
  • fix(hooks): add cwd-based matching before focused window fallback in SessionStart — SessionStart 绑定窗口时,在焦点窗口回退之前增加 cwd 项目名匹配策略,改善多会话场景下的窗口绑定准确率(从 ~25% 提升到更高)。
  • fix(hooks): add 3-second cooldown to prevent rapid hook re-installation — 防止 hook 安装在短时间内被重复调用 6 次导致 settings.json 写入竞争。
  • fix(move): use yabai display info instead of AX frame for main-screen skip check — 非可见工作区上的窗口 AX frame 不可靠,改用 yabai display 信息判断窗口是否在主屏。
  • fix(space): focusSpace CGEvent fallback moves cursor when cross-display steps=0 — 当目标 space 在目标显示器上已可见但全局焦点不在该显示器时,通过移动光标切换活跃显示器。

Full Changelog

v0.0.17...v0.0.18

VibeFocus v0.0.11

12 Apr 10:51

Choose a tag to compare

What's New

Terminal Context-Based Window Matching

  • Command-type hooks: Migrated from HTTP hooks to command-type hooks with a helper script (~/.vibefocus/hook-forwarder.sh) that captures terminal environment variables (TERM_SESSION_ID, TTY, PPID, WINDOWID)
  • Precise multi-session matching: VibeFocus can now correctly identify which terminal window corresponds to which Claude Code session, even when multiple sessions run on different workspaces
  • TTY-based matching: JXA queries for Terminal.app and iTerm2 to match windows by TTY device
  • Process tree matching: Walks up the PPID chain to find terminal/IDE ancestor processes

Bug Fixes

  • Token auth fix: GCDWebServer preserves HTTP header casing — fixed with case-insensitive lookup and query parameter fallback
  • Skip move when already on main screen: Avoids overwriting saved state when window is already at target position

New Features

  • UserPromptSubmit auto-restore: Automatically restores terminal window to its original screen/position when submitting a new prompt in Claude Code
  • Three-level window matching: SessionStart binding → terminal context → cwd project name fallback
  • SpaceController improvements: Multi-strategy workspace focus with CGEvent fallback for reliable space switching

🤖 Generated with Claude Code

VibeFocus v0.0.10

20 Mar 18:26

Choose a tag to compare

  • Tall card layout: 556x900 (golden ratio 1.618:1)

VibeFocus v0.0.9

20 Mar 18:19

Choose a tag to compare

  • Settings window uses golden ratio: 1456x900 (1.618:1)

VibeFocus v0.0.8

20 Mar 18:15

Choose a tag to compare

  • Increase settings window width from 960px to 1140px

VibeFocus v0.0.7

20 Mar 15:45

Choose a tag to compare

  • Increase settings window width from 820px to 960px