feat: Split serial into flashtool and terminal#193
Merged
Conversation
# Conflicts: # src/routes/flashtool/+page.svelte
Deploying openshockapp with
|
| Latest commit: |
a2f7472
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ea15f34b.openshockapp.pages.dev |
| Branch Preview URL: | https://feature-multi-purpose-serial.openshockapp.pages.dev |
Contributor
There was a problem hiding this comment.
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 (
flashvsconfigure), 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
EspSerialConnectionand 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
No description provided.