Skip to content

fix(drive): repair open runtime bugs - #100

Merged
kitlangton merged 4 commits into
mainfrom
fix/open-runtime-bugs
Sep 19, 2026
Merged

kitlangton merged 4 commits into
mainfrom
fix/open-runtime-bugs

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Why

Four independent runtime edges currently fail silently or misleadingly: chord-shaped press keys are typed as text, empty outer script errors hide useful nested causes, source-checkout programs lose the default-config asset during compilation, and screenshots omit terminal images.

What Changes

Before After
ui.press("ctrl+u") types ctrl+u fails immediately with UiPressError and directs callers to { ctrl: true }
Error("", { cause }) logs a blank line prints the nested cause chain
relative source imports fail on default-config.jsonc default config is bundled as TypeScript data
captured image planes are ignored screenshots composite RGBA planes at their terminal-cell placement

UiPressError widens only the press operation. The canonical wire request remains { key, modifiers }; no chord alias or protocol convenience shape is added.

Image capture boundary

Drive accepts the optional CapturedFrame.images field introduced by OpenCode #49868. Older endpoints omit the field and retain existing text-only behavior; newer endpoints supply planes that Drive draws beneath its cursor and keypress overlays.

Scope

This closes #70, #71, and #77. It addresses the Drive half of #56; complete image evidence requires the companion OpenCode protocol PR.

Verification

cd packages/drive
bun run check
bun run test
  • 277 Effect/unit tests pass.
  • 62 CLI integration tests pass.
  • Each bug has a regression test that failed before its corresponding implementation.
  • The screenshot test decodes the generated PNG and verifies the captured image pixel.

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.

ui.press: chord strings like "ctrl+u" are typed literally

1 participant