Skip to content

Fix local UI status data#292

Open
cpunt wants to merge 25 commits into
new-uifrom
ui-fixes
Open

Fix local UI status data#292
cpunt wants to merge 25 commits into
new-uifrom
ui-fixes

Conversation

@cpunt

@cpunt cpunt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • include system metric topics in the local UI curated model and retained bootstrap feed
  • let /events subscribe broadly while the local model allow-list keeps raw/cfg topics out of the UI stream
  • align the default static root with the built runtime layout (services/ui/www) so a clean make build-all deploy serves / on port 80
  • rebuild the vendored local UI bundle in src/services/ui/www

Verification

  • TEST_FILTER=unit.ui luajit run.lua (101 tests)
  • focused luacheck on changed UI files
  • make build-all
  • make test (1016 tests)
  • deployed the full build to root@172.28.100.1, restarted devicecode, verified port 80 root, bootstrap system metrics, and SSE headers/events

@cpunt

cpunt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Rebuilt the bundled local UI after the System card hardware/order fixes.

Verification:

  • make build-all
  • TEST_FILTER=devhost_local_ui_serves_static_and_curated_bootstrap_over_real_http luajit run.lua
  • make test (1016 tests)
  • Deployed the rebuilt devicecode-lua/build tree to root@172.28.100.1, restarted devicecode, and verified port 80 serves /assets/index-CmVPVK6n.js with live bootstrap hw_id=bigbox-v1-cm-2 1.0.

@cpunt

cpunt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Narrowed /events default subscriptions so the local UI opens one read-model watch per curated local UI prefix instead of subscribing to root #.

Notes:

  • /events route no longer carries { '#' }; default SSE patterns are derived from local_model.ALLOW_PREFIXES.
  • Kept the system metric stream by including obs/v1/system/metric/# in the generated defaults.
  • Added request-level coverage proving /events opens only those prefix watches and keeps replay=false.

Verification:

  • TEST_FILTER=unit.ui luajit run.lua (103 tests)
  • focused luacheck on changed route/SSE/test files
  • git diff --check
  • make test (1018 tests)
  • make build-all
  • Deployed the built tree to root@172.28.100.1, restarted devicecode, verified it is running on port 80, /api/local-ui/bootstrap responds, and /events returns 200 OK with text/event-stream.
  • Sampled live /events output and confirmed no ids for denied prefixes: raw, cfg, state/ui, svc/ui, or obs/v1/ui.

Caveat:

  • Full make lint still exits nonzero due to existing repo-wide warnings; the changed files are clean with focused luacheck.

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.

2 participants