feat(family): Manage Family (part 1: schema, data layer, screens) - #541
Merged
Merged
Conversation
Adds families and family_members with read-only RLS; every write goes through a SECURITY DEFINER RPC that enforces owner/admin/member rules. Seeds the manage_family feature flag row. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Online-only FamilyRepository over the family RPCs, FamilyPermissions mirroring the server rules, and a permission-aware FakeFamilyRepository for tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds the public module for the Manage Family flow: ManageFamilyRootBloc, FamilyListBloc and FamilyDetailBloc interfaces with their screens, strings and test tags. Implementations and wiring follow. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First part of Manage Family, a new More-tab entry for creating families and managing who is in them. This is a draft: the backend, the data layer and the screen contracts are here, but nothing is wired into the app yet.
Permission rules (enforced server-side, mirrored in
FamilyPermissions)In this PR
supabase/migrations/20260916_add_families.sql:familiesandfamily_memberstables. Access rules only allow reads.SECURITY DEFINERRPC that checks the rules above.manage_familyflag row withrollout_percent = 0.FeatureFlagRegistry.ManageFamily(manage_family, default off).client/family/data/{public,impl,testing}:FamilyRepository(online only) calling the RPCs,FamilyPermissions, and aFakeFamilyRepositorythat enforces the same rules.client/family/manage/public:ManageFamilyRootBloc,FamilyListBlocandFamilyDetailBloc.FamilyListScreenandFamilyDetailScreen: member and invite lists, a per-member menu for promote, demote and remove, the invite form (role picker for the owner only), rename, and leave or delete with confirmation.Remaining before this is ready
client/family/manage/impl: bloc and view-model implementations with unit tests.screenshot-testwrappers, reference PNGs).impl-robotsand a flow test throughrunRootBlocTest.supabase db push).send-invite-email.Test plan
./gradlew :client:family:data:public:jvmTest :client:family:data:impl:jvmTest./gradlew :client:family:manage:public:compileKotlinJvm :client:composeApp:compileKotlinJvm./gradlew :client:featureflag:impl:jvmTest🤖 Generated with Claude Code