feat: add terminal UI example - #174
Conversation
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.
|
Updated this existing demo PR onto the current main branch. The terminal client now uses Mango Authorization: Bearer authentication, sends no Anthropic beta/version headers, and the docs chapter lives under Examples rather than Guides. Verified against the real local stack: resource listing and direct Session attach/history/SSE projection worked. Local checks passed: terminal-ui-verify, go test ./..., and the Docusaurus typecheck/build. |
|
Addressed the final review findings and updated the branch to current main.
Added regression coverage for Advisor refresh, attach cancellation/out-of-order completion, lifecycle action gating, child partial/full action resolution, external deletion, and reconnect 404. Verified locally with make terminal-ui-verify, make verify, make docs-check, and repeated race-enabled barrier tests. A read-only subagent re-review reports no remaining actionable findings. |
Problem, rationale, and scope
The standalone
mango-terminalrepository exists to support Mango product demos, but its repository and executable names make it look like a separately supported product. It also installs amangobinary 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
mango-terminal@fdb62d0intoexamples/terminal-ui.mangotomango-tuiand removed standalone install/release automation.golang.org/x/textandgithub.com/yuin/goldmarkto fix two reachable vulnerabilities found during the move.Verification
make testmake test-racemake vetmake lint LINT_BASE=origin/mainmake terminal-ui-verifymake securitynpm --prefix website run typechecknpm --prefix website run buildAPI 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