Files
PiCloud/dashboard
MechaCat02 6cdb1244b8 feat(dashboard): scope-aware autocomplete for user-defined symbols
Adds a second CompletionSource that reads the Rhai parser's symbol
table. On a plain word it surfaces in-scope `let`/`const`/`fn` names
(with the function signature in the popup's detail line); on `obj.`
it suggests the field names of an object-map literal that initialized
`obj`. Composes with the existing static `ctx.*` / `log::*` source via
`autocompletion({ override: [scopeCompletionSource, rhaiCompletions] })`,
which CodeMirror merges. The static source now bows out on generic
`name.` rather than flooding the popup with keywords.

A new StateField caches one parse + symbol-table per editor state and
rebuilds on doc change. Bundle delta: +18 KB raw, +4.7 KB gzipped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 23:44:41 +02:00
..

PiCloud Dashboard

SvelteKit SPA for the PiCloud control plane.

Stack

  • SvelteKit 2 with adapter-static (SPA fallback)
  • Svelte 5 (runes)
  • TypeScript
  • Vite

Scripts

npm install
npm run dev      # vite dev server on :5173, proxies /api → PICLOUD_API
npm run build    # static SPA bundle into ./build/
npm run check    # svelte-check
npm run lint
npm run format

By default npm run dev proxies /api/* and /healthz to http://127.0.0.1:18080. Override with PICLOUD_API=http://host:port npm run dev.

How it fits in

In production Caddy serves the contents of ./build/ as static files and falls back to index.html for client-side routing. The dashboard only talks to the control plane (/api/admin/* on the manager); data-plane invocations go through /api/execute/* on the orchestrator and are not issued from the dashboard directly during MVP.