Skip to content

feat: multi-terminal sidebar (Phase 2b) - #22

Closed
srid wants to merge 3 commits into
juspay:masterfrom
srid:claude/practical-sinoussi
Closed

feat: multi-terminal sidebar (Phase 2b)#22
srid wants to merge 3 commits into
juspay:masterfrom
srid:claude/practical-sinoussi

Conversation

@srid

@srid srid commented Mar 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Sidebar with "+" create button and numbered terminal list for multi-terminal support
  • Hide/show switching via display:none (not mount/unmount) preserves ghostty canvas state and frontend scrollback
  • Empty state tip when no terminals exist; terminals survive browser refresh via terminal.list() restore
  • terminal.screenState RPC procedure for test content verification
  • SolidJS idiomatic: classList, createEffect(on(..., { defer: true })), For loop

Test plan

  • just dev — manual verification of create, switch, refresh
  • just test-dev — 14 scenarios, 69 steps, all passing
  • just pc — pre-commit hooks pass
  • nix build — production build succeeds
  • /code-review — reviewed against project principles

srid added 2 commits March 21, 2026 18:22
Sidebar with "+" create button and numbered terminal list.
Hide/show switching via display:none (not mount/unmount) preserves
ghostty canvas state and frontend scrollback. Empty state tip shown
when no terminals exist. Terminals survive browser refresh via
terminal.list() restore on mount.

- Sidebar.tsx: new component with classList for active highlight
- App.tsx: terminalIds + activeId signals, loaded flag for flash prevention
- Terminal.tsx: visible prop, createEffect(on) for resize-on-show,
  zoom key gating, min-w-0 for proper flex shrinking
- terminal.screenState RPC procedure for test content verification
- e2e: sidebar.feature with create/switch/refresh scenarios
Sidebar with "+" create button and numbered terminal list.
Hide/show switching via display:none (not mount/unmount) preserves
ghostty canvas state and frontend scrollback. Empty state tip shown
when no terminals exist. Terminals survive browser refresh via
terminal.list() restore on mount.

- Sidebar.tsx: new component with classList for active highlight
- App.tsx: terminalIds + activeId signals, loaded flag for flash prevention
- Terminal.tsx: visible prop, createEffect(on) for resize-on-show,
  zoom key gating, min-w-0 for proper flex shrinking
- terminal.screenState RPC procedure for test content verification
- e2e: sidebar.feature with create/switch/refresh scenarios
@srid
srid force-pushed the claude/practical-sinoussi branch from 33ff270 to 590f243 Compare March 21, 2026 22:27
- App.tsx: comment on running-terminal fallback logic and handleCreate
- code-review skill: also require comments when the 'what' isn't obvious
@srid srid closed this Mar 21, 2026
srid added a commit that referenced this pull request Jun 9, 2026
…ed; Phase 1 dogfoods kolu) (#1236)

An Atlas note (`kind: feature` · **`status: accepted`**) arguing that
**mini-ci can grow into a standalone, drishti-style CI tool that
replaces [juspay/justci](https://github.com/juspay/justci) — because
oRPC-over-ssh turns the runner from a batch *translator* into a live
typed *service*.** justci ships an opaque artifact (a git bundle in,
scraped `.log` files out) and reconstructs liveness through a separate
`.ci/pc.sock` client; mini-ci ships a live, typed, reactive surface
in-band, so clients *attach/detach/reconnect* to a runner that owns the
DAG as state.

The plan is now **accepted, and Phase 1 is the dogfood: entirely replace
justci in this very repo** — ingest the `[metadata("ci")]` DAG from
`ci/mod.just`, writable per-SHA builds, strict hygiene with justci's
per-SHA log layout, commit-statuses + `protect`, the warm-pool lanes,
and the `/ci`-skill CLI surface — with an explicit exit criterion: `nix
run github:juspay/justci` appears nowhere in kolu. *(One precision the
dogfood forced: neither tool ingests forge events — a run starts when
you or an agent invokes it. The gate was the debt, not the trigger.)*

### The thesis in one picture — three faces over one surface

```
 TUI (shipped) ─┐
 PWA (proposed)─┼─▶ @kolu/surface ─▶ surface-nix-host ─▶ runner (owns the live DAG)
 MCP (proposed)─┘     typed, live        HostSession         nodes · nodeLog · rerun
                      over ssh stdio                         ⇣ (dashed) gate half — Phase 1 scope
```

Each face is a thin client adapter over the *same* `implementSurface`
router, only the link differs — the surface thesis ("declare once,
derive the faces") at its sharpest.

### What's in the note

- **A vertical-spine architecture diagram** (D2) of the package/module
connections, with the gate half drawn dashed — Phase 1's scope.
- **Visual prototypes** — the shipped **TUI**, the proposed **PWA
dashboard** (a colour-coded platform × recipe *fan-in matrix* + live log
pane), and an **agent-CLI MCP transcript** (`get_nodes` → `tail_log` →
`rerun_node` → `wait_for_settle` → green) with a `.mcp.json` wiring
snippet and a surface→MCP mapping table.
- **An honest two-table ledger** — what only a live service can do, and
**Phase 1's work order** (every row scoped by what justci does for kolu
today), including where this model is genuinely *worse* (no builds yet,
runner state dies with its process).
- **The MCP hook, cited** — justci's own
[#22](juspay/justci#22) ("MCP server for ci,
done properly") tried MCP and reverted it
([#18](juspay/justci#18)) because the batch
model auto-runs every recipe on launch; a live runner has that
separation by construction.
- **A staged roadmap** — Phase 0 done → **Phase 1 (now): replace justci
here** → beyond (PWA · MCP · fan-in) → graduation. Naming deliberately
deferred to graduation (not bound to the Sanskrit line; `mini-ci` stays
the working name).

> _Provenance: built from multi-agent research + adversarial
verification of every load-bearing claim against the justci and kolu
codebases; all four visuals were pixel-verified in a real browser.
`ci::atlas-sync` is green (the committed `dist/` rebuilds
idempotently)._

### Read it

[Rendered note via
htmlpreview](https://htmlpreview.github.io/?https://github.com/juspay/kolu/blob/mini-ci/docs/atlas/dist/mini-ci-vs-justci.html)
(or open `docs/atlas/dist/mini-ci-vs-justci.html` in kolu's Code tab).

_Generated by Claude Code (model `claude-fable-5`)._
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