Skip to content

[alpha] shells - mostly backend related setup#1831

Merged
KCarretto merged 10 commits intomainfrom
feat/shellv2-backend
Feb 18, 2026
Merged

[alpha] shells - mostly backend related setup#1831
KCarretto merged 10 commits intomainfrom
feat/shellv2-backend

Conversation

@KCarretto
Copy link
Collaborator

image

KCarretto and others added 8 commits February 16, 2026 21:31
…end (#1824)

- Update `Shell` ent schema to make task optional and add `ShellTask` relation.
- Create `ShellTask` ent schema with history mixin.
- Update `portal.proto` to include `ShellPayload`.
- Add `createShell` mutation to GraphQL schema and implement resolver.
- Implement `ShellV2Handler` with WebSocket upgrade, shell verification, auth check, and pubsub integration.
- Update `tavern/app.go` to register new endpoint.
- Update `ShellV2` frontend to verify shell status via GraphQL and handle errors.
- Fix generated resolvers to avoid panics.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
- Update `ShellPayload` in `portal.proto` to include `stream_id` for multi-user session tracking.
- Implement `writeMessagesFromWebsocket` in `tavern/internal/http/shell/handler.go` to handle user input, create `ShellTask` ents, and route messages to active portals or queue them if no portal is active.
- Implement `writeMessagesFromShell` to handle output from portals (interactive) or DB polling (non-interactive), with support for "Other Stream" output notifications.
- Add `WebsocketMessageKindOutputFromOtherStream` and associated message struct in `websocket.go`.
- Add integration tests in `tavern/internal/http/shell/integration_test.go` covering interactive, non-interactive, and multi-user scenarios.
- Fix WebSocket handler to accept both `TextMessage` and `BinaryMessage` frames.
- Ensure thread-safe access to `activePortal` state using `ShellSession`.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
* feat: update ShellV2 to use typed WebSocket protocol and improved output rendering

- Created `tavern/internal/www/src/pages/shellv2/websocket.ts` to mirror backend WebSocket message types.
- Updated `headless-adapter.ts` to use typed messages and correct input format.
- Refactored `ShellV2` component to handle asynchronous output by clearing and redrawing the input line.
- Implemented specific handling for task errors (red) and control flow messages.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* minor changes

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
@KCarretto KCarretto requested a review from hulto February 18, 2026 02:04
@KCarretto KCarretto marked this pull request as ready for review February 18, 2026 02:04
@KCarretto KCarretto requested a review from Cictrone February 18, 2026 02:08
@KCarretto KCarretto enabled auto-merge February 18, 2026 02:08
@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
2607    ±0 2607    ±0 0    ±0 0    ±0 0    ±0 0    ±0 1ms    ±0

Previous Results

Build 🏗️ Result 🧪 Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
#1017 2607 2607 0 0 0 0 43.4s

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
2607 0 0 5.2s

Slowest Tests

Test 📝 Results 📊 Duration (avg) ⏱️ Duration (p95) ⏱️
TestDockerExecutor_Build_ContextCancellation 1 5.2s 5.2s
eldritch-libsys: std::dll_inject_impl::tests::test_dll_inject_simple 1 5.1s 5.1s
TestInteractiveShell 1 5.1s 5.1s
TestOtherStreamOutput 1 5.0s 5.0s
imix::bin/imix: install::tests::test_install_execution 3 1.2s 3.4s
imix::bin/imix: install::tests::test_install_execution 3 1.2s 3.4s
imix::bin/imix: install::tests::test_install_execution 3 1.2s 3.4s
imix::bin/imix: tests::task_tests::test_task_streaming_error 3 3.0s 3.1s
imix::bin/imix: tests::task_tests::test_task_streaming_error 3 3.0s 3.1s
imix::bin/imix: tests::task_tests::test_task_streaming_error 3 3.0s 3.1s

🎉 No failed tests in this run. | 🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@KCarretto KCarretto added this pull request to the merge queue Feb 18, 2026
Merged via the queue into main with commit 5216473 Feb 18, 2026
9 checks passed
@KCarretto KCarretto deleted the feat/shellv2-backend branch February 18, 2026 02:35
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