-
-
Notifications
You must be signed in to change notification settings - Fork 41
Add device and production build options to channel settings #443
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
Conversation
… related interfaces
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on January 17. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
📝 WalkthroughWalkthroughThis PR extends channel targeting capabilities by adding support for production builds and physical devices. New boolean fields ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/api/channels.tssrc/app/debug.tssrc/channel/set.tssrc/index.tssrc/sdk.tssrc/types/supabase.types.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: check-posix-paths-macos
- GitHub Check: Run tests
🔇 Additional comments (14)
src/types/supabase.types.ts (3)
546-547: LGTM! Consistent schema extension for device targeting.The new
allow_devicefield is properly added across Row, Insert, and Update types for the channels table, following the same pattern as existingallow_emulatorandallow_devfields.Also applies to: 566-567, 586-587
549-549: LGTM! Consistent schema extension for production build targeting.The new
allow_prodfield is properly added across Row, Insert, and Update types for the channels table, following existing patterns.Also applies to: 569-569, 589-589
2904-2904: LGTM! New stats actions aligned with channel filtering.The new
disableProdBuildanddisableDeviceenum values properly extend the observable actions for the new channel targeting options.Also applies to: 2906-2906
src/app/debug.ts (1)
117-117: LGTM! Debug action mappings properly extended.The new
disableProdBuildanddisableDeviceaction mappings are consistent with existing patterns and provide clear, actionable error messages.Also applies to: 119-119
src/api/channels.ts (2)
188-188: LGTM! Channel interface properly extended.The new
allow_deviceandallow_prodboolean fields are added consistently to the Channel interface, following the pattern of existing fields likeallow_devandallow_emulator.Also applies to: 190-190
236-236: LGTM! Query properly selects new fields.The
getActiveChannelsquery correctly selectsallow_deviceandallow_prodto populate the Channel interface.Also applies to: 238-238
src/channel/set.ts (4)
34-35: LGTM! Interface properly extended for new targeting options.The
deviceandprodoptional boolean fields are added toOptionsSetChannel, following the existing pattern fordevandemulatoroptions.
86-87: LGTM! Options properly destructured.The new
deviceandprodoptions are correctly destructured alongside existing channel options.
119-120: LGTM! Validation properly updated to include new options.The no-op guard correctly includes
deviceandprodin the check to ensure at least one channel option is provided.
293-303: LGTM! Consistent implementation of device and prod targeting.The handling of
deviceandprodoptions follows the exact same pattern as existingdevandemulatoroptions, with appropriate logging and payload updates.src/index.ts (2)
405-405: LGTM! Command description updated to reflect new targeting options.The channel set command description now accurately mentions device targeting including production builds and physical devices.
429-430: LGTM! CLI options properly added for device and prod targeting.The new
--prod/--no-prodand--device/--no-deviceoptions follow the existing pattern for boolean flags and have clear, descriptive help text.Also applies to: 433-434
src/sdk.ts (2)
256-259: LGTM! SDK interface properly extended with documentation.The
deviceandprodoptional boolean fields are added toUpdateChannelOptionswith clear JSDoc comments, following the pattern of existing targeting options.
1145-1146: LGTM! Options properly propagated to internal implementation.The
deviceandprodoptions are correctly passed from the public SDK options to the internalOptionsSetChannel, ensuring the targeting settings are applied when updating channels.
| const t = new Table() | ||
| t.theme = Table.roundTheme | ||
| t.headers = ['Name', 'Version', 'Public', 'iOS', 'Android', 'Auto Update', 'Native Auto Update', 'Device Self Set', 'Progressive Deploy', 'Secondary Version', 'Secondary Version Percentage', 'AB Testing', 'AB Testing Version', 'AB Testing Percentage', 'Emulator', 'Dev'] | ||
| t.headers = ['Name', 'Version', 'Public', 'iOS', 'Android', 'Auto Update', 'Native Auto Update', 'Device Self Set', 'Progressive Deploy', 'Secondary Version', 'Secondary Version Percentage', 'AB Testing', 'AB Testing Version', 'AB Testing Percentage', 'Emulator', 'Device', 'Dev', 'Prod'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical mismatch between table header and row values.
The header array at line 200 contains 18 columns, but the row array (lines 204-217) only pushes 12 values. This will cause misaligned table display.
The header includes columns like 'Progressive Deploy', 'Secondary Version', 'Secondary Version Percentage', 'AB Testing', 'AB Testing Version', and 'AB Testing Percentage' that have no corresponding values in the row data.
🔎 Proposed fix
Either remove the extra columns from the header or add the missing row values:
- t.headers = ['Name', 'Version', 'Public', 'iOS', 'Android', 'Auto Update', 'Native Auto Update', 'Device Self Set', 'Progressive Deploy', 'Secondary Version', 'Secondary Version Percentage', 'AB Testing', 'AB Testing Version', 'AB Testing Percentage', 'Emulator', 'Device', 'Dev', 'Prod']
+ t.headers = ['Name', 'Version', 'Public', 'iOS', 'Android', 'Auto Update', 'Native Auto Update', 'Device Self Set', 'Emulator', 'Device', 'Dev', 'Prod']Also applies to: 204-217



Introduce options for allowing physical devices and production builds in channel settings, enhancing configuration flexibility for users.
Summary by CodeRabbit
--prodand--no-prodflags to control production build targeting in channel configurations.--deviceand--no-deviceflags to control physical device targeting in channel configurations.✏️ Tip: You can customize this high-level summary in your review settings.