Skip to content

feat: Improved serial flasher#183

Merged
hhvrc merged 10 commits intodevelopfrom
feature/improved-serial-flasher
Apr 5, 2026
Merged

feat: Improved serial flasher#183
hhvrc merged 10 commits intodevelopfrom
feature/improved-serial-flasher

Conversation

@hhvrc
Copy link
Copy Markdown
Contributor

@hhvrc hhvrc commented Apr 1, 2026

Summary

  • Add a persistent serial terminal panel with ANSI-colored output, command input with history, and auto-scroll
  • Parse OpenShock ([uptimeMs][LEVEL][tag]) and ESP-IDF (LEVEL (uptimeMs) TAG:) log formats to color output by log level and display device uptime
  • Rework flashtool UI into a guided 4-step wizard (Connect → Channel → Board → Flash)
  • Refactor FlashManager to connect in application mode first, entering bootloader lazily only when flashing
  • Scope FlashManager lifecycle to the component via FlashContext

Details

  • SerialTerminal: new component with 5000-line buffer, copy/clear/reset controls, and monospace rendering of parsed ANSI SGR sequences
  • ansi.ts: lightweight ANSI parser + log line parser that extracts log level, device uptime, and source tag from serial output
  • FlashManager: application-mode connect with serial read loop, proper reader/writer lock cleanup on loop exit, and explicit return from ensureApplication()
  • Stepper UX: step confirmation now tracks both channel and version, step buttons have aria-labels for accessibility

hhvrc and others added 3 commits March 23, 2026 00:05
Resolve conflicts: keep stepper UI and ANSI terminal from branch,
adopt lucide v1 icon names from develop. Fix lint errors in
SerialTerminal (unused import, bare expression, missing each keys).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts in flashtool: keep stepper UI and ANSI terminal
from feature branch, adopt scoped serial/flash lifecycle contexts
from develop. Update FlashContext to use ConnectApplication.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hhvrc hhvrc self-assigned this Apr 1, 2026
Copilot AI review requested due to automatic review settings April 1, 2026 05:52
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 1, 2026

Deploying openshockapp with  Cloudflare Pages  Cloudflare Pages

Latest commit: c629952
Status: ✅  Deploy successful!
Preview URL: https://9942005f.openshockapp.pages.dev
Branch Preview URL: https://feature-improved-serial-flas.openshockapp.pages.dev

View logs

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

Adds an improved serial console experience to the flashtool page, including ANSI-colored output rendering and a persistent terminal panel, while adjusting FlashManager to support connecting in “application mode” first and entering bootloader mode lazily.

Changes:

  • Introduces a new SerialTerminal component with command history, auto-scroll, and line capping for display.
  • Adds a lightweight ANSI SGR parser to render colored/styled serial output.
  • Refactors FlashManager connection flow to support ConnectApplication() and starts an application serial read loop on connect.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/routes/flashtool/SerialTerminal.svelte New terminal UI component rendering segmented ANSI output and command input.
src/routes/flashtool/FlashManager.ts Adds application-mode connect/read-loop path and bootloader connect rename.
src/routes/flashtool/flash-context.svelte.ts Switches connect flow to ConnectApplication().
src/routes/flashtool/ansi.ts New ANSI parser/stripper for styled terminal output.
src/routes/flashtool/+page.svelte Reworks UI into a stepper flow and integrates persistent terminal + ANSI parsing.

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

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.


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

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.


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

@hhvrc hhvrc merged commit 3fe94a9 into develop Apr 5, 2026
12 checks passed
@hhvrc hhvrc deleted the feature/improved-serial-flasher branch April 5, 2026 02:31
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.

2 participants