From 7448ab6aad7800639a7a29032256d0ef22607334 Mon Sep 17 00:00:00 2001 From: William Pelrine Date: Wed, 15 Apr 2026 07:50:38 -0700 Subject: [PATCH 1/6] Build Dash into the Night Shift browser front door --- .codex/skills/qa-night-shift/SKILL.md | 4 + .../update-local-night-shift-cli/SKILL.md | 5 +- .../scripts/install_local_cli.sh | 11 + README.md | 6 +- dash_web/gleam.toml | 8 + dash_web/manifest.toml | 16 + dash_web/src/browser_ffi.mjs | 71 + dash_web/src/dash_web.gleam | 1865 +++++++++++++++++ dash_web/static/dash.css | 45 + docs/getting-started.md | 7 +- docs/providers-and-delivery.md | 14 +- docs/run-lifecycle.md | 17 +- night-shift-dash-prd.md | 480 +++++ scripts/build_dash_assets.sh | 36 + scripts/build_release_bundle.sh | 3 + src/night_shift/app.gleam | 31 +- src/night_shift/cli.gleam | 61 +- src/night_shift/dash/api.gleam | 498 +++++ src/night_shift/dash/assets.gleam | 191 ++ src/night_shift/dash/projection.gleam | 649 ++++++ src/night_shift/dash/session.gleam | 80 + src/night_shift/dash/stream.gleam | 230 ++ src/night_shift/dashboard.gleam | 592 +----- src/night_shift/demo.gleam | 13 +- src/night_shift/infra/dashboard_session.gleam | 41 +- src/night_shift/types.gleam | 5 +- src/night_shift_dashboard_server.erl | 610 ++++-- test/night_shift_cli_config_test.gleam | 35 +- test/night_shift_dashboard_demo_test.gleam | 2 +- 29 files changed, 4889 insertions(+), 737 deletions(-) create mode 100644 dash_web/gleam.toml create mode 100644 dash_web/manifest.toml create mode 100644 dash_web/src/browser_ffi.mjs create mode 100644 dash_web/src/dash_web.gleam create mode 100644 dash_web/static/dash.css create mode 100644 night-shift-dash-prd.md create mode 100755 scripts/build_dash_assets.sh create mode 100644 src/night_shift/dash/api.gleam create mode 100644 src/night_shift/dash/assets.gleam create mode 100644 src/night_shift/dash/projection.gleam create mode 100644 src/night_shift/dash/session.gleam create mode 100644 src/night_shift/dash/stream.gleam diff --git a/.codex/skills/qa-night-shift/SKILL.md b/.codex/skills/qa-night-shift/SKILL.md index a6af37d..6845cf0 100644 --- a/.codex/skills/qa-night-shift/SKILL.md +++ b/.codex/skills/qa-night-shift/SKILL.md @@ -143,6 +143,10 @@ Typical flow: 12. after `resolve -> continue` on a setup blocker, confirm `status`, `report`, and Dash still show the retry-armed state and keep confidence below `high` until the next `night-shift start` consumes the waiver +13. when the user specifically wants the browser surface, use + `night-shift dash`, then drive `start`, `resume`, and `resolve` from the + browser-backed HTTP/UI flow instead of the removed `dash --start`, + `dash --resume`, `start --ui`, or `resume --ui` entrypoints For review-driven investigations, replace steps 3-4 with: diff --git a/.codex/skills/update-local-night-shift-cli/SKILL.md b/.codex/skills/update-local-night-shift-cli/SKILL.md index d3faaf3..97c890d 100644 --- a/.codex/skills/update-local-night-shift-cli/SKILL.md +++ b/.codex/skills/update-local-night-shift-cli/SKILL.md @@ -10,10 +10,13 @@ run the code from a specific worktree. ## What this skill does -- Builds the selected worktree with `gleam build`. +- Builds the selected worktree with `gleam build` and `scripts/build_dash_assets.sh`. - Creates a versioned install bundle under `~/.local/share/night-shift/