Make board configuration safer with profiles and preflight - #50
Merged
Conversation
Prevent status polling and other commands from interleaving with configuration writes, including the timer 4 sequence. Queue commands behind prompt acknowledgements, apply timeout and retry handling, save atomically, and read every written value back before reporting success. Verification: 68 unit tests, lint, Prettier, production Electron build and 6 fake-device E2E tests, real Vega connection E2E, and a same-value timer 4 transaction on COM4 with firmware 3.0.2-dev.
Replace opaque backup/restore as the primary workflow with schema-versioned JSON profiles covering configuration, events, timers, and logging. Capture board and firmware metadata, warn or block incompatible profiles, show every field beside the connected board, and route changed fields through verified transactions with a result for each field. Verification: 76 unit tests, lint, Prettier, production Electron build and 6 E2E tests, plus a read-only 31-field profile capture and self-diff on the connected Vega running firmware 3.0.2-dev.
Turn the connected board configuration into a read-only Ready, Warning, or Blocked safety report. Detect testing mode, disabled recording, repeated pyro firing, deployment gaps, reversed event order, and cyclic or invalid timers; render the relative event/timer sequence and provide direct review links for each finding. Expose recording settings while removing non-functional download and erase controls. Verification: 82 unit tests, lint, Prettier, production Electron build and 6 fake-device E2E tests, read-only preflight capture on Vega firmware 3.0.2-dev, and a real-board Electron connection/status/preflight/disconnect E2E pass. The live board correctly reported blocked self-chains on timers 2 and 3.
Write only changed values and clear trailing event actions before saving. Validate board payloads, persist defaults, and verify legacy backup restores. Fix timer/profile proxy serialization and align logging masks with Vega 3.0.2. Verified with 94 unit tests, 6 desktop E2E tests, a production build, a 31-field Vega profile capture, and same-value Timer 4 hardware read-back.
Keep commands available while navigating the connected board session, clear them on disconnect, and support Up/Down traversal plus Ctrl+R reverse search. Preserve in-progress input when board responses arrive and report command failures through the existing snackbar. Verified with 96 unit tests, lint and formatting checks, a production build, and 6 desktop E2E tests.
Replace in-place reverse search with a visible newest-first history picker. Support Up and Down selection, Enter or click to restore a command, Escape to close, and advertise both history shortcuts in the command field. Verified with 96 unit tests, lint and formatting checks, a production build, and 6 desktop E2E tests.
Do not treat the echoed command as a settled response. This prevents slower firmware builds from completing save transactions before the board emits its flash confirmation, which previously produced false profile-apply failures. Verified with 97 unit tests, including delayed-save command and transaction regressions, lint and formatting checks, a production build, and 6 desktop E2E tests.
Keep the connected board profile visible alongside imported profile comparisons, and refresh it after a successful apply. Make preflight findings advisory, remove the repeated-pyro warning, show relevant board settings in the timeline, warn above a 50 m/s² liftoff threshold, document all checks, and cache reports until configuration changes or disconnect. Verified with 99 unit tests, ESLint, Prettier, the Electron bridge E2E test, a production renderer build, and read-only profile/preflight checks on a CATS Vega 3.0.2-dev.
A Vega reboot closes the serial port before returning the usual prompt, which made the CLI surface a successful reboot as a Board connection closed error. Accept that exact disconnect only for the reboot command while preserving all other CLI failures. Verified by the full unit suite, lint, formatting, production build, and Electron E2E test.
Avoid rereading all profile fields whenever the Profiles route is revisited. Keep the current snapshot in the session store and invalidate it after Configurator saves configuration or the board disconnects; Refresh Board still forces a new read. Verified by the full unit suite, lint, formatting, production build, and Electron E2E test.
Separate flight events from independently triggered timer chains in Preflight, group each profile timer into one entry, and allow individual settings or grouped timers to be applied through the existing verified board transaction. Embed Logging under Configuration and Timers under Events while preserving redirects and combined dirty, refresh, discard, and save behavior. Parse both current and legacy recorder storage output so free space and estimated logging time are populated. Verified with 100 unit tests, ESLint, Prettier, a production renderer build, the fake-device Electron workflow, and a read-only CATS Vega 3.0.2-dev hardware workflow.
Keep the combined page labeled Configuration, shorten its Logging section title, add enough bottom space to inspect every timer, and hide meaningless transitions for disabled timers. Describe every recorder element from the flight-computer data structures. Replace the separate recording start and stop findings with one advisory check that explains the complete configured behavior, and simplify the Preflight page. Verified with 101 unit tests, ESLint, Prettier, and a production Electron build. Added end-to-end coverage for timer clearance, labels, tooltips, and Preflight wording.
Convert profile altitude and acceleration values and all Preflight unit-bearing text when imperial units are enabled. Improve the unit toggle contrast and bring recorder-element tooltips closer to their controls with a more polished presentation. Bump package and lockfile release metadata to 1.4.0 and update packaged UI expectations. Verified with 101 unit tests, ESLint, Prettier, the release artifact contract, and a production Electron build. A read-only Vega check confirmed that testing mode is the cause of the reported INVALID runtime state.
Replace page and snapshot fan-out with the Vega CLI's bulk get response, parse and publish settings as one batch, and request individual values only when the bulk response omits an expected key. Keep writes serialized through set, save, and targeted readback verification while avoiding duplicate embedded-panel refreshes. Append a timestamped main-process-only Vega TX/RX transcript in Electron's logs directory and reduce status polling to one request per second. Verified with 104 unit tests, ESLint, Prettier, a production build, read-only bulk profile and preflight captures on COM4, and the real-Vega Electron end-to-end test.
Return the connected-board status refresh interval to 250 ms so live state and sensor feedback update at the established rate. The serialized transaction engine continues to pause polls during configuration operations, preventing status requests from interfering with saves and readback verification. Verified with focused ESLint and Prettier checks plus git diff --check.
Prevent automated setup recovery from switching package managers and disrupting the existing npm dependency layout. Record the Node 24 and package-lock contract and explain how to use installed local executables when npm is unavailable. Verified the focused staged diff with git diff --cached --check.
Replace the legacy text backup workflow with versioned profiles, keep reset defaults available from both configuration surfaces, and show Profile-to-Board direction for changed values. Check for updates sooner after startup and hide nonsensical flight estimates while the board reports INVALID or TESTING. Verified with 103 Vitest tests, ESLint, Prettier, and git diff --check.
stojadin2701
force-pushed
the
feature/board-safety-workflow
branch
from
August 15, 2026 19:53
fa5e120 to
5719a7b
Compare
Add confirmed onboard flight deletion for the matching flight, statistics, and configuration files while hiding stale mounted-drive aliases. Remove editable logging settings from configuration profiles and the configuration UI. Stream simulator output line by line, wait for the final prompt with a five-minute activity timeout, and keep polling paused for the transaction. Verified with 111 unit tests, desktop E2E, lint, formatting, packaging, and a full connected-Vega simulation.
stojadin2701
marked this pull request as ready for review
August 16, 2026 10:24
stojadin2701
added a commit
that referenced
this pull request
Aug 16, 2026
Member
Author
|
incorrectly merged, remerging as #52 |
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.
Summary
Verification