Skip to content

feat: add terminal UI example - #174

Open
yanpgwang wants to merge 1 commit into
mainfrom
codex/terminal-ui-example
Open

feat: add terminal UI example#174
yanpgwang wants to merge 1 commit into
mainfrom
codex/terminal-ui-example

Conversation

@yanpgwang

Copy link
Copy Markdown
Owner

Problem, rationale, and scope

The standalone mango-terminal repository exists to support Mango product demos, but its repository and executable names make it look like a separately supported product. It also installs a mango binary that conflicts with the server command in this repository.

This PR moves the complete client into the Mango repository as a reference example. The example remains runnable and tested, while release packaging and a supported operator-console contract are explicit non-goals.

What changed

  • Imported the terminal client snapshot from mango-terminal@fdb62d0 into examples/terminal-ui.
  • Kept it as an isolated Go module so Bubble Tea and rendering dependencies do not enter the server module.
  • Renamed the example executable from mango to mango-tui and removed standalone install/release automation.
  • Added built-in demo and connected-mode documentation, a Docusaurus guide, sidebar entry, README link, and demo GIF.
  • Added Makefile targets and a dedicated CI job for tests, race tests, vet, and build.
  • Included the nested module in vulnerability scanning and upgraded golang.org/x/text and github.com/yuin/goldmark to fix two reachable vulnerabilities found during the move.

Verification

  • make test
  • make test-race
  • make vet
  • make lint LINT_BASE=origin/main
  • make terminal-ui-verify
  • make security
  • npm --prefix website run typecheck
  • npm --prefix website run build
  • Verified the generated guide contains the bundled demo GIF.

API impact and design provenance

There is no Mango server API or persistence-schema change. The example continues to consume the existing HTTP/SSE contract and documents its attach, reconnect, projection, and action-routing choices in examples/terminal-ui/ARCHITECTURE.md.

The UI implementation comes from the prior standalone Mango Terminal repository and uses the Charm Bubble Tea, Bubbles, Lip Gloss, and Glamour libraries. This PR changes its repository placement and product positioning, not the underlying interaction model.

Durability and security

There is no migration and no change to runtime side effects, sandboxing, or server durability. The client still rejects credentials embedded in endpoint URLs and never persists API keys. Both root and example modules now run through govulncheck; the imported example reports no reachable vulnerabilities after the dependency upgrades.

Checklist

  • The problem, acceptance criteria, and non-goals are recorded here or in a linked design document/Issue.
  • Tests cover the changed behavior.
  • Public behavior is documented.
  • Material external design influences and Mango-owned decisions are recorded.
  • No credentials, generated build output, or local databases are included.

Import the Mango terminal client as an isolated example module, rename its executable to mango-tui, and document both demo and connected workflows. Verify the example in CI and include its dependencies in vulnerability scanning.\n\nSource snapshot: mango-terminal fdb62d0.
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.

1 participant