Repository navigation
feat(relationships): system relationships (types + member/group edges) - #26
Merged
Merged
Conversation
Brings the intra-system relationships feature to Android, matching web. It maps how a user's own members (and groups) relate to each other - there is no cross-system/federation, request/accept flow, or external identity. Two layers: - Relationship types (Settings > System > Relationships): a per-system vocabulary. Create/edit/delete with a Kind of symmetric (one label), directional (two labels), or either (both, with an optional mutual), optionally starting from a preset. Kind is immutable after creation (server-enforced); deleting a type warns that it cascades its edges. - Edges: add/remove relationships from a member or group's edit screen, picking the other party and (for directional/either types) the direction or a mutual flag. The member/group profiles show them read-only. Labels and direction are resolved server-side per viewpoint, so the client just renders them; the reusable RelationshipsEditor works for both scopes. The edge-create payload builder (source/target orientation, mutual normalisation) mirrors web's handleAdd and is unit-tested. The whole-system force-directed graph view is deferred to a follow-up.
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.
Brings the system relationships feature to Android, matching web. Despite the name it is entirely intra-system: a private graph a user draws among their own members (and groups). No cross-system/federation, no request/accept flow, no external identity - the counterparty is always another member/group already in the account.
Two layers
Relationship types (Settings > System > Relationships) - a per-system vocabulary:
Edges - a reusable
RelationshipsEditorembedded on member and group screens:RelationshipFromViewpointas-is (direction glyph +label: other name). No edit-in-place for edges (delete + recreate), matching the backend.Notable details
buildRelationshipEdge) mirrors web'shandleAdd(source/target orientation for forward vs reverse, mutual normalisation foreither) and is pure + unit-tested.RelationshipModels.kt(string-typed enums per project convention) + a// Relationshipsgroup of 10 endpoints inSheafApiService.kt.relationships:read/write/delete; the main-app session token has them (web works). A 403 would be a backend/token concern.Deferred (follow-up)
/relationships/graph) - a dedicated Compose-canvas PR.Testing
RelationshipEdgePayloadTest: symmetric, directional forward/reverse (source swap), either+mutual, either-directional, mutual-ignored-for-non-either, visibility always private.:app:assemblePlayRelease+:wear:assembleReleasegreen (through R8); unit suite green; em-dash clean.eithertype; remove one; repeat on a group; delete a type and confirm its edges vanish (cascade); confirm dup-name / duplicate-pair (409) surface a readable error.