Skip to content

TUI main screen: IDE-like workspace, command palette, screen DSL#17

Merged
syncended merged 1 commit intomainfrom
issue-5/tui-main-screen
Apr 27, 2026
Merged

TUI main screen: IDE-like workspace, command palette, screen DSL#17
syncended merged 1 commit intomainfrom
issue-5/tui-main-screen

Conversation

@syncended
Copy link
Copy Markdown
Owner

@syncended syncended commented Apr 27, 2026

Summary

  • Single IDE-like workspace MainScreen: persistent Project sidebar (collections tree + recent activity) + Editor pane (URL / method / Send · Headers/Query/Body/Auth tabs · Response). Command palette is an in-place dialog (Ctrl+P).
  • Linear Tab focus cycle inside the editor (URL → Tabs → Response). Tab from Project drills into the editor; Esc/q drill back out. Esc never destroys typed input — Ctrl+U clears the URL.
  • screen { onHotkey = …; widget } DSL for declarative screens, plus reusable widget helpers (headerBar, focusMarker, methodBadge, statusBadge, statusFooter) and a popOn(vararg keys) hotkey helper.
  • Package layout under tui/: core/ (Screen interface, DSL builder, hotkey helpers), model/ (ScreenAction), widget/ (CommandPalette, Widgets), screen/ (HelpScreen, PlaceholderScreen, screen/main/ split into MainState · Tree · Render · Sidebar · Editor).
  • Renames: command/ package → cli/; TuiAppTui.
  • Distribution: shadow fat-jar (cli-0.0.1-all.jar) + tui.sh launcher (Gradle daemon cannot host a raw-mode TUI; the script execs the install-dist binary so the JVM inherits the controlling TTY).

Closes #5

Test plan

  • ./gradlew :cli:build is green.
  • ./tui.sh opens the workspace and shows the empty new-client state by default.
  • Press D toggles the demo tree; ↑↓ ←→ Enter navigates; n opens an empty editor.
  • Tab cycles URL → Tabs → Response without entering Project; Esc drills back to Project; URL text is preserved.
  • Ctrl+P opens the palette in-place (header + sidebar stay visible); commands dispatch correctly.
  • Ctrl+B toggles the sidebar; ? opens Help; Ctrl+C quits from anywhere.
  • java -jar cli/build/libs/cli-0.0.1-all.jar test foo still runs the CLI subcommand.

🤖 Generated with Claude Code

Implements the main TUI screen for #5 as a single IDE-like workspace:
- Persistent Project sidebar (collections tree + recent activity)
- Editor pane with URL/method/Send, request tabs, response section
- Command palette as an in-place dialog (Ctrl+P), grouped by category
- Linear Tab focus cycle inside the editor; Esc drills out to Project,
  Esc never destroys typed input (use Ctrl+U to clear the URL)
- Help, placeholder screens; screen { } DSL builder + popOn helper
- Tree split across screen/main/{MainState,Tree,Render,Sidebar,Editor}
- Reusable widgets: headerBar, focusMarker, methodBadge, statusBadge,
  statusFooter
- Distribution: shadow fat jar, tui.sh launcher (Gradle daemon cannot
  host a raw-mode TUI, so the script execs the install-dist binary)
- Renamed command package to cli; renamed TuiApp to Tui

Refs #5

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@syncended syncended merged commit f869231 into main Apr 27, 2026
1 check passed
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.

TUI main screen

1 participant