Initial support for Matrix#2
Open
cfpwastaken wants to merge 26 commits intomainfrom
Open
Conversation
There was a problem hiding this comment.
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
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>
There was a problem hiding this comment.
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, andMessage, but the implementation now only operates onMatrixEventandrenderEvent(). Remove unused imports to avoid confusion and keep the module focused on Matrix events.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
m.room.message- msgtypesm.textm.imagem.emotem.noticem.filem.audiom.videom.room.name