Repository navigation
Split the HUD page into web/hud/ sources, joined at build time - #55
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tech debt item #11.
Why
web/web_ui.htmlwas one 2,238-line file (markup, ~800 lines of CSS and ~1,400 lines of JS in one IIFE), which made it hard to navigate and review. The board still has to serve one self-contained gzipped page: the setup hotspot is offline, there is one route, and the gzip is deterministic. So the split is source-only and joined at build time, in Python, with no new tools.What
web/hud/:index.html: the markup plus two placeholders.css/: 7 files (base, statusbar, video, panel, controls, overlays, responsive).js/: 13 fragments (state, feedback, link, controls, fire, stream, calibration, status, overlay, loop, ui_events, wifi_chip, boot).web/hud_build.py:build_hud_page()joins them. ItsCSS_FILESandJS_FRAGMENTSlists are the single source of truth for the order. The JS fragments share one scope: the build wraps them in the same'use strict'IIFE, so scoping and behaviour are unchanged.update_index_html.py, still write-if-changed with a deterministic gzip), the mock board (it rebuilds on every request, so edit-then-reload still works), the web tests and the reply-key contract test.web_ui.htmlis deleted.wifi_setup.htmlstays one file.HudBuildTests:Verification
index_html.hfromweb/hud/, SUCCESS.