Skip to content

feat: add 'w' keybinding to open task in OpenCode web UI#107

Merged
TomCC7 merged 2 commits into
mainfrom
feature/calm-ember-234
Mar 25, 2026
Merged

feat: add 'w' keybinding to open task in OpenCode web UI#107
TomCC7 merged 2 commits into
mainfrom
feature/calm-ember-234

Conversation

@TomCC7
Copy link
Copy Markdown
Owner

@TomCC7 TomCC7 commented Mar 25, 2026

This PR adds the ability to open a selected task's OpenCode session directly in the web browser using the 'w' keybinding.

Changes

  • Keyboard shortcut: Press 'w' on the board to open the selected task in your default browser
  • Web UI URL format:
  • Dependencies: Added 'open' crate for cross-platform browser launching and 'base64' for path encoding

Files Modified

    • Added 'open' and 'base64' dependencies
    • Added OpenInWeb action with 'w' binding
    • Added OpenSelectedTaskInWeb message
    • Wired key handler
    • Added message handler
    • Added opencode_open_in_web function

Usage

  1. Select a task on the kanban board
  2. Press 'w' to open the OpenCode web UI in your default browser
  3. The task must have a worktree path and opencode session ID to work

- Add 'open' and 'base64' dependencies for browser launching
- Add OpenInWeb KeyAction and 'w' binding in BOARD_DEFS
- Add OpenSelectedTaskInWeb message variant
- Implement opencode_open_in_web function with base64-encoded worktree path
- Wire up key handler and update function
- Display in help and command palette

The web UI URL format is: http://127.0.0.1:4096/{base64_worktree_path}/session/{session_id}
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/opencode/mod.rs 61.11% 7 Missing ⚠️
src/app/update.rs 0.00% 6 Missing ⚠️
src/keybindings.rs 63.63% 4 Missing ⚠️
src/app/input/key.rs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

- Add test for OpenInWeb keybinding (key 'w' resolves correctly)
- Add test for opencode_open_in_web URL generation
- Verify base64 encoding and URL format correctness
@TomCC7 TomCC7 merged commit 94fbeb6 into main Mar 25, 2026
3 checks passed
@TomCC7 TomCC7 deleted the feature/calm-ember-234 branch April 12, 2026 18:24
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.

2 participants