Skip to content

fix: Windows copy-paste, resize debounce, CLI upgrades#72

Merged
datasciencemonkey merged 5 commits intodatasciencemonkey:mainfrom
dgokeeffe:pr/misc-fixes
Mar 24, 2026
Merged

fix: Windows copy-paste, resize debounce, CLI upgrades#72
datasciencemonkey merged 5 commits intodatasciencemonkey:mainfrom
dgokeeffe:pr/misc-fixes

Conversation

@dgokeeffe
Copy link
Copy Markdown
Contributor

Summary

  • Windows copy-paste: Adds attachCustomKeyEventHandler to xterm.js so Ctrl+C/V work on Windows (previously intercepted as raw terminal control chars)
  • Resize debounce: Debounces terminal resize handler to prevent rapid-fire resize events
  • Claude Code CLI: Always upgrades to latest Claude Code CLI on startup (was pinned to stale version)
  • GitHub CLI: Installs gh CLI with wrapper to skip interactive prompts in PTY
  • Databricks CLI: Dynamically fetches and installs latest Databricks CLI release at startup (runtime image ships old v0.251.0)

Test plan

  • Test Ctrl+C (copy with selection) and Ctrl+V (paste) on Windows
  • Verify Ctrl+Shift+C/V also work
  • Confirm terminal resize doesn't flicker on rapid window resizing
  • Check Claude Code CLI upgrades on fresh app start
  • Verify Databricks CLI is latest version after startup
  • Test gh auth login works through the PTY wrapper

This pull request was AI-assisted by Isaac.

Prevents fitAddon.fit() from thrashing scroll position on every
resize pixel. Adds explicit scrollback and scrollOnUserInput.

Co-authored-by: Isaac
Previously skipped install if binary existed, leaving stale versions
across redeployments.

Co-authored-by: Isaac
xterm.js intercepts Ctrl+V/C as raw control characters on non-Mac
platforms. Added attachCustomKeyEventHandler to let the browser handle
Ctrl+V (paste), Ctrl+C (copy when text selected), and Ctrl+Shift+C/V.
Also added clipboard section to shortcuts help with platform-aware
labels (Cmd on Mac, Ctrl on Windows) and upload toast for image paste.

Co-authored-by: Isaac
Runtime image ships an older CLI (v0.251.0). Added a setup step that
fetches the latest release from GitHub API and installs it to
~/.local/bin, same pattern as the GitHub CLI install.

Co-authored-by: Isaac
Comment thread app.py Outdated
Comment thread app.py Outdated
Move inline bash from app.py into install_gh.sh and
install_databricks_cli.sh, matching the install_micro.sh pattern.

The gh script now fetches the latest version dynamically instead of
hardcoding v2.74.1, and fixes a bug in the auth wrapper where the
`gh auth login` handler fell through to `exec gh.real "$@"` with
shifted args (added `exit 0`).

Co-authored-by: Isaac
@mpkrass7
Copy link
Copy Markdown
Collaborator

mpkrass7 commented Mar 19, 2026

@dgokeeffe Let me know when you've deployed / tested your changes on dogfood. Once you confirm I'll test on my end and we can get this merged.
We spun up a Contributing guide, let me know if it's helpful!
https://github.com/datasciencemonkey/coding-agents-databricks-apps/blob/main/CONTRIBUTING.md

@datasciencemonkey
Copy link
Copy Markdown
Owner

Testing this on Databricks Apps — merged cleanly with current main (including session linger, FD leak fix, and upload limit from PR #77). All existing tests pass.

@datasciencemonkey datasciencemonkey merged commit e7e7e77 into datasciencemonkey:main Mar 24, 2026
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.

3 participants