Skip to content

Make board configuration safer with profiles and preflight - #50

Merged
stojadin2701 merged 18 commits into
mainfrom
feature/board-safety-workflow
Aug 16, 2026
Merged

Make board configuration safer with profiles and preflight#50
stojadin2701 merged 18 commits into
mainfrom
feature/board-safety-workflow

Conversation

@stojadin2701

@stojadin2701 stojadin2701 commented Aug 15, 2026

Copy link
Copy Markdown
Member

Summary

  • make board communication transactional: serialize commands, pause status polling during operations, validate bulk configuration reads, verify saved values by reading them back, and retain a private Vega communication log for troubleshooting
  • add versioned configuration profiles with a persistent connected-board view, grouped visual differences, clear Profile-to-Board direction, compatibility guidance, individual or full-profile application, and reset support
  • add an advisory Preflight Check with flight-event and independent timer-chain simulation, board-setting context, imperial-unit support, cached results, and clear warnings without blocking valid specialist configurations
  • simplify the configuration workflow by combining related pages, removing the legacy backup/restore flow and editable logging settings, improving field guidance, and suppressing invalid/testing-state flight estimates
  • add connected-session CLI history with Up-arrow and Ctrl+R selection, plus live line-by-line output and a five-minute activity timeout for long-running sim commands
  • add confirmed onboard flight-log deletion that removes the matching flight, statistics, and configuration files while handling stale mounted-drive entries safely
  • improve startup and runtime behavior with bulk settings reads, 250 ms status polling outside transactions, a five-second update check, and the Configurator 1.4.0 release metadata

Verification

  • 19 Vitest files / 111 tests passed
  • complete fake-device Electron end-to-end workflow passed
  • ESLint passed with no warnings
  • Prettier check passed
  • git diff --check passed
  • production Electron build and packaged-artifact verification passed
  • connected Vega simulation completed with 2,054 progress lines streamed individually, no status polling during the command, and the final success response visible in the CLI
  • simulation-generated flight, statistics, and configuration files were removed and the Vega was rebooted back to READY

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
stojadin2701 force-pushed the feature/board-safety-workflow branch from fa5e120 to 5719a7b Compare August 15, 2026 19:53
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 stojadin2701 self-assigned this Aug 16, 2026
@stojadin2701
stojadin2701 marked this pull request as ready for review August 16, 2026 10:24
@stojadin2701
stojadin2701 merged commit 693244d into main Aug 16, 2026
6 checks passed
@stojadin2701
stojadin2701 deleted the feature/board-safety-workflow branch August 16, 2026 10:24
@stojadin2701
stojadin2701 restored the feature/board-safety-workflow branch August 16, 2026 10:25
stojadin2701 added a commit that referenced this pull request Aug 16, 2026
@stojadin2701

Copy link
Copy Markdown
Member Author

incorrectly merged, remerging as #52

@stojadin2701
stojadin2701 deleted the feature/board-safety-workflow branch August 16, 2026 10:38
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.

1 participant