-
-
Notifications
You must be signed in to change notification settings - Fork 67
feat: enforce default channel validation (max 3, one per platform) #1387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/add-electron-platform
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: riderx <[email protected]>
Co-authored-by: riderx <[email protected]>
Co-authored-by: riderx <[email protected]>
Co-authored-by: riderx <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|



Summary
Implements backend validation to prevent public channel conflicts: maximum 3 public channels per app, and only one public channel per platform (iOS/Android/Electron). Users can now have either one universal default channel OR up to three platform-specific channels without ambiguity.
Implementation:
utils/supabase.ts):validatePublicChannels()runs pre-upsert, checks channel count and platform uniqueness, throws typed errors (max_public_channels,duplicate_platform_{ios|android|electron})public/channel/post.ts): Addedelectronfield support to match iOS/Android patternchannel_default_validation.test.ts): Valid configs (single multi-platform, three single-platform, mixed), invalid configs (4+ channels, platform duplicates), update scenariosdocs/DEFAULT_CHANNEL_VALIDATION.md): Rules reference, error messages, migration guidanceExample validation:
Private channels unaffected. Validation uses final channel state (merges update with existing values).
Test plan
bun test:backendto verify validation test suitemax_public_channelserrorduplicate_platform_*errorScreenshots
N/A - Backend validation only
Checklist
bun run lint:backend && bun run lint.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.