Skip to content

Federation: add a 'Join a federated space' flow (domain + space ID) #156

Description

@krazyjakee

Users can join a space homed on a remote server. The client triggers this with a new REST call; the server runs the signed join handshake and returns a mirrored (qualified) space ID that then appears in the space list.

What to do

  • Add a 'Join federated space' entry (e.g. in the add-server / add-space dialog) collecting the remote domain and space ID (or a single spaceId@domain address that the client splits).
  • Call POST /api/v1/federation/spaces/join with { "domain": ..., "space_id": ... }; on success use the returned data.space_id (qualified) as the local space handle.
  • Show the joined space in the space list marked as federated/replica (origin domain visible).
  • Surface server errors (federation disabled, space not federation-enabled, banned) to the user.

Acceptance

  • Entering a valid remote space address joins it and it appears in the list.
  • Errors are shown clearly; the dialog doesn't silently fail.

Server reference

  • Endpoint: POST /api/v1/federation/spaces/join { domain, space_id } -> { data: { space_id } }join_federated_space in src/routes/spaces.rs.
  • Handshake: src/federation/handshake.rs, src/federation/forward.rs (initiate_join).

Client touch points

  • lib/features/server/views/add_server_dialog.dart, lib/features/spaces/controllers/spaces.dart.

Server reference — accordserver branch claude/federated-servers-xlydlj.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfederationCross-server (peer-to-peer) federation

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions