sp tui — interactive full-screen scratch browser (#26) - #31
Merged
Conversation
10 tasks
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.
Closes #26
Adds
sp tui: an optional, full-screen Bubble Tea browser over the same store the CLI already uses. Strictly additive — no--json/scripting path changes, no new source of truth. The model reads scratches through a smallBackendinterface (satisfied by*store.Store) and drives the existingMoveToMorgue/Resurrect/open-in-$EDITOR operations, so it can never hard-delete or diverge fromsp ls.What changed
internal/tui/— new isolated package:Model(Bubble Tea) with live/morgue panes, expiry-tinted list, side preview pane, live filter, and two-step y/N confirmation for any file move. Content/logic seam behindBackend+ injectedNow/OpenEditorfor deterministic tests.internal/cli/tui.go—sp tuicommand; refuses to launch when stdout/stdin isn't a TTY (clear pointer tosp ls); reuses the exact $EDITOR launchersp openuses; alt-screen program.go getbubbletea v1.3.4 + bubbles v0.20.0.sp tuiand its keybindings.Acceptance criteria
sp ls.tab/m) with purge countdowns.q/escquits and restores the terminal (alt-screen).--json/plain-command output changes; TUI isolated ininternal/tui.go build/vet/test ./.../gofmtclean.Notes: promote-from-TUI was scoped out to keep the interactive surface to the reversible ops (open/rm/resurrect); promote stays a deliberate CLI action. Preview is height-bounded so huge scratches don't blow the frame.