Feat: Create custom profiles and save them in browser storage. Filter serial data for chart and console.#29
Open
A-N-M-Noor wants to merge 4 commits intoatomic14:mainfrom
Open
Conversation
Add ability to save and load settings profiles to browser localStorage:
- Profile dropdown with Default and saved custom profiles
- Auto-detect when settings are modified:
- Modifying Default switches to "Custom" with Save Profile button
- Modifying saved profile shows Save (overwrite) and Save As buttons
- Confirmation dialogs for destructive actions (delete/overwrite)
- Profile name tooltips for long names with truncation
- Settings persist across browser sessions
- Profiles stored in localStorage (wsp.settings.profiles key)
Settings include: autoscale, manual Y-axis range, capacity,
max viewport size, and time mode (absolute/relative).
Add selective data routing with configurable filters: - Lines enclosed in [brackets] can be filtered separately - Chart filter: only plot [bracketed] lines when enabled - Console filter: hide [bracketed] lines when enabled - Both filters enabled by default - Content extraction: [# temp, humidity] → parses as header - Compatible with existing data formats (works with/without brackets) Use case: Send both debug messages and chart data on same serial connection - debug prints to console, sensor data to chart. Filter settings persist in profiles and browser storage.
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.
feat: add settings profile management with browser storage
Add ability to save and load settings profiles to browser local-storage:
feat: add bracket-based data filtering for chart and console
Add selective data routing with configurable filters:
Use case: Send both debug messages and chart data on same serial
connection - debug prints to console, sensor data to chart.
Filter settings persist in profiles and browser storage.
Screenshot
Summary
This fork can save settings to browser storage and can be re-used from a drop-down menu inside the settings panel. It makes maintaining multiple projects at a time easier.
Motivation & Context
I was using this with a project of mine, and I needed to set the Y-scale manually every time I used this tool. This felt a bit annoying. So I though that if I could save those settings to my browser's storage, it could become a totally plug-and-play tool for me. Being able to save multiple profiles would also let me easily switch between projects.
I also need to show regular debug info besides just charts. But sending normal text sometimes breaks the chart. And the console overflows with chart values that I can't see the debug texts there. Therefore I implemented a filter system as well.
Changes
A drop-down menu has been added in the settings panel. It starts with the 'Default' profile. Changing any parameter switches to 'Custom' profile and spawns a 'Save' button. Clicking on the Save button prompts for a name and saves it to the browser's storage. A profile can be deleted, edited, or saved as a new profile at any time.
The settings panel includes two check-boxes. One for removing regular texts from chart, another for removing chart values from the console.
How to Test
Profile system:
Filter system:
[]Checklist
npm run lintand fixed any issuesnpm run typecheck(TypeScript) with no errorsnpm testand tests passnpm run test:coverageif code paths changed significantly