Skip to content

New channel config#807

Merged
danditomaso merged 8 commits into
meshtastic:mainfrom
philon-:new-channel-config
Sep 1, 2025
Merged

New channel config#807
danditomaso merged 8 commits into
meshtastic:mainfrom
philon-:new-channel-config

Conversation

@philon-

@philon- philon- commented Aug 24, 2025

Copy link
Copy Markdown
Contributor

Description

This PR refactors the Channel config page, incorporating it into the existing structure for device and module config. Changes to channel settings are saved to a draft state and pushed to the device in a batch fashion. The channel import dialog is also improved, allowing the user to opt out of saving LoRa settings, as well as saving channel configuration to draft instead of immediately committing to the device.

Related Issues

Fixes #699

Changes Made

  • Added workingChannelConfig in device store for staged channel edits
  • Introduced new ChannelConfig page with tabbed UI for per-channel editing
  • Integrated channel config into the main device config workflow
  • Refactored channel config and import dialog logic for better state management
  • Improved form handling with global valid / dirty state instead of field error arrays
  • Updated DynamicForm and all config/module components to adopt new form state
  • Enhanced ImportDialog with better UI, slot selection fix, and i18n improvements
  • Ensured form values are properly reset and validated
  • Removed old channels route and sidebar entry
  • Updated and expanded i18n strings for config and import/export workflows

Testing Done

Tested locally. No automated tests were created.

Screenshots (if applicable)

Channel config page
Screenshot 2025-08-24 at 20 58 20

Step 1 of channel import
Screenshot 2025-08-24 at 22 00 03

Default settings
Screenshot 2025-08-24 at 22 00 36

Optional choice of channel slot
Screenshot 2025-08-24 at 22 00 44

Checklist

  • Code follows project style guidelines
  • Documentation has been updated or added
  • Tests have been added or updated
  • All i18n translation labels have been added (read
    CONTRIBUTING_I18N_DEVELOPER_GUIDE.md for more details)

Add staged channel config with tabbed UI, import/export workflow, and global form state refactor
Copilot AI review requested due to automatic review settings August 24, 2025 20:06
@vercel

vercel Bot commented Aug 24, 2025

Copy link
Copy Markdown

@philon- is attempting to deploy a commit to the Meshtastic Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors the channel configuration system to integrate it into the main device configuration workflow. The changes enable staged channel edits through a draft state system and improve the channel import dialog with better state management and UI enhancements.

  • Integrates channel configuration into the main config page with tabbed UI
  • Implements working channel config state for staged edits before committing
  • Refactors form state management from field-level errors to global form validation
  • Enhances import dialog with slot selection and optional LoRa settings import

Reviewed Changes

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

Show a summary per file
File Description
packages/web/src/validation/channel.ts Adds type export for channel validation schema
packages/web/src/routes.tsx Removes old channels route
packages/web/src/pages/Messages.tsx Updates import path for getChannelName function
packages/web/src/pages/Config/index.tsx Integrates channel config and updates form state management
packages/web/src/pages/Config/ChannelConfig.tsx New channel config page with tabbed interface
packages/web/src/pages/Channels.tsx Removes old channels page
packages/web/src/core/stores/deviceStore/index.ts Adds working channel config state management
packages/web/src/core/stores/appStore/index.ts Replaces field-level error tracking with global form state
packages/web/src/components/Form/DynamicForm.tsx Updates to use new global form state system
packages/web/src/components/Dialog/ImportDialog.tsx Enhances import dialog with slot selection and optional settings

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/web/src/pages/Config/DeviceConfig.tsx

This comment was marked as outdated.

@philon- philon- requested a review from Copilot August 24, 2025 20:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors the Channel config page to integrate it into the existing device and module config structure. Changes to channel settings are now saved to a draft state and pushed to the device in batches rather than immediately. The channel import dialog has also been enhanced with better UI and the ability to opt out of LoRa settings.

  • Adds working channel config state management for staged channel edits
  • Integrates channel configuration into main config workflow with tabbed UI
  • Refactors form handling to use global valid/dirty state instead of field error arrays

Reviewed Changes

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

Show a summary per file
File Description
packages/web/src/validation/channel.ts Adds type export for channel validation
packages/web/src/routes.tsx Removes old channels route
packages/web/src/pages/Messages.tsx Updates import path for getChannelName
packages/web/src/pages/Config/index.tsx Integrates channel config into main config workflow
packages/web/src/pages/Config/ChannelConfig.tsx New channel config page with tabbed interface
packages/web/src/pages/Channels.tsx Removes old channels page
packages/web/src/core/stores/deviceStore/index.ts Adds working channel config state management
packages/web/src/core/stores/appStore/index.ts Replaces error array with global form validation state
packages/web/src/components/Form/DynamicForm.tsx Updates to use new global form state
packages/web/src/components/Dialog/ImportDialog.tsx Enhanced import dialog with slot selection

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/web/src/pages/Config/index.tsx Outdated
Comment thread packages/web/src/pages/Config/DeviceConfig.tsx
Comment thread packages/web/src/components/PageComponents/ChannelConfig/Channel.tsx Outdated
Comment thread packages/web/src/components/Dialog/ImportDialog.tsx
Comment thread packages/web/src/components/Form/FormPasswordGenerator.tsx Outdated

@danditomaso danditomaso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall this is an excellent PR, I'd love to see the "setIsDirty" and "setIsValid" is refactored into a single union value, this way avoids the case where it could be both dirty and valid by accident.

Comment thread packages/web/public/i18n/locales/en/dialog.json Outdated
Comment thread packages/web/public/i18n/locales/en/dialog.json Outdated
Comment thread packages/web/public/i18n/locales/en/ui.json Outdated
Comment thread packages/web/src/components/Dialog/ImportDialog.tsx
Comment thread packages/web/src/components/Form/DynamicForm.tsx Outdated
Comment thread packages/web/src/core/stores/appStore/index.ts Outdated
Comment thread packages/web/src/pages/Config/index.tsx Outdated
@philon- philon- requested a review from danditomaso August 29, 2025 18:24
@vercel

vercel Bot commented Sep 1, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
web-test Ready Ready Preview Comment Sep 1, 2025 1:03pm

@danditomaso danditomaso merged commit 1946000 into meshtastic:main Sep 1, 2025
4 checks passed
@philon- philon- deleted the new-channel-config branch September 1, 2025 13:10
This was referenced Sep 10, 2025
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.

[Bug]: Import Channel Set Doesn't Provide Status or Dismiss Screen

3 participants