Skip to content

Explore public spaces, and a Discord-style space menu - #30

Merged
gitautas merged 2 commits into
mainfrom
feat/explore-spaces
Oct 21, 2026
Merged

gitautas merged 2 commits into
mainfrom
feat/explore-spaces

Conversation

@gitautas

Copy link
Copy Markdown
Owner

What

Explore public spaces. A compass button in the spaces rail opens a directory of public spaces:

  • search, and read another server's directory by typing its name
  • open a space to see the rooms inside before joining (/hierarchy)
  • join the space, or individual rooms in it

Space context menu. Right-click a space (press and hold on mobile), modelled on Discord's server menu:

  • mark as read · invite to space
  • mute space · notification settings › (all / @mentions / nothing) · hide muted rooms · browse rooms
  • leave space (red, with an opt-in to also leave rooms only that space holds) · copy space id

Privacy settings, per-server profile and "move to" (folders) have no Matrix equivalent and are left out.

Why / notes for review

  • Joins over federation. join_room now takes via servers, which a room ID from another server's directory needs. Joins also get a 5-minute timeout of their own: the SDK's 30s default was cutting off federated joins (seen joining a matrix.org space from m.uwu.lt) that the server then finished anyway. The join is sent by hand with that timeout, then join_room_by_id_or_alias runs again, which returns instantly now that we're in and does the SDK's local bookkeeping. resolve_room became unused and is removed.
  • Error messages now include their source chain, so transport failures say why (e.g. "operation timed out") instead of a bare "error sending request for url".
  • Space-wide settings are per room underneath. Matrix has no space-level push rule, so mute and notification level apply to every joined room in the space, and the menu reads the current state back from those rooms ("mixed" when they differ). RoomSummary gains notifyMode. New bulk commands set_rooms_notify_mode and mark_rooms_read run room by room, because concurrent push-rule writes race on the SDK's cached ruleset.
  • Mark read without opening a room sends a receipt on the room list's latest event and clears the manual unread flag.
  • Hide muted rooms is a local setting per space (hideMutedInSpaces), and only affects that space's list.
  • New shared ContextMenu (separators, checkboxes, radios, flyout submenus) and isInSpace / roomsInSpace store helpers. filterRooms uses them.

Testing

  • tsc -b clean; vitest 178 passed (new: src/store/spaces.test.ts); cargo test 122 passed; no new clippy warnings
  • Exercised in a stubbed browser harness: directory search, paging, server error, join, browse rooms, every menu action, phone-width layout
  • Not yet verified: against a real homeserver (federated directory reads, via joins, the longer timeout), or long-press on an actual phone

🤖 Generated with Claude Code

gitautas and others added 2 commits October 21, 2026 03:33
A compass in the spaces rail opens a directory of public spaces: search,
read another server's directory, peek at a space's rooms, and join the
space or individual rooms. join_room takes `via` servers so rooms found
on other homeservers can be joined.

Joins get a 5-minute timeout of their own (the SDK's 30s cut off
federated joins the server went on to finish), and error messages now
include their underlying cause instead of a bare "error sending request".

Right-click or long-press a space for mark as read, invite, mute,
notification level, hide muted rooms, browse rooms, leave (in red, with
an option to take rooms only that space holds), and copy space id. Mute
and notification level apply per room, since Matrix has no space-level
setting; room summaries now carry each room's notify mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tiles keep a 16:9 shape in a best-fit grid instead of stretching to fill
rows. Clicking a tile focuses it, with everyone else in a filmstrip;
clicking it again goes back to the grid. Screen shares are their own
tiles and take the stage until someone picks otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gitautas
gitautas merged commit 300aa2b into main Oct 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant