Repository navigation
OMNIS-31: Add the TUI skeleton and module browser - #39
Merged
Merged
Conversation
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.
YouTrack: https://youtrack.xn--wrm-hoa.li/issue/OMNIS-31 (sub-task of OMNIS-14)
Adds
omnishell tui: a full-screen, read-only module browser (module list, detail pane with description, homepage, package status, platforms and shells, and a/filter). It reads modules throughmodedit.Viewsand never writes any file.Changes
internal/tui: Bubble Tea v2 model (Updateis a pure function of model and message), layout,Run, and a one-methodBackendinterface. It imports neitherinternal/clinorinternal/engine.internal/cli/tui.go: thetuicommand. It exits 2 before taking over the screen when stdin or stdout is not a terminal, or whenconfig.tomlis missing or malformed.CLAUDE.mddocument the command; design spec and implementation plan are underdocs/superpowers.Dependencies
charm.land/bubbletea/v2v2.0.10,charm.land/lipgloss/v2v2.0.6,github.com/charmbracelet/x/ansiv0.11.8 andgithub.com/charmbracelet/x/termv0.2.2, plus their transitive modules. These are the first runtime dependencies besides cobra and toml.godirective moves from1.26to1.26.0, which Bubble Tea v2.0.10 requires. CI reads it fromgo.mod.-s -w): 10,398,610 bytes onmain, 11,982,258 bytes here (+1,583,648 bytes, about +1.5 MiB, +15%).teatest: it has no tagged release. Rendering is tested with plain-text golden files ofView().Contentplus structural assertions, and one real-program smoke test.Commits
Test plan
make vetandmake test(race detector) pass locally.govulncheck ./...reports no vulnerabilities.CGO_ENABLED=0 go build ./cmd/omnishellsucceeds for linux/amd64, linux/arm64, linux/armv6, linux/armv7, darwin/amd64 and darwin/arm64.omnishell tui < /dev/nullexits 2 with "needs an interactive terminal".golangci-lint,govulncheckand the build matrix pass.omnishell init, thenomnishell tuiin a real terminal. Check the list, the detail pane,/filtering (enter keeps, esc clears), resizing below 80x20 and back, andq/Ctrl-C leaving the terminal clean.Known gaps (tracked for later sub-tasks)
modedit).omnishell liststill prints manifest text unsanitised; this predates the change.