Skip to content

Matrix coverage: pins, mute, saved items, room directory - #7

Open
hsmith-dev wants to merge 1 commit into
feat/matrix-rich-textfrom
feat/matrix-coverage
Open

hsmith-dev wants to merge 1 commit into
feat/matrix-rich-textfrom
feat/matrix-coverage

Conversation

@hsmith-dev

Copy link
Copy Markdown
Owner

What and why

Gap 0.7 (stacked on #6): the Matrix features that used to answer "not available on Matrix yet".

  • Pins use m.room.pinned_events, so other clients see them.
  • Mute uses a room push rule; saved items live in account data dev.chatcraft.saved. Both follow you across devices and restarts.
  • Room directory: channel.directory searches the homeserver's public rooms; Browse channels lists them with Join buttons. channel.join accepts a room id or #alias:server.
  • Public channels get an address. Many homeservers (Synapse by default) only let admins list rooms in the directory; the creator is told, and the address still works.

Bugs found while testing (fixed)

  • A message's sender (which carries no name) reset that person's display name to their username.
  • Quick restarts got stale account data (e.g. a mute) from Synapse's sync response cache, because every launch sent the same from-scratch sync. The first sync now continues from the stored token; the snapshot reads the store and fetches history itself.
  • Room version 12 ids have no :server part; joining by id assumed one.

Testing

  • cargo xtask ci passes; all Matrix integration tests pass.
  • New integration test against Synapse covers both directory policies (listed → join from the directory; not listed → creator is told, join by address), a pin seen by the other person, and saved items and mutes surviving a restart.
  • Mapper regression test for the name reset.

🤖 Generated with Claude Code

- pins via m.room.pinned_events (read on every room refresh, set and
  cleared with pin/unpin_event)
- mute via room push rules; saved items in account data
  dev.chatcraft.saved (kept as the source of truth beyond loaded history)
- channel.directory searches the homeserver's public rooms (signed in,
  server-side filter); channel.join takes a room id or #alias:server;
  public channels get an alias, and the creator is told when the server
  won't list them
- fix: a message sender (no name) reset a person's display name
- fix: start from the stored sync token; repeated from-scratch syncs were
  answered from Synapse's response cache with stale account data
- fix: room v12 ids have no server part
- member lists refreshed once per launch
- Browse dialog shows public rooms with Join buttons
- integration test covers both directory policies (listed, and address
  only) and persistence of saved items and mutes across restarts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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