feat(lab-envs): TUI view for backend-agnostic ephemeral lab envs - #2
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
feat(lab-envs): TUI view for backend-agnostic ephemeral lab envs#2devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Adds a Lab Envs view to the Bubble Tea client mirroring the concave-web /lab/envs page. Lists running envs with live TTL countdown, supports extend and archive actions gated by role. - internal/client: LabEnv, LabStorage, LabEnvsResponse, LabLaunchRequest types and Client.LabEnvs / LabLaunch / LabExtend / LabArchive methods. - cmd/concave-tui/model/api_bindings.go: apiLabEnvsFn / apiLabLaunchFn / apiLabExtendFn / apiLabArchiveFn test seams. - cmd/concave-tui/model/lab_envs.go: LabEnvsModel with 10s refresh, 1s countdown tick, viewer/developer/operator role gating, keybindings (r refresh, j/k select, e extend +1h, a archive). - cmd/concave-tui/model/root.go: ViewLabEnvs slot, visibleViews wiring, Lab Envs help entry. - Tests: formatTTL + LabEnvsModel table rendering + role-gated extend. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Lab Envs view to the Bubble Tea client mirroring the concave-web
/lab/envspage and backed by the same backend-agnostic API introduced in concave#1.Changes
internal/client/client.go:LabEnv,LabStorage,LabEnvsResponse,LabLaunchRequesttypes andClient.LabEnvs/LabLaunch/LabExtend/LabArchivemethods.cmd/concave-tui/model/api_bindings.go:apiLabEnvsFn/apiLabLaunchFn/apiLabExtendFn/apiLabArchiveFn— injectable function variables for tests.cmd/concave-tui/model/lab_envs.go:LabEnvsModel.rrefresh,j/kselect,eextend +1h (developer+),aarchive now (operator+).cmd/concave-tui/model/root.go: newViewLabEnvsslot in the view enum, wired intoUpdate,activateView,deactivateView,activeContent,applyLayout,visibleViews,sidebarIcon,sidebarLabel, and the help overlay.model/root_test.go: updatedTestRootSwitchesViewsWhenAuthenticated(system is now the ninth key),TestAdminVisibleViewsIncludeSystemAndUsers(10 views),TestViewerVisibleViewsIncludeMonitoringScreens(7 views).model/lab_envs_test.go:formatTTLrendering cases,LabEnvsModeltable rendering + cold-tier header, and role-gated extend.Gradient-specific touches
auth.ActionStartextends,auth.ActionStoparchives).Review & Testing Checklist for Human
concave-tui, press7to jump to Lab Envs, and confirm the env list populates in parallel with the web page.concave lab envs launch --image jupyter/minimal-notebook:latest --ttl 30m) and watch the TTL count down in the TUI without manual refresh.eas a developer andaas an operator. Confirm both actions succeed and the list refreshes.Notes
phase 15monitoring scaffolding on main; it's a standalone screen.Link to Devin session: https://app.devin.ai/sessions/5d19efa113054ca4953d9ed9309ce705
Requested by: @ElFariss