Matrix: a space can be made but not filled #126

Closed
opened 2026-09-06 12:04:35 -04:00 by Salastil · 1 comment
Owner

createMatrixRoom takes isSpace and makes one, and the hierarchy of an existing
space is read - m.space.child events are parsed in backend/matrix/rooms.rs:90.
Nothing writes them. setMatrixRoomState (rpc/methods.rs:3490) sets a name or a
topic and refuses everything else.

So a space created in moho stays empty forever, and a space made elsewhere can be
looked at but not rearranged: no adding a room, no removing one, no ordering.

What is needed

  • Write m.space.child in the space (via state_key = the child's room id, with
    via servers) and optionally m.space.parent in the child, which is what makes the
    relationship two-way and lets the child claim its canonical parent.
  • Remove by sending an empty content for that state key, which is how Matrix deletes
    a child.
  • The gesture: dragging a room onto a space, or an entry on the room's own menu. The
    buffer list already has drag-to-file for categories (components/BufferList.tsx),
    which is the same shape - though a space is the server's own grouping and a category
    is this window's, and the two should not be quietly conflated.

Done looks like: a space created here can have rooms put in it, and they appear in
Element under the same space.

Reference: Element.

`createMatrixRoom` takes `isSpace` and makes one, and the hierarchy of an existing space is read - `m.space.child` events are parsed in `backend/matrix/rooms.rs:90`. Nothing writes them. `setMatrixRoomState` (`rpc/methods.rs:3490`) sets a name or a topic and refuses everything else. So a space created in moho stays empty forever, and a space made elsewhere can be looked at but not rearranged: no adding a room, no removing one, no ordering. **What is needed** - Write `m.space.child` in the space (via `state_key` = the child's room id, with `via` servers) and optionally `m.space.parent` in the child, which is what makes the relationship two-way and lets the child claim its canonical parent. - Remove by sending an empty content for that state key, which is how Matrix deletes a child. - The gesture: dragging a room onto a space, or an entry on the room's own menu. The buffer list already has drag-to-file for categories (`components/BufferList.tsx`), which is the same shape - though a space is the server's own grouping and a category is this window's, and the two should not be quietly conflated. **Done looks like:** a space created here can have rooms put in it, and they appear in Element under the same space. Reference: Element.
Salastil added the featureprotocol labels 2026-09-06 12:04:35 -04:00
Salastil removed the protocol label 2026-09-06 12:49:16 -04:00
Author
Owner

Finished — https://git.salastil.com/Salastil/nobilis/commit/5ddd786 and https://git.salastil.com/Salastil/moho/commit/8608c8d

m.space.child is written now, both directions, keyed by the child's room id — and removal sends empty content, which is how Matrix spells "no longer a child" since it has no delete. The child is told about its parent too where this account may say so, and allowed to fail where it may not: adding your own room to somebody else's space is a thing you can do without power in the space.

On a room's own context menu, listing that account's spaces, because a space is the server's grouping rather than the window's own categories.

Verified live on poa.st: created a space, added a room to it — the room's group moved to the space's rail entry, so it really appears under it — then removed it and left the space.

Finished — https://git.salastil.com/Salastil/nobilis/commit/5ddd786 and https://git.salastil.com/Salastil/moho/commit/8608c8d `m.space.child` is written now, both directions, keyed by the child's room id — and removal sends empty content, which is how Matrix spells "no longer a child" since it has no delete. The child is told about its parent too where this account may say so, and allowed to fail where it may not: adding your own room to somebody else's space is a thing you can do without power in the space. On a room's own context menu, listing that account's spaces, because a space is the server's grouping rather than the window's own categories. Verified live on poa.st: created a space, added a room to it — the room's group moved to the space's rail entry, so it really appears under it — then removed it and left the space.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#126