Skip to content

feat: Move default channel to app table#1107

Closed
WcaleNieWolny wants to merge 47 commits into
mainfrom
move_default_channel_to_app_table
Closed

feat: Move default channel to app table#1107
WcaleNieWolny wants to merge 47 commits into
mainfrom
move_default_channel_to_app_table

Conversation

@WcaleNieWolny
Copy link
Copy Markdown
Contributor

@WcaleNieWolny WcaleNieWolny commented Apr 2, 2025

feat: Move default channel to app table

Summary

Overview
This PR implements the first part of moving default channel configurations from individual channel records to the application level. This architectural change allows for more centralized management of default channel settings and improves the update delivery workflow.

Changes
Database Schema:
Added new columns to the apps table:
default_channel_ios: Foreign key reference to channels table
default_channel_android: Foreign key reference to channels table
default_channel_sync: Boolean flag to control if iOS and Android channels are synchronized
Removed public column from the channels table
Added migration script to populate these new fields for existing apps

Backend Changes:
Updated API endpoints in channel/get.ts and channel/post.ts to handle the new structure
Modified database utility functions to support the new schema
Updated Supabase type definitions to reflect the database changes

UI Enhancements:
Redesigned app settings page with dedicated section for managing default channels
Added UI for toggling channel sync between platforms
Implemented separate controls for iOS and Android default channels when not synced
Added dialogs for channel selection and confirmation

Localization:
Added new translation keys for default channel settings
Updated existing translations in multiple languages

Technical Details
ON DELETE SET NULL constraints added to foreign key references, ensuring apps can still function if a channel is deleted
Migration automatically determines if existing apps have synced channels and sets the flag accordingly
Added channel sync toggle in the UI with confirmation dialog when switching from separate to synced mode

Summary by CodeRabbit

  • New Features
    • Manage default update channels per platform with optional sync in App Settings, including selection dialogs, conflict resolution, and quick navigation to channel pages.
    • Channel page gains platform default toggles and redirect to settings; “public” now reflects app defaults.
  • Improvements
    • Dialog supports a larger size option for roomy content.
    • Clearer warnings for unsafe bundle deletions.
  • Localization
    • Added/expanded translations for update-channel management across English, German, Spanish, French, Indonesian, Italian, Japanese, Korean, Polish, Portuguese (BR), Russian, Turkish, Vietnamese, and Chinese (Simplified).

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants