Skip to content

feat(guides): rework Get Started against the web console — the TUI is gone from v0.12.2 (#123) - #126

Merged
eaitbrahim merged 3 commits into
mainfrom
feat/guides-webui
Aug 29, 2026
Merged

feat(guides): rework Get Started against the web console — the TUI is gone from v0.12.2 (#123)#126
eaitbrahim merged 3 commits into
mainfrom
feat/guides-webui

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

Closes #123. The trigger fired: keel v0.12.2 ships no curses TUIkeel/commands/console.py is deleted (keel#541 closed) and the local web console (keel serve, keel/web/) replaced it. The four Get Started guides still taught nine TUI menus with TUI screenshots.

What changed, per guide

  • 1 · first-run — Step 2 now scaffolds with keel init-config + keel rules seed (why: keel init's seed step resolves the DB through the state-root rules, which cannot see a folder that has no config.yaml yet — verified with a controlled KEEL_HOME test where the seeded keel.db landed outside the new folder). Step 3 opens keel serve; Step 4 tours the seven views (Status, Setup, Activity, Insights, Rules, Venues, Gates + the off-site Docs link); Step 5 reads the Status dashboard — cards and the three tables, named as rendered. Shots: webui-setup.png (the checklist after scaffold), webui-status.png (the dashboard + nav).
  • 2 · first-simulation — the credential step moves from .env to the v0.12.2 reality: keel credentials set CDP_API_KEY into the OS keychain (or the Setup page's Save a market-data credential form); the warm-cache step points at the Setup page's Fetch market data button (background job) or keel fetch; the insights step walks the Insights view. Shots: webui-fetch.png, webui-insights.png. keel simulate --years 1 --skip-within-cap re-verified against the v0.12.2 CLI.
  • 3 · paper-profile — profiles re-explained for the folder model (no TUI Profile menu exists): the Setup page names the resolved config/db, the header badge displays the mode and cannot change it; the agent step notes the fresh-deployment first cycle logs skipped: kill_switch (observed live); the kill-switch step adds that the Gates view names keel resume as capability-increasing. Shot: webui-rules.png.
  • 4 · compliance-attest — re-centred on the Setup checklist's To go live stage + the Gates view. The asset-attestation step now records from the page: the Record this attestation form (asset, sector, backing, pays_yield, source, attested by) — verified live: POSTed through the console's own write path, server answered attested BTC and the step detail moved BTC out of the unattested list. Rail 14 (keel subscription attest) and rail 17 (keel withdrawals attest --enabled, 7-day TTL, interactive terminal) stay CLI — the checklist itself prints those commands. Shot: webui-gates.png.

The capture pipeline

scripts/render-webui-shots.mjs — the browser counterpart of the deleted render-tui-shots.mjs precedent: clones nothing, mocks nothing. It scaffolds a fresh paper deployment in /tmp/keel-paper (init-config + rules seed), launches keel serve --no-open on a loopback port, parses the one-time token URL from stdout, and drives the system Chrome (puppeteer-core) to each view — light theme pinned via the console's own keel-theme key, 1440×900 @2x viewport. Re-run per release with --keel-dir pointing at a tagged checkout. Six webui-*.png replace the eight tui-*.png (two of which were already orphans); the dead ANSI render script is removed with them.

Spot-check: every named UI element vs the live console (v0.12.2, run on this machine)

  • Seven-view header Status, Setup, Activity, Insights, Rules, Venues, Gates + Docs↗ — as served
  • Setup summary card: deployment / database / paper stage / config file / database file; next: A market-data credential with keel credentials set CDP_API_KEY — as served
  • Checklist stages To run in paper ("Evaluates rules against real market data and places nothing.") and To go live — as served
  • Buttons Save a market-data credential, Fetch market data, Record this attestation, Promote this rule — as served; attest POST verified end-to-end
  • Status: kill switch: ENGAGED, mode: paper, Data freshness "No market data yet." — as served
  • Insights: "no rule has the 20 trades the sample floor needs" — as served
  • Gates: "every action that increases what keel can do without asking again", "This view cannot perform any of them", the tty gate's 7 actions incl. keel withdrawals attest --enabled — as served
  • CLI: keel agent first cycle → skipped: kill_switch (run live); keel simulate --years 1 --skip-within-cap, keel credentials set, keel subscription attest, keel withdrawals attest, keel purification all re-verified at v0.12.2

Verification

  • npm run check0 errors, 0 warnings (4 pre-existing hints)
  • npm run build — 63 pages; dist/en/guides/{first-run,first-simulation,paper-profile,compliance-attest}/ all render, every referenced /get-started/webui-*.png exists in dist/get-started/
  • Puppeteer @390px: 0 px horizontal overflow on all four guide pages; all lazy shots load after scroll
  • Repo-wide grep: no tui-* or TUI-menu references remain (docs/SOCIAL.md, install.ts EN+FR blurb, GuidePage.astro comment updated — light touch, only where factually wrong)

Decisions

  • keel init not taught as-is: its fresh-folder behavior seeds the DB outside the folder (state-root resolution before config.yaml exists). The guide teaches the two commands init itself runs, which resolve correctly — and says why in one honest clause.
  • Asset attestation taught from the web (the issue allowed keeping it CLI "if the web UI truly lacks it"): v0.12.2's Setup page has the form and I verified it records — mirroring reality means teaching it.
  • Rail 14/17 stay CLI in the copy: the checklist's own "how" fields print terminal commands; the Gates view lists them behind the TTY gate.
  • Screenshots from the pristine fresh-install state (no credential, nothing fetched, nothing attested) — the state guide 1 leaves the reader in; the attest-form fields are visible in webui-fetch.png exactly as served.

… gone from v0.12.2 (#123)

The trigger fired: keel v0.12.2 ships no curses TUI (keel#541 closed;
keel/commands/console.py deleted) — the local web console (keel serve,
keel/web/) replaced it. The four Get Started guides still taught TUI menus
with TUI screenshots.

Re-shot and rewritten against the real thing, run and captured on this
machine:

- scripts/render-webui-shots.mjs — the browser counterpart of the old
  render-tui-shots pipeline: scaffolds a fresh paper deployment in
  /tmp/keel-paper (keel init-config + keel rules seed), launches
  keel serve, exchanges the one-time token, and photographs six views
  with the system Chrome at a desktop viewport. Re-runnable per release.
- Six new shots (webui-*.png) replace the eight tui-*.png; guides now
  teach the seven-view console (Setup checklist, Status dashboard,
  Insights gate distance, Rules lifecycle ledger, Gates capability
  table) instead of nine TUI menus.
- Guide 2's credential step moves from .env to the v0.12.2 reality:
  keel credentials set into the OS keychain, or the Setup page's
  Save a market-data credential form.
- Guide 4 walks the Setup checklist's To go live stage + Gates view;
  the asset-attestation step now records from the page (verified live:
  the web form attested BTC), while rail 14/17 attestations stay CLI —
  the checklist itself prints those commands.
- Guide 1's scaffold step uses init-config + rules seed: keel init's
  seed step resolves the database through the state-root rules, which
  cannot see a folder that has no config.yaml yet (verified with a
  controlled KEEL_HOME test — the DB lands outside the new folder).
- Stale TUI wording: install.ts guides blurb (EN+FR) now says web
  console; GuidePage comment and docs/SOCIAL.md updated; dead
  render-tui-shots.mjs removed with the tui-*.png.

Closes #123
…mp (S5443)

A predictable name in a world-writable directory is a symlink-attack
surface even for a local capture script; mkdtemp closes it. The Setup
screenshot keeps the path of the run that produced it — illustrative,
not contractual.
@sonarqubecloud

Copy link
Copy Markdown

@eaitbrahim
eaitbrahim merged commit e951749 into main Aug 29, 2026
2 checks passed
@eaitbrahim
eaitbrahim deleted the feat/guides-webui branch August 29, 2026 00:19
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.

Get Started guides teach the curses TUI — the engine deleted it on main (rework when the web-UI release ships)

1 participant