Skip to content

feat: support PlatformIO monitor filters#653

Merged
zackees merged 1 commit into
mainfrom
feat/644-monitor-filters
Jun 19, 2026
Merged

feat: support PlatformIO monitor filters#653
zackees merged 1 commit into
mainfrom
feat/644-monitor-filters

Conversation

@zackees

@zackees zackees commented Jun 19, 2026

Copy link
Copy Markdown
Member

Summary

  • add monitor_filters to BoardConfig with ESP32-family defaults
  • preserve explicit monitor_filters from platformio.ini through board overrides
  • expose monitor_filters_ini_value() for generated platformio.ini emission and document the key

Closes #644

Tests

  • soldr cargo test -p fbuild-config monitor_filters
  • soldr cargo test -p fbuild-config
  • soldr cargo clippy -p fbuild-config --all-targets -- -D warnings

Summary by CodeRabbit

  • New Features

    • Added support for configurable serial monitor filters through the new monitor_filters setting in platformio.ini.
    • ESP32 boards now include intelligent default filters (default, esp32_exception_decoder) to enhance serial monitor output by default.
    • Users can easily customize or completely suppress monitor filters on a per-environment basis.
  • Documentation

    • Updated the platformio.ini reference documentation with monitor_filters configuration examples and detailed usage instructions.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4242b71c-9ff5-4582-bd00-54f49152da38

📥 Commits

Reviewing files that changed from the base of the PR and between 4cb4c35 and d32cf55.

📒 Files selected for processing (8)
  • crates/fbuild-config/src/board/loaders.rs
  • crates/fbuild-config/src/board/methods.rs
  • crates/fbuild-config/src/board/tests.rs
  • crates/fbuild-config/src/board/tests_enriched_json.rs
  • crates/fbuild-config/src/board/types.rs
  • crates/fbuild-config/src/ini_parser/mod.rs
  • crates/fbuild-config/src/ini_parser/tests.rs
  • docs/reference/platformio-ini.md

📝 Walkthrough

Walkthrough

Adds monitor_filters as an optional Vec<String> field in BoardConfig. The INI parser's get_board_overrides now captures the monitor_filters key. New helpers parse_monitor_filters and resolve_monitor_filters handle empty/[] inputs and apply an ESP32-family default. A new monitor_filters_ini_value() accessor serializes the list. Both board loader constructors are wired to use these helpers. Tests and docs are updated accordingly.

Changes

monitor_filters support in BoardConfig

Layer / File(s) Summary
BoardConfig field and INI override extraction
crates/fbuild-config/src/board/types.rs, crates/fbuild-config/src/ini_parser/mod.rs
Adds monitor_filters: Option<Vec<String>> to BoardConfig with Serde annotations, and extends get_board_overrides with an else if branch to pass monitor_filters through the overrides map.
Parsing, resolution helpers, accessor, and constructor wiring
crates/fbuild-config/src/board/loaders.rs, crates/fbuild-config/src/board/methods.rs
Introduces parse_monitor_filters (handles empty/[], splits on newlines/commas) and resolve_monitor_filters (override → defaults → ESP32 fallback priority chain). Adds monitor_filters_ini_value() accessor joining filters with ", ". Both from_boards_txt and from_board_id_in_project constructors are wired to populate monitor_filters.
Tests and documentation
crates/fbuild-config/src/board/tests.rs, crates/fbuild-config/src/board/tests_enriched_json.rs, crates/fbuild-config/src/ini_parser/tests.rs, docs/reference/platformio-ini.md
Adds unit tests for absent, comma-separated, and empty-array filter inputs; an esp32dev default filters regression test; an INI parser test verifying monitor_filters override preservation; and documentation for the monitor_filters key including ESP32 default behavior and suppression via [].

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hop, hop, the filters align,
ESP32 backtraces now shine!
With default, esp32_exception_decoder in tow,
The serial monitor puts on a show.
An empty [] to hush the default—
Such elegant config, no fault!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/644-monitor-filters

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackees zackees merged commit 13a9bbd into main Jun 19, 2026
87 of 91 checks passed
@zackees zackees deleted the feat/644-monitor-filters branch June 19, 2026 19:12
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

feat: support PlatformIO monitor_filters

1 participant