Skip to content

fix(api): honor the Enabled checkbox on notification-channel create (#600) - #611

Merged
badbread merged 1 commit into
mainfrom
fix/channel-create-enabled
Aug 25, 2026
Merged

fix(api): honor the Enabled checkbox on notification-channel create (#600)#611
badbread merged 1 commit into
mainfrom
fix/channel-create-enabled

Conversation

@badbread

Copy link
Copy Markdown
Owner

Fixes #600.

The new-channel form sends enabled, but CreateChannelRequest had no such field, so serde dropped it and create hardcoded enabled: true. Unchecking Enabled while creating a channel produced an enabled channel anyway.

Fix: add enabled to CreateChannelRequest with a serde default of true (legacy clients and the common case are byte-for-byte unchanged) and honor it in the create handler. No client change, the form already sends the field.

Test: create_honors_enabled_false_and_defaults_true in notification_pane.rs covers enabled:false honored, absent-defaults-true, and persistence across a reload.

Gate green on dev2: fmt + clippy -D warnings + cargo test --workspace.

The create form sends `enabled`, but CreateChannelRequest had no such field so
serde dropped it and create hardcoded `enabled: true`. Unchecking Enabled while
creating a channel produced an enabled channel anyway.

Add `enabled` (serde default true, so legacy clients and the common case are
unchanged) and honor it in create. Regression test covers enabled:false honored,
absent-defaults-true, and persistence across a reload.

Fixes #600

Signed-off-by: badbread <badbread@users.noreply.github.com>
@badbread
badbread merged commit 530ada6 into main Aug 25, 2026
7 checks passed
@badbread
badbread deleted the fix/channel-create-enabled branch August 25, 2026 19:57
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.

Console: 'Enabled' checkbox on channel *create* is silently ignored

1 participant