Skip to content

feat: Split serial into flashtool and terminal#193

Merged
hhvrc merged 12 commits intodevelopfrom
feature/multi-purpose-serial
Apr 25, 2026
Merged

feat: Split serial into flashtool and terminal#193
hhvrc merged 12 commits intodevelopfrom
feature/multi-purpose-serial

Conversation

@hhvrc
Copy link
Copy Markdown
Contributor

@hhvrc hhvrc commented Apr 20, 2026

No description provided.

@hhvrc hhvrc self-assigned this Apr 20, 2026
@hhvrc hhvrc added the enhancement New feature or request label Apr 20, 2026
hhvrc added 2 commits April 20, 2026 11:26
# Conflicts:
#	src/routes/flashtool/+page.svelte
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 20, 2026

Deploying openshockapp with  Cloudflare Pages  Cloudflare Pages

Latest commit: a2f7472
Status: ✅  Deploy successful!
Preview URL: https://ea15f34b.openshockapp.pages.dev
Branch Preview URL: https://feature-multi-purpose-serial.openshockapp.pages.dev

View logs

@hhvrc hhvrc marked this pull request as ready for review April 25, 2026 19:29
Copilot AI review requested due to automatic review settings April 25, 2026 19:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the old /flashtool route with a new /terminal route that combines firmware flashing and interactive serial configuration, while refactoring terminal parsing/state and serial connection handling.

Changes:

  • Added a new Serial Terminal page with mode selection (flash vs configure), connection flow, and integrated bottom terminal panel.
  • Introduced a reusable terminal model (ANSI parsing + structured log parsing + TerminalContext) and expanded unit tests.
  • Refactored flashing/serial management into EspSerialConnection and removed the legacy flashtool route/context.

Reviewed changes

Copilot reviewed 14 out of 22 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/routes/terminal/types.ts Adds shared terminal line/log-level types.
src/routes/terminal/constants.ts Adds terminal limits and log-level color mapping.
src/routes/terminal/ansi.ts Adds ANSI + log-line parsing utilities.
src/routes/terminal/ansi.test.ts Adds unit tests for ANSI/log parsing.
src/routes/terminal/TerminalContext.svelte.ts Implements reactive terminal state compatible with IEspLoaderTerminal.
src/routes/terminal/SerialTerminal.svelte Updates terminal UI to use TerminalContext + adds mode-specific behavior.
src/routes/terminal/SerialPortSelector.svelte Adds UI to select/disconnect a serial device port.
src/routes/terminal/RiskAcknowledgementModal.svelte Adds modal to confirm flashing unstable firmware.
src/routes/terminal/ModePicker.svelte Adds flash/configure mode selection UI.
src/routes/terminal/HelpDialog.svelte Adds a step-based troubleshooter dialog.
src/routes/terminal/FirmwareFlasher.svelte Refactors flasher to use EspSerialConnection and bindable isFlashing.
src/routes/terminal/FirmwareBoardSelector.svelte Adds board selection UI with per-version caching.
src/routes/terminal/EspSerialConnection.ts Renames/refactors FlashManager into a connection wrapper with improved failure cleanup + toasts.
src/routes/terminal/DeviceConfigurator.svelte Adds a UART-driven configuration UI that parses `$SYS$
src/routes/terminal/+page.ts Disables SSR for the terminal route.
src/routes/terminal/+page.svelte New terminal page integrating mode flow, connection lifecycle, flashing stepper, and terminal panel.
src/routes/flashtool/flash-context.svelte.ts Removed legacy flashtool connection context.
src/routes/flashtool/HelpDialog.svelte Removed legacy flashtool troubleshooter dialog.
src/routes/flashtool/+page.svelte Removed legacy flashtool page.
src/routes/Sidebar.svelte Updates navigation entry from Flashtool to Serial Terminal.
src/lib/utils/serial-context.svelte.ts Changes useSerial() to return null when Web Serial isn’t supported.
src/lib/components/Stepper.svelte Adds reusable stepper component (horizontal/vertical) used by the new help dialog.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/routes/terminal/+page.svelte Outdated
Comment thread src/routes/terminal/+page.svelte Outdated
Comment thread src/routes/terminal/DeviceConfigurator.svelte
hhvrc and others added 4 commits April 25, 2026 21:36
@hhvrc hhvrc merged commit 9382572 into develop Apr 25, 2026
12 checks passed
@hhvrc hhvrc deleted the feature/multi-purpose-serial branch April 25, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants