Skip to content

Initial support for Matrix#2

Open
cfpwastaken wants to merge 26 commits intomainfrom
matrix
Open

Initial support for Matrix#2
cfpwastaken wants to merge 26 commits intomainfrom
matrix

Conversation

@cfpwastaken
Copy link
Copy Markdown
Collaborator

@cfpwastaken cfpwastaken commented May 1, 2026

  • Login
  • Register
  • MXC (Content Repository)
  • Rooms
    • Showing rooms
    • Viewing rooms
    • Viewing messages
    • Sending messages
    • Creating rooms
    • Inviting to rooms
    • Joining rooms
    • Leaving rooms
    • Viewing members
image

@cfpwastaken cfpwastaken marked this pull request as draft May 1, 2026 20:17
@cfpwastaken cfpwastaken mentioned this pull request May 2, 2026
47 tasks
@cfpwastaken cfpwastaken marked this pull request as ready for review May 2, 2026 10:38
@cfpwastaken cfpwastaken changed the title Matrix Initial support for Matrix May 2, 2026
@cfpwastaken cfpwastaken requested review from Copilot and j0code May 2, 2026 13:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds initial Matrix (client-server) support to the Threadlet client, shifting core chat concepts from the existing forum/post/message model toward Matrix rooms and events, along with a new login/register flow and UI updates.

Changes:

  • Introduces a Matrix client wrapper and boot flow (login/register, start sync, room list + room views).
  • Adds event rendering for common Matrix message/event types (text, image, file, audio, video, notice, emote, room name) plus an unknown-event fallback.
  • Updates UI layout and components (member list, context menus, room creation/invites) and replaces message list plumbing with an event list.

Reviewed changes

Copilot reviewed 34 out of 37 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
client/vite.config.js Adjusts Vite HMR websocket protocol for development.
client/style.css Adds layout/styles for members pane, events list, dialogs, and login UI.
client/src/matrix.ts Creates Matrix client instance and starts it based on stored credentials.
client/src/main.ts Switches app bootstrap to Matrix-based App/Login and registers Matrix views.
client/src/comps/App.ts Adds Matrix room list syncing + member list pane and view rendering adjustments.
client/src/comps/Avatar.ts New avatar component backed by Matrix profile + MXC images/fallback initials.
client/src/comps/ChannelList.ts Converts channel list to render Matrix rooms and handle membership/invites.
client/src/comps/ChatInput.ts Sends Matrix m.text messages from a room view (post flow stubbed).
client/src/comps/ContextMenu.ts Adds right-click context menu primitive used by room tabs.
client/src/comps/EventList.ts Replaces message list with Matrix event list + event renderer.
client/src/comps/FormCheckbox.ts Adds checkbox form input (used in room creation).
client/src/comps/ForumTab.ts Converts tab to a Matrix room tab with context menu (leave room).
client/src/comps/Login.ts Adds Matrix homeserver selection + password login and registration dialogs.
client/src/comps/MemberList.ts Adds room member list rendering + invite prompt action.
client/src/comps/MXCImage.ts Adds component to resolve/render MXC media URLs.
client/src/comps/PostView.ts Swaps MessageList usage to EventList (plumbing change).
client/src/comps/RoomCreationForm.ts Adds Matrix room creation UI including federation toggle.
client/src/comps/RoomInviteView.ts Adds invite accept/decline UI for rooms where membership isn’t join.
client/src/comps/RoomView.ts Adds room timeline rendering + live updates via Matrix timeline events.
client/src/comps/Message.ts Refactors message component toward Matrix event backing (still present).
client/src/comps/events/Event.ts Adds event-type and msgtype dispatch to specific render components.
client/src/comps/events/EventBase.ts Introduces base event component type holding a MatrixEvent.
client/src/comps/events/ChatMessageBase.ts Base renderer for chat-style events (avatar/name/timestamp/content).
client/src/comps/events/EventMessageBase.ts Base renderer for non-chat event rows (avatar + inline content).
client/src/comps/events/RoomTextMessage.ts Renders m.text messages.
client/src/comps/events/RoomImageMessage.ts Renders m.image messages via MXC image component.
client/src/comps/events/RoomFileMessage.ts Renders m.file messages as download links.
client/src/comps/events/RoomAudioMessage.ts Renders m.audio messages with an <audio> element.
client/src/comps/events/RoomVideoMessage.ts Renders m.video messages with a <video> element.
client/src/comps/events/RoomNoticeMessage.ts Renders m.notice messages with subdued styling.
client/src/comps/events/RoomEmoteMessage.ts Renders m.emote-style messages.
client/src/comps/events/RoomNameEvent.ts Renders m.room.name state events as a system message.
client/src/comps/events/UnknownEvent.ts Renders unhandled events as JSON for visibility/debugging.
client/package.json Replaces Discord SDK deps with matrix-js-sdk.
client/package-lock.json Updates lockfile for dependency changes, including Matrix SDK.
client/bun.lock Adds Bun lockfile for the same dependency set.
Files not reviewed (1)
  • client/package-lock.json: Language not supported

Comment thread client/src/comps/Avatar.ts
Comment thread client/src/matrix.ts Outdated
Comment thread client/src/comps/Login.ts Outdated
Comment thread client/src/comps/RoomView.ts Outdated
Comment thread client/src/comps/Login.ts Outdated
Comment thread client/src/comps/ChatInput.ts Outdated
Comment thread client/src/comps/events/RoomEmoteMessage.ts Outdated
Comment thread client/src/comps/events/RoomNoticeMessage.ts Outdated
Comment thread client/src/comps/events/RoomAudioMessage.ts Outdated
cfpwastaken and others added 9 commits May 2, 2026 15:27
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@cfpwastaken cfpwastaken requested a review from Copilot May 2, 2026 14:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 35 out of 38 changed files in this pull request and generated 14 comments.

Files not reviewed (1)
  • client/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

client/src/comps/EventList.ts:6

  • This file still imports Threadlet/Post message types, api, and Message, but the implementation now only operates on MatrixEvent and renderEvent(). Remove unused imports to avoid confusion and keep the module focused on Matrix events.

Comment thread client/src/comps/FormCheckbox.ts
Comment thread client/src/comps/events/HTMLFormat.ts
Comment thread client/src/comps/events/RoomNoticeMessage.ts
Comment thread client/src/comps/events/RoomNameEvent.ts
Comment thread client/src/comps/events/ChatMessageBase.ts
Comment thread client/src/comps/events/RoomVideoMessage.ts
Comment thread client/src/comps/events/RoomTextMessage.ts
Comment thread client/src/comps/events/RoomVideoMessage.ts
Comment thread client/src/comps/events/RoomEmoteMessage.ts Outdated
Comment thread client/src/comps/events/ChatMessageBase.ts
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.

3 participants