Skip to content

Configurator update - #42

Merged
stojadin2701 merged 11 commits into
mainfrom
configurator-update
Aug 11, 2026
Merged

Configurator update#42
stojadin2701 merged 11 commits into
mainfrom
configurator-update

Conversation

@stojadin2701

@stojadin2701 stojadin2701 commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

This PR modernizes CATS Configurator and improves its reliability, security, and release process.

High-level changes

  • Modernizes the Electron and Vue application stack.
  • Adds automatic device discovery and safer connection handling.
  • Introduces a dedicated workspace for viewing and exporting flight logs.
  • Adds secure handoff of flight logs to CATS Flights.
  • Prevents writes to detected CATS device drives.
  • Adds automatic update checks with verified release downloads.
  • Strengthens Electron security and input validation.
  • Expands automated tests, CI checks, and release verification.
  • Adds native release packages for Windows, Intel/Apple Silicon macOS, and Linux.
  • Updates documentation and dependency management.

Verification

  • Linting and formatting checks pass.
  • All 61 unit and component tests pass.
  • Production build and release-contract checks pass.
  • Electron smoke tests pass, with the hardware-only test skipped.

Migrate the application from Vue CLI, Vue 2, and Vuetify 2 to the
Electron Vite, Vue 3, Pinia, and Vuetify 4 foundation while preserving
the existing installer formats and device workflows.

Harden the sandboxed Electron boundary with validated domain-specific
IPC, local assets, offline flight-log exports, and guarded navigation.
Restore the established interface across the configuration, event,
timer, CLI, and flight-log screens.

Add reproducible Node 24 CI, dependency auditing, unit and component
coverage, Electron smoke tests, visual comparisons, and read-only Vega
hardware verification.
Bundle Inter and Space Grotesk locally, replace the legacy header with
the CATS Configurator identity, and add the company name and secure
Flights navigation used by the CATS web properties.

Correct connected-screen spacing, menu alignment, testing-panel rhythm,
and enabled timer colors while preserving the restored legacy layout.
Extend external-link, Electron smoke, and visual comparison coverage for
the updated interface.
Motivation:
- Flight-log analysis should remain available regardless of serial connection state, and connected Vega users need direct access to logs on the board's read-only CATS drive.
- Browser visualization should preserve local privacy while supporting both Staging validation and an explicit manual fallback.
- Log plotting and timer state styling must remain reliable while users switch units or load multiple files.

Important changes:
- Add the always-available Flight Logs route after CLI, preserve Configuration as the connection default, retain the current local log across disconnects, and clarify the Vega log picker.
- Discover validated CATS volumes, list safe opaque onboard log entries, and maintain one replaceable main-process session with original bytes and trusted parsed data.
- Add a single-use exact-origin loopback handoff with 256-bit tokens, two-minute expiry, cancellation, private-network CORS, forced socket cleanup, and a Save and open manually fallback.
- Replot reactive flight-log data safely across metric and imperial changes, allow subsequent log loads, and color only enabled timer switches orange.
- Add staging/production Flights build targets, production bundle isolation checks, secure bridge contracts, 1.2.0 metadata and changelog notes, and repository commit guidance.

Verification:
- ESLint and Prettier checks passed.
- All 28 unit and component tests passed.
- The Electron smoke test passed against the final Staging build with a fake serial board and mounted CATS drive, including menu order, repeated log loading, unit-switch plot retention, and enabled/disabled timer colors.
- The npm production audit found zero vulnerabilities, and the production bundle contained no Staging origin.
- A real Vega on COM4 and read-only E: volume was discovered; fl007.cfl parsed and copied byte-for-byte, the exact-origin 8,202-byte handoff completed, and the device volume remained unchanged.
- Windows NSIS and ZIP Staging candidates were built successfully.
@stojadin2701 stojadin2701 self-assigned this Aug 9, 2026
Motivation:
- The Ubuntu CI runner created fake CATS drive files outside the intended directory because the smoke test used Windows-only path separators.

Important changes:
- Build fake drive fixture paths with node:path so onboard log discovery receives the same directory layout on Windows, macOS, and Linux.

Verification:
- ESLint and Prettier checks passed.
- All 28 unit and component tests passed.
- The Electron smoke test passed locally, including fake onboard log discovery.
- Production CATS Flights target isolation passed.
Motivation:
- Configurator validation is complete, so every development and packaged build should now use the public CATS Flights service without a staging override.

Important changes:
- Fix the shared Flights home and analyzer origin at https://flights.catsystems.io.
- Remove CATS_FLIGHTS_TARGET handling and injected staging/production build globals from Electron Vite.
- Update smoke, bundle verification, CI wording, and the 1.2.0 changelog for the production-only integration.

Verification:
- ESLint and Prettier checks passed.
- All 28 unit and component tests passed.
- The Electron smoke test passed when built with the obsolete staging environment variable deliberately set, confirming it can no longer redirect navigation.
- The built bundle contains the production Flights origin, and tracked source contains no staging URL or target-selection references.
Add a dedicated macOS arm64 packaging job while retaining the Intel build. Include the target architecture in DMG filenames so both artifacts can coexist in one GitHub release without collisions.\n\nVerified the electron-builder configuration and workflow YAML, ran Prettier and ESLint checks, and ran all 28 unit tests.
Motivation:
- Preserve native Intel and Apple Silicon macOS packages while removing redundant Windows release output.
- Move reusable CI and release actions off deprecated runtimes before the next release.

Important changes:
- Keep the remote Apple Silicon DMG matrix and architecture-qualified filenames intact.
- Publish NSIS as the sole Windows artifact instead of producing a duplicate ZIP archive.
- Upgrade checkout, Node setup, artifact transfer, and GitHub Release actions to their maintained major lines.

Verification:
- Confirmed the reconciled files exactly match the previously tested local release-workflow tree.
- Prettier parsed and validated the complete workflow and package manifest.
- Inspected the complete staged diff and confirmed it contains only the intended workflow and packaging changes.
Motivation:
- Reduce setup friction when one supported Vega is connected while preserving explicit control for ambiguous or unknown serial devices.
- Prevent silent, incompatible, or repeatedly failing devices from trapping the connection workflow.

Important changes:
- Detect USB VID CAFE and PID 4003 at startup and during one-second disconnected polling, with stable presence tracking and multiple-device labels.
- Auto-connect one Vega once per presence interval, suppress reconnect after manual disconnect or rejection, and retain manual selection for other ports.
- Add a five-second board-identification timeout, protocol confirmation, renderer cleanup, SerialPortSummary contracts, and the 1.2.1 release metadata.

Verification:
- Prettier and strict ESLint passed.
- All 39 unit and component tests passed.
- All four automated Electron smoke scenarios passed, including startup, delayed hot-plug, multiple-device, and manual fallback coverage.
- A real Vega on COM4 passed auto-connect, Configuration navigation, disconnect suppression, manual reconnect, and read-only status checks.
- The production build, CATS Flights origin check, Windows NSIS package, and unpacked Windows launch passed.
Motivation:
- Give Configurator users a secure way to discover and prepare stable updates across Windows, macOS, and Linux without requiring unsigned in-place installation.

Important changes:
- Check GitHub Releases on a schedule and on demand, select deterministic platform assets, validate redirects and sizes, verify SHA-256 digests, and atomically cache only trusted downloads.
- Expose a narrow update IPC bridge with footer progress, manual checks, verified-download dialogs, release-page fallback, and reveal-only installation handoff.
- Bump Configurator to 1.3.0, lock release artifact names, and add CI assertions for each package target.
- Add unit, component, and offline Electron coverage for scheduling, validation, caching, failures, UI behavior, and streamed update fixtures.

Verification:
- Prettier and ESLint passed.
- All 58 unit and component tests passed.
- Six Electron smoke tests passed; the real-hardware test remained opt-in.
- Production and full dependency audits reported zero vulnerabilities.
- Production-origin and release-contract checks passed.
- The Windows NSIS artifact built with the expected name and its unpacked application launched successfully.
Motivation:
- Open pull-request branches currently trigger the same workflow for both push and pull_request events, doubling every quality and packaging job.

Important changes:
- Run branch-push workflows only on main.
- Preserve push-triggered release workflows for every tag.
- Keep pull_request checks for feature and review branches.

Verification:
- Prettier validated the workflow formatting.
- The workflow parsed successfully and its main, tag, and pull-request triggers were asserted.
Prevent mismatched version tags from publishing updater-incompatible artifacts and make every flight-log write honor persistent CATS-drive protection.

Clear stale flight-log state after replacement attempts, align release documentation with the actual native packages, and add regression coverage for tag validation, protected destinations, and failed loads.

Verification: ESLint and Prettier; 61 unit/component tests; production-target and release-contract checks; valid and mismatched release-tag checks; production build; Electron smoke suite (6 passed, hardware test skipped).
@stojadin2701
stojadin2701 merged commit ba4ae06 into main Aug 11, 2026
6 checks passed
@stojadin2701
stojadin2701 deleted the configurator-update branch August 11, 2026 18:55
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