Skip to content

fix: 11 bugs found via CDP-driven visual dogfooding - #12

Open
ohernandezdev wants to merge 1 commit into
mainfrom
fix/qa-dogfooding-batch
Open

fix: 11 bugs found via CDP-driven visual dogfooding#12
ohernandezdev wants to merge 1 commit into
mainfrom
fix/qa-dogfooding-batch

Conversation

@ohernandezdev

Copy link
Copy Markdown
Owner

Summary

Two rounds of dogfooding on the real app (build + WebView2 CDP debug port + Playwright driving a live Claude Code tab, plus static code review) turned up 11 real bugs. All fixed here.

Confirmed live (reproduced with the real build before and after the fix):

  • Close-tab confirm dialog resolved Enter to the destructive action even while "Cancel" had visible keyboard focus.
  • F5/Ctrl+R silently killed every open PTY session with no confirmation.
  • Closing a tab jumped to the last-created tab instead of the visual neighbor.

Found by static review, fixed, verified by typecheck/cargo check:

  • git_status/detect_clis ran blocking process I/O directly on Tauri's shared async runtime (no spawn_blocking), unlike write_pty's already-documented pattern for the same hazard.
  • Declining the session-restore banner never retried the Claude Code auto-launch check.
  • File preview panel had no sequence guard on its async reads — clicking file A then quickly file B could let A's late response overwrite B's preview, and "Save" would then write A's content to B's path.
  • Command palette's clearSugs() didn't invalidate sugSeq, so late list_dir responses could repopulate suggestions after the palette reopened empty.
  • Tray "Quit" killed PTYs and exited before the debounced session-journal write (500ms) could flush, risking loss of the most recent tab layout change.
  • Hook server startup failures were only eprintln!'d — invisible in the packaged .exe — leaving notifications silently disabled.
  • Onboarding tour step 3 measured the spotlight position mid-CSS-transition, before the file preview panel finished sliding in.
  • HUD tooltip language only resynced on the next agent state transition instead of immediately when settings changed in the main window.

Test plan

  • npx tsc --noEmit clean
  • cargo check --release clean
  • Live regression pass via CDP driver on the built exe: terminal geometry, confirm-dialog focus/Enter, F5 reload confirmation, close-middle-tab neighbor selection — all verified with screenshots before/after
  • Manual click-through of file preview / palette reopen / tray Quit (not automatable via CDP — canvas-rendered terminal text and native tray menu)

🤖 Generated with Claude Code

- Close-tab confirm dialog: Enter now resolves to whichever button is
  actually focused (Cancel by default) instead of always confirming the
  destructive action, which silently killed live sessions on a stray Enter.
- F5/Ctrl+R now route through the same confirm dialog instead of the
  beforeunload handler silently killing every open PTY.
- Closing a tab now activates its visual neighbor instead of always the
  last-created tab.
- git_status/detect_clis moved onto spawn_blocking, matching write_pty's
  existing pattern — both ran synchronous process I/O directly on Tauri's
  shared async runtime, and git_status polls every 5s per tab.
- Declining the session-restore banner now retries the Claude Code
  auto-launch check, which previously only ran once at boot.
- File preview panel: guard against out-of-order async reads (previewSeq)
  so clicking file A then quickly file B could no longer have A's late
  read_text_file response overwrite B's preview and get saved to B's path
  on Edit -> Save.
- Command palette: clearSugs() now bumps sugSeq, so a late list_dir
  response from before the palette closed can't repopulate suggestions
  after it reopens empty.
- Tray "Quit" now flushes the debounced session journal (emits
  quit-requested, frontend writes synchronously, then calls the new
  confirm_quit command) instead of killing PTYs and exiting immediately,
  which could drop the last layout change made within the 500ms debounce.
- Hook server startup failures (port bind, config dir, file write) now
  surface a "Notifications disabled" banner instead of only an eprintln!
  invisible in the packaged .exe.
- Onboarding tour step 3 (file preview) now waits for the panel's ~0.2s
  slide-in transition before measuring the spotlight position.
- HUD tooltip now resyncs on the native `storage` event, so a language
  change reaches it immediately instead of waiting for the next agent
  state transition.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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