From 0101bfa09fad4346e336a4b99c5f5731583bbe19 Mon Sep 17 00:00:00 2001 From: melogale Date: Sat, 7 Mar 2026 04:24:03 -0500 Subject: [PATCH 01/80] clean and merge --- package.json | 2 +- src/app/features/call/SmallWidget.ts | 12 ++++++++++++ src/sw.ts | 14 ++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 233e6f710..70f2fa95b 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ }, "devDependencies": { "@cloudflare/vite-plugin": "^1.26.0", - "@element-hq/element-call-embedded": "0.16.3", + "@element-hq/element-call-embedded": "file:element-call/embedded/web", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "@eslint/compat": "2.0.2", "@eslint/js": "9.39.3", diff --git a/src/app/features/call/SmallWidget.ts b/src/app/features/call/SmallWidget.ts index 63186862e..a41768782 100644 --- a/src/app/features/call/SmallWidget.ts +++ b/src/app/features/call/SmallWidget.ts @@ -198,6 +198,18 @@ export class SmallWidget extends EventEmitter { return this.messaging?.transport.reply(ev.detail, { events }); }); + // Acknowledge these so we don't get annoying errors + for (const action of [ + 'io.element.spotlight_layout', + 'io.element.tile_layout', + 'io.element.device_mute', + ]) { + this.messaging.on(`action:${action}`, (ev: CustomEvent) => { + ev.preventDefault(); + this.messaging?.transport.reply(ev.detail, {}); + }); + } + this.client.on(ClientEvent.Event, this.onEvent); this.client.on(MatrixEventEvent.Decrypted, this.onEventDecrypted); this.client.on(RoomStateEvent.Events, this.onStateUpdate); diff --git a/src/sw.ts b/src/sw.ts index 7185fbd30..815c3be71 100644 --- a/src/sw.ts +++ b/src/sw.ts @@ -270,6 +270,20 @@ self.addEventListener('fetch', (event: FetchEvent) => { return; } + // Since widgets like element call have their own client ids, + // we need this logic. We just go through the sessions list and get a session + // with the right base url. Media requests to a homeserver simply are fine with any account + // on the homeserver authenticating it, so this is fine. But it can be technically wrong. + // If you have two tabs for different users on the same homeserver, it might authenticate + // as the wrong one. + // Thus any logic in the future which cares about which user is authenticating the request + // might break this. Also, again, it is technically wrong. + const byBaseUrl = [...sessions.values()].find((s) => validMediaRequest(url, s.baseUrl)); + if (byBaseUrl) { + event.respondWith(fetch(url, { ...fetchConfig(byBaseUrl.accessToken), redirect })); + return; + } + event.respondWith( requestSessionWithTimeout(clientId).then((s) => { if (s && validMediaRequest(url, s.baseUrl)) { From be1826c6085c3d7a8dd2c888d9a834af58d559e3 Mon Sep 17 00:00:00 2001 From: melogale Date: Sat, 7 Mar 2026 04:28:01 -0500 Subject: [PATCH 02/80] submodule --- .gitmodules | 3 +++ element-call | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 element-call diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..21b4a2cc4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "element-call"] + path = element-call + url = https://github.com/melogale/element-call.git diff --git a/element-call b/element-call new file mode 160000 index 000000000..c2646a055 --- /dev/null +++ b/element-call @@ -0,0 +1 @@ +Subproject commit c2646a0554f89393bf6dfca7195efb86438537ab From 5b27dbe44f4e3d6fdf4f176fa5154cd6698be54e Mon Sep 17 00:00:00 2001 From: melogale Date: Sat, 7 Mar 2026 04:30:11 -0500 Subject: [PATCH 03/80] changeset --- .changeset/avatars.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .changeset/avatars.md diff --git a/.changeset/avatars.md b/.changeset/avatars.md new file mode 100644 index 000000000..cf70e2de8 --- /dev/null +++ b/.changeset/avatars.md @@ -0,0 +1,30 @@ +--- +sable: minor +--- + +# avatars! + +#227 by @melogale + +I bring in https://github.com/melogale/element-call/tree/avatars as a submodule for now. + +Element call disables thumbnails in widget mode by default, and it can't really be overridden except by janky means. Forking element call allows us to set this up kind of cleanly though! + + +In element call, we add two new capabilities to the host-widget contract. + +`moe.sable.thumbnails` +`moe.sable.media_proxy` + +If neither is set, fallback thumbnails will be used: the letter over color sort. +If `moe.sable.thumbnails` is set, element call will attempt to use the old unauthenticated media endpoint to grab thumbnails. +If `moe.sable.media_proxy` or both are set, will shoot for the authenticated endpoint, and hope and pray the client hosting the widget keeps its promise: adding authentication to the request, via a service worker or something. + + +Sable automatically accepts all capability requests, so these are set, and in fact, we add on authentication to media requests in the service worker! + +Since the frames in which widgets run have separate client ids, I simply look through the session list and find a session with the right base url. This is kind of odd: it could end up being for a different user on another tab. + +But as things are, the server doesn't care: so long as its authenticated by a user on the server. +Ideally it would use the session info for the tab hosting the widget, but I couldn't come up with a super clean way of doing that doesn't distract from the proof of concept. Let me know if anyone has any ideas for that. Or if we don't care for now. + From f78d70d6d4716e6f3360cbbd1f2c62d98aefae6c Mon Sep 17 00:00:00 2001 From: melogale Date: Sat, 7 Mar 2026 04:39:55 -0500 Subject: [PATCH 04/80] lock --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index d82546355..592ebd010 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,7 +71,7 @@ }, "devDependencies": { "@cloudflare/vite-plugin": "^1.26.0", - "@element-hq/element-call-embedded": "0.16.3", + "@element-hq/element-call-embedded": "file:element-call/embedded/web", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "@eslint/compat": "2.0.2", "@eslint/js": "9.39.3", @@ -26870,4 +26870,4 @@ "dev": true } } -} \ No newline at end of file +} From 610cdf5713aea5144dc3d63492ec74110db9b324 Mon Sep 17 00:00:00 2001 From: melogale Date: Sat, 7 Mar 2026 04:40:56 -0500 Subject: [PATCH 05/80] lock --- package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 592ebd010..53e9f0518 100644 --- a/package-lock.json +++ b/package-lock.json @@ -109,6 +109,11 @@ "npm": "11.x" } }, + "element-call/embedded/web": { + "name": "@element-hq/element-call-embedded", + "version": "0.0.0", + "dev": true + }, "node_modules/@apideck/better-ajv-errors": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.6.tgz", @@ -1911,10 +1916,8 @@ } }, "node_modules/@element-hq/element-call-embedded": { - "version": "0.16.3", - "resolved": "https://registry.npmjs.org/@element-hq/element-call-embedded/-/element-call-embedded-0.16.3.tgz", - "integrity": "sha512-OViKJonDaDNVBUW9WdV9mk78/Ruh34C7XsEgt3O8D9z+64C39elbIgllHSoH5S12IRlv9RYrrV37FZLo6QWsDQ==", - "dev": true + "resolved": "element-call/embedded/web", + "link": true }, "node_modules/@emnapi/core": { "version": "1.8.1", @@ -17865,10 +17868,7 @@ } }, "@element-hq/element-call-embedded": { - "version": "0.16.3", - "resolved": "https://registry.npmjs.org/@element-hq/element-call-embedded/-/element-call-embedded-0.16.3.tgz", - "integrity": "sha512-OViKJonDaDNVBUW9WdV9mk78/Ruh34C7XsEgt3O8D9z+64C39elbIgllHSoH5S12IRlv9RYrrV37FZLo6QWsDQ==", - "dev": true + "version": "file:element-call/embedded/web" }, "@emnapi/core": { "version": "1.8.1", From afded152150b461ce16de4462a2c4554851628c9 Mon Sep 17 00:00:00 2001 From: melogale Date: Sat, 7 Mar 2026 04:48:53 -0500 Subject: [PATCH 06/80] oops wrong element version --- element-call | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/element-call b/element-call index c2646a055..3a2b29f12 160000 --- a/element-call +++ b/element-call @@ -1 +1 @@ -Subproject commit c2646a0554f89393bf6dfca7195efb86438537ab +Subproject commit 3a2b29f1280fa823b1fcaac3b5ea91579008443f From 7315486ebc681a39f549f6d4f2cd2c3180634fd2 Mon Sep 17 00:00:00 2001 From: melogale Date: Sat, 7 Mar 2026 06:28:10 -0500 Subject: [PATCH 07/80] testing with clean element call --- element-call | 2 +- eslint.config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/element-call b/element-call index 3a2b29f12..290879a4d 160000 --- a/element-call +++ b/element-call @@ -1 +1 @@ -Subproject commit 3a2b29f1280fa823b1fcaac3b5ea91579008443f +Subproject commit 290879a4d492b41fb727572f88fac6f1ac56e57f diff --git a/eslint.config.js b/eslint.config.js index 9fa0c87bb..fcd06a9b4 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -134,6 +134,7 @@ const projectOverrides = defineConfig([ ]); export default defineConfig([ + { ignores: ['element-call/'] }, includeIgnoreFile(gitignorePath), ...jsConfig, ...reactConfig, From e13f8d509cbf16f8ddc7a39b3ba3125fae35432f Mon Sep 17 00:00:00 2001 From: melogale Date: Sat, 7 Mar 2026 06:28:55 -0500 Subject: [PATCH 08/80] skip --- .changeset/avatars.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.changeset/avatars.md b/.changeset/avatars.md index cf70e2de8..86f484f15 100644 --- a/.changeset/avatars.md +++ b/.changeset/avatars.md @@ -8,8 +8,7 @@ sable: minor I bring in https://github.com/melogale/element-call/tree/avatars as a submodule for now. -Element call disables thumbnails in widget mode by default, and it can't really be overridden except by janky means. Forking element call allows us to set this up kind of cleanly though! - +Element call disables thumbnails in widget mode by default, and it can't really be overridden except by janky means. Forking element call allows us to set this up kind of cleanly though! In element call, we add two new capabilities to the host-widget contract. @@ -20,11 +19,9 @@ If neither is set, fallback thumbnails will be used: the letter over color sort. If `moe.sable.thumbnails` is set, element call will attempt to use the old unauthenticated media endpoint to grab thumbnails. If `moe.sable.media_proxy` or both are set, will shoot for the authenticated endpoint, and hope and pray the client hosting the widget keeps its promise: adding authentication to the request, via a service worker or something. - Sable automatically accepts all capability requests, so these are set, and in fact, we add on authentication to media requests in the service worker! Since the frames in which widgets run have separate client ids, I simply look through the session list and find a session with the right base url. This is kind of odd: it could end up being for a different user on another tab. But as things are, the server doesn't care: so long as its authenticated by a user on the server. Ideally it would use the session info for the tab hosting the widget, but I couldn't come up with a super clean way of doing that doesn't distract from the proof of concept. Let me know if anyone has any ideas for that. Or if we don't care for now. - From 7b69e916310cb895d2fe71a2c9b4fa3f5d1102ac Mon Sep 17 00:00:00 2001 From: melogale Date: Sat, 7 Mar 2026 16:49:10 -0500 Subject: [PATCH 09/80] rebased element fork --- element-call | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/element-call b/element-call index 290879a4d..ecef381c2 160000 --- a/element-call +++ b/element-call @@ -1 +1 @@ -Subproject commit 290879a4d492b41fb727572f88fac6f1ac56e57f +Subproject commit ecef381c246c177af28b8c99c5076da19878a136 From e48648c91023ab29f8b89cf2542a8d604a353724 Mon Sep 17 00:00:00 2001 From: melogale Date: Sat, 7 Mar 2026 18:14:28 -0500 Subject: [PATCH 10/80] ignore --- .gitignore | 1 + .prettierignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 1c1104414..5cc8aa47a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ devAssets *.tfbackend !*.tfbackend.example crash.log +build.sh diff --git a/.prettierignore b/.prettierignore index dd3a20e64..cc2e80225 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,6 @@ dist node_modules +element-call package.json package-lock.json LICENSE From 5f98e5dcb6ae50a567c49764cdf6ef03615fdfa4 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Sun, 8 Mar 2026 13:13:21 -0400 Subject: [PATCH 11/80] feat: full-width highlight for notify-loud/silent push rule messages --- .../feat_notification_highlight_messages.md | 5 +++++ src/app/components/message/layout/Base.tsx | 7 +++++-- src/app/components/message/layout/layout.css.ts | 12 ++++++++++++ src/app/features/room/RoomTimeline.tsx | 16 ++++++++++++++++ src/app/features/room/message/Message.tsx | 6 ++++++ 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .changeset/feat_notification_highlight_messages.md diff --git a/.changeset/feat_notification_highlight_messages.md b/.changeset/feat_notification_highlight_messages.md new file mode 100644 index 000000000..e111707cf --- /dev/null +++ b/.changeset/feat_notification_highlight_messages.md @@ -0,0 +1,5 @@ +--- +sable: minor +--- + +Messages that trigger a push rule with `highlight: true` (e.g. @mentions, keyword matches) now receive a full-width background highlight in the room timeline. Notifications with a sound tweak ("Notify Loud") use a warning-amber colour; silent highlights use the secondary-surface colour. Both colours adapt automatically to the active theme. diff --git a/src/app/components/message/layout/Base.tsx b/src/app/components/message/layout/Base.tsx index 008c9e416..47e7b9372 100644 --- a/src/app/components/message/layout/Base.tsx +++ b/src/app/components/message/layout/Base.tsx @@ -3,10 +3,13 @@ import classNames from 'classnames'; import * as css from './layout.css'; export const MessageBase = as<'div', css.MessageBaseVariants>( - ({ className, highlight, selected, collapse, autoCollapse, space, ...props }, ref) => ( + ( + { className, highlight, notifyHighlight, selected, collapse, autoCollapse, space, ...props }, + ref + ) => (
new PushProcessor(mx), [mx]); const [hideReads] = useSetting(settingsAtom, 'hideReads'); const [messageLayout] = useSetting(settingsAtom, 'messageLayout'); const [messageSpacing] = useSetting(settingsAtom, 'messageSpacing'); @@ -1324,6 +1326,12 @@ export function RoomTimeline({ const { replyEventId, threadRootId } = mEvent; const highlighted = focusItem?.index === item && focusItem.highlight; + const pushActions = pushProcessor.actionsForEvent(mEvent); + let notifyHighlight: 'silent' | 'loud' | undefined; + if (pushActions?.notify && pushActions.tweaks?.highlight) { + notifyHighlight = pushActions.tweaks?.sound ? 'loud' : 'silent'; + } + const editedEvent = getEditedEvent(mEventId, mEvent, timelineSet); const editedNewContent = editedEvent?.getContent()['m.new_content']; // If makeReplaced was called with a stripped edit (no m.new_content), @@ -1372,6 +1380,7 @@ export function RoomTimeline({ messageLayout={messageLayout} collapse={collapse} highlight={highlighted} + notifyHighlight={notifyHighlight} edit={editId === mEventId} canDelete={canRedact || (canDeleteOwn && mEvent.getSender() === mx.getUserId())} canSendReaction={canSendReaction} @@ -1449,6 +1458,12 @@ export function RoomTimeline({ const senderDisplayName = getMemberDisplayName(room, senderId, nicknames) ?? getMxIdLocalPart(senderId) ?? senderId; + const pushActions = pushProcessor.actionsForEvent(mEvent); + let notifyHighlight: 'silent' | 'loud' | undefined; + if (pushActions?.notify && pushActions.tweaks?.highlight) { + notifyHighlight = pushActions.tweaks?.sound ? 'loud' : 'silent'; + } + return ( >[0], @@ -1030,6 +1034,7 @@ export const Event = as<'div', EventProps>( room, mEvent, highlight, + notifyHighlight, canDelete, onReplyClick, messageSpacing, @@ -1114,6 +1119,7 @@ export const Event = as<'div', EventProps>( space={messageSpacing} autoCollapse highlight={highlight} + notifyHighlight={notifyHighlight} selected={!!menuAnchor} {...props} {...hoverProps} From f40273c926502adbadc0724ec9d178f579c73633 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Sun, 8 Mar 2026 12:28:21 -0400 Subject: [PATCH 12/80] fix: in-app notification banner placement - render NotificationBanner in ClientLayout so it spans the full viewport as position:fixed and doesn't displace page content - remove the old banner render from Room.tsx --- .../notification-banner/NotificationBanner.css.ts | 12 ++---------- src/app/features/room/Room.tsx | 2 +- src/app/pages/client/ClientLayout.tsx | 2 ++ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/app/components/notification-banner/NotificationBanner.css.ts b/src/app/components/notification-banner/NotificationBanner.css.ts index 1ddfacda3..4a29d24d7 100644 --- a/src/app/components/notification-banner/NotificationBanner.css.ts +++ b/src/app/components/notification-banner/NotificationBanner.css.ts @@ -23,12 +23,11 @@ const slideOut = keyframes({ }, }); -// Floats at the top of the chat area, starting after the icon sidebar. +// Floats at the top of the viewport, spanning full width on all platforms. export const BannerContainer = style({ position: 'fixed', top: 0, - // 66px = sidebar icon strip width — overridden to 0 on mobile below - left: toRem(66), + left: 0, right: 0, zIndex: 9999, display: 'flex', @@ -37,13 +36,6 @@ export const BannerContainer = style({ padding: config.space.S400, pointerEvents: 'none', alignItems: 'stretch', - - '@media': { - // On narrow screens the sidebar collapses, so span the full width. - '(max-width: 768px)': { - left: 0, - }, - }, }); export const Banner = style({ diff --git a/src/app/features/room/Room.tsx b/src/app/features/room/Room.tsx index c960d431b..b7aef9107 100644 --- a/src/app/features/room/Room.tsx +++ b/src/app/features/room/Room.tsx @@ -2,6 +2,7 @@ import { useCallback } from 'react'; import { Box, Line } from 'folds'; import { useParams } from 'react-router-dom'; import { isKeyHotkey } from 'is-hotkey'; +import { useAtomValue } from 'jotai'; import { ScreenSize, useScreenSizeContext } from '$hooks/useScreenSize'; import { useSetting } from '$state/hooks/settings'; import { settingsAtom } from '$state/settings'; @@ -13,7 +14,6 @@ import { useMatrixClient } from '$hooks/useMatrixClient'; import { useRoomMembers } from '$hooks/useRoomMembers'; import { CallView } from '$features/call/CallView'; import { WidgetsDrawer } from '$features/widgets/WidgetsDrawer'; -import { useAtomValue } from 'jotai'; import { callChatAtom } from '$state/callEmbed'; import { RoomViewHeader } from './RoomViewHeader'; import { MembersDrawer } from './MembersDrawer'; diff --git a/src/app/pages/client/ClientLayout.tsx b/src/app/pages/client/ClientLayout.tsx index 4bbd4068f..9cb4a3f41 100644 --- a/src/app/pages/client/ClientLayout.tsx +++ b/src/app/pages/client/ClientLayout.tsx @@ -1,5 +1,6 @@ import { ReactNode } from 'react'; import { Box } from 'folds'; +import { NotificationBanner } from '$components/notification-banner'; type ClientLayoutProps = { nav: ReactNode; @@ -8,6 +9,7 @@ type ClientLayoutProps = { export function ClientLayout({ nav, children }: ClientLayoutProps) { return ( + {nav} {children} From 8bacba70aa41af81d825f5cd9a87e497dbd48516 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Sun, 8 Mar 2026 12:28:53 -0400 Subject: [PATCH 13/80] feat: notification settings page improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - rename "Mobile In-App Notifications" to "In-App Notifications"; show on all platforms (was mobile-only) - rename "Notification Sound" to "In-App Notification Sound" to clarify it only controls in-page audio, not push sound - move badge display settings (Show Unread Counts, Badge Counts for DMs Only, Show Unread Ping Counts) from Appearance to Notifications - add NotificationLevelsHint info popover to All/Special/Keyword sections explaining Disable / Notify Silent / Notify Loud - add descriptive text under each notification section heading - show a single Mention @room control (IsRoomMention on modern servers, AtRoomNotification on old servers) — they are spec-mandated mirrors and exposing both as independent controls was confusing - clarify @room push rule labels and descriptions - add "Follows your global notification rules" subtitle to the Default option in the per-room notification switcher --- .../components/RoomNotificationSwitcher.tsx | 13 +- .../features/settings/cosmetics/Themes.tsx | 28 ----- .../settings/notifications/AllMessages.tsx | 7 +- .../notifications/KeywordMessages.tsx | 7 +- .../notifications/NotificationLevelsHint.tsx | 70 +++++++++++ .../notifications/SpecialMessages.tsx | 44 ++++--- .../notifications/SystemNotification.tsx | 119 ++++++++++++++---- 7 files changed, 205 insertions(+), 83 deletions(-) create mode 100644 src/app/features/settings/notifications/NotificationLevelsHint.tsx diff --git a/src/app/components/RoomNotificationSwitcher.tsx b/src/app/components/RoomNotificationSwitcher.tsx index f62c41a4a..268758500 100644 --- a/src/app/components/RoomNotificationSwitcher.tsx +++ b/src/app/components/RoomNotificationSwitcher.tsx @@ -104,9 +104,16 @@ export function RoomNotificationModeSwitcher({ /> } > - - {mode === value ? {modeToStr[mode]} : modeToStr[mode]} - + + + {mode === value ? {modeToStr[mode]} : modeToStr[mode]} + + {mode === RoomNotificationMode.Unset && ( + + Follows your global notification rules + + )} + ))} diff --git a/src/app/features/settings/cosmetics/Themes.tsx b/src/app/features/settings/cosmetics/Themes.tsx index baf737628..6693197ab 100644 --- a/src/app/features/settings/cosmetics/Themes.tsx +++ b/src/app/features/settings/cosmetics/Themes.tsx @@ -388,9 +388,6 @@ function PageZoomInput() { } export function Appearance() { const [twitterEmoji, setTwitterEmoji] = useSetting(settingsAtom, 'twitterEmoji'); - const [showUnreadCounts, setShowUnreadCounts] = useSetting(settingsAtom, 'showUnreadCounts'); - const [badgeCountDMsOnly, setBadgeCountDMsOnly] = useSetting(settingsAtom, 'badgeCountDMsOnly'); - const [showPingCounts, setShowPingCounts] = useSetting(settingsAtom, 'showPingCounts'); return ( @@ -410,31 +407,6 @@ export function Appearance() { } /> - - - } - /> - - - - } - /> - - - } - /> - ); diff --git a/src/app/features/settings/notifications/AllMessages.tsx b/src/app/features/settings/notifications/AllMessages.tsx index e750cc7d0..61ace27c4 100644 --- a/src/app/features/settings/notifications/AllMessages.tsx +++ b/src/app/features/settings/notifications/AllMessages.tsx @@ -20,6 +20,7 @@ import { import { useMatrixClient } from '$hooks/useMatrixClient'; import { SequenceCardStyle } from '$features/settings/styles.css'; import { NotificationModeSwitcher } from './NotificationModeSwitcher'; +import { NotificationLevelsHint } from './NotificationLevelsHint'; const getAllMessageDefaultRule = ( ruleId: RuleId, @@ -89,13 +90,17 @@ export function AllMessagesNotifications() { All Messages - + + Badge: 1 + + Default notification level for all messages in rooms where no per-room override is set. + Keyword Messages - + + Badge: 1 + + Custom keywords that trigger notifications when matched in a message body. + (); + + const handleOpen: MouseEventHandler = (evt) => { + setAnchor(evt.currentTarget.getBoundingClientRect()); + }; + + const itemPadding = { padding: config.space.S200, paddingTop: 0 }; + + return ( + setAnchor(undefined), + clickOutsideDeactivates: true, + escapeDeactivates: stopPropagation, + }} + > + +
+ Notification Levels +
+ + + Disable + + The rule is muted. No notifications of any kind. + + + + Notify Silent + + Visual notification (badge and banner) when a relevant message arrives. No sound. + + + + Notify Loud + + Visual highlight plus sound. Respects the Notification Sound setting above, and + triggers sound and vibration on mobile push. + + + +
+ + } + > + + + +
+ ); +} diff --git a/src/app/features/settings/notifications/SpecialMessages.tsx b/src/app/features/settings/notifications/SpecialMessages.tsx index 92d559d3d..ac8d736f3 100644 --- a/src/app/features/settings/notifications/SpecialMessages.tsx +++ b/src/app/features/settings/notifications/SpecialMessages.tsx @@ -17,6 +17,7 @@ import { } from '$hooks/useNotificationMode'; import { SequenceCardStyle } from '$features/settings/styles.css'; import { NotificationModeSwitcher } from './NotificationModeSwitcher'; +import { NotificationLevelsHint } from './NotificationLevelsHint'; const NOTIFY_MODE_OPS: NotificationModeOptions = { highlight: true, @@ -120,18 +121,23 @@ export function SpecialMessagesNotifications() { () => pushRulesEvt?.getContent() ?? { global: {} }, [pushRulesEvt] ); + const intentionalMentions = mx.supportsIntentionalMentions(); return ( Special Messages - + + Badge: 1 + + Overrides the All Messages level for messages that mention you or match a keyword. + - } - /> - - - + intentionalMentions ? ( + + ) : ( + + ) } /> diff --git a/src/app/features/settings/notifications/SystemNotification.tsx b/src/app/features/settings/notifications/SystemNotification.tsx index 6394f423c..659d3945d 100644 --- a/src/app/features/settings/notifications/SystemNotification.tsx +++ b/src/app/features/settings/notifications/SystemNotification.tsx @@ -186,24 +186,39 @@ export function SystemNotification() { settingsAtom, 'clearNotificationsOnRead' ); + const [showUnreadCounts, setShowUnreadCounts] = useSetting(settingsAtom, 'showUnreadCounts'); + const [badgeCountDMsOnly, setBadgeCountDMsOnly] = useSetting(settingsAtom, 'badgeCountDMsOnly'); + const [showPingCounts, setShowPingCounts] = useSetting(settingsAtom, 'showPingCounts'); + + // Describe what the current badge combo actually does so users aren't left guessing. + const badgeBehaviourSummary = (): string => { + if (!showUnreadCounts && !showPingCounts) { + return 'Badges show a plain dot for any unread activity — no numbers displayed.'; + } + if (!showUnreadCounts && showPingCounts) { + return 'Badges show a number only when you are directly mentioned; all other unread activity shows a plain dot.'; + } + if (showUnreadCounts && badgeCountDMsOnly) { + return 'Only Direct Message badges show a number count. Rooms and spaces show a plain dot instead.'; + } + return 'All rooms and DMs show a number count for every unread message.'; + }; return ( System & Notifications - {mobileOrTablet() && ( - - } - /> - - )} + + } + /> + {mobileOrTablet() && ( } /> )} + + } + /> + } /> - - } - /> - + + Badges + + {badgeBehaviourSummary()} + + + + } + /> + + + + } + /> + + + } + /> + ); } From d0d8062d60a9948971e5ab4a6cca6937f5615e68 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Sun, 8 Mar 2026 14:38:36 -0400 Subject: [PATCH 14/80] chore: add changeset for notification settings UI improvements --- .changeset/feat-notification-settings-ui.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .changeset/feat-notification-settings-ui.md diff --git a/.changeset/feat-notification-settings-ui.md b/.changeset/feat-notification-settings-ui.md new file mode 100644 index 000000000..8908c269c --- /dev/null +++ b/.changeset/feat-notification-settings-ui.md @@ -0,0 +1,14 @@ +--- +sable: minor +--- + +feat: notification settings page improvements + +- Rename "Mobile In-App Notifications" → "In-App Notifications"; show the toggle on all platforms. +- Rename "Notification Sound" → "In-App Notification Sound" to clarify it only controls in-page audio, not push sound. +- Move badge display settings (Show Unread Counts, Badge Counts for DMs Only, Show Unread Ping Counts) from Appearance into the Notifications page. +- Fix "System Notifications" description — remove incorrect claim that mobile uses the in-app banner instead. +- Add a notification levels info button (ⓘ) to the All Messages, Special Messages, and Keyword Messages section headings explaining Disable / Notify Silent / Notify Loud. +- Add descriptive text under each notification section heading. +- Collapse the two `@room` push rules into a single "Mention @room" control (routes to `IsRoomMention` on modern servers, `AtRoomNotification` on older servers). Showing them separately caused an apparent sync loop where setting one immediately reset the other. +- Add "Follows your global notification rules" subtitle to the "Default" option in the per-room notification switcher. From 8eef74ef04968bf89d61d86eae7f4fa89524e465 Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 9 Mar 2026 01:28:14 +0100 Subject: [PATCH 15/80] enhance UnsupportedContent and BrokenContent to display message body for better context --- src/app/components/RenderMessageContent.tsx | 2 +- .../components/message/MsgTypeRenderers.tsx | 36 ++++++++++++------- .../message/content/FallbackContent.tsx | 33 ++++++++++------- 3 files changed, 45 insertions(+), 26 deletions(-) diff --git a/src/app/components/RenderMessageContent.tsx b/src/app/components/RenderMessageContent.tsx index 3c2ded077..93a697c6f 100644 --- a/src/app/components/RenderMessageContent.tsx +++ b/src/app/components/RenderMessageContent.tsx @@ -366,7 +366,7 @@ function RenderMessageContentInternal({ mentionedUserIds={content?.['m.mentions']?.user_ids} /> ); - return ; + return ; } export const RenderMessageContent = memo(RenderMessageContentInternal); diff --git a/src/app/components/message/MsgTypeRenderers.tsx b/src/app/components/message/MsgTypeRenderers.tsx index 66656f94a..97daa9cb7 100644 --- a/src/app/components/message/MsgTypeRenderers.tsx +++ b/src/app/components/message/MsgTypeRenderers.tsx @@ -52,18 +52,22 @@ export function RedactedContent({ reason }: RedactedContentProps) { ); } -export function UnsupportedContent() { +type BrokenContentProps = { + body?: string; +}; + +export function UnsupportedContent({ body }: BrokenContentProps) { return ( - + ); } -export function BrokenContent() { +export function BrokenContent({ body }: BrokenContentProps) { return ( - + ); } @@ -117,7 +121,7 @@ export function MText({ edited, content, renderBody, renderUrlsPreview, style }: return true; }, [trimmedBody, safeCustomBody]); - if (!body) return ; + if (!body) return ; const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); const urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; @@ -170,7 +174,9 @@ export function MEmote({ const { body, formatted_body: customBody } = content; const [jumboEmojiSize] = useSetting(settingsAtom, 'jumboEmojiSize'); - if (typeof body !== 'string') return ; + if (typeof body !== 'string') { + return ; + } const trimmedBody = trimReplyFromBody(body); const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); const urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; @@ -205,7 +211,9 @@ export function MNotice({ edited, content, renderBody, renderUrlsPreview }: MNot const { body, formatted_body: customBody } = content; const [jumboEmojiSize] = useSetting(settingsAtom, 'jumboEmojiSize'); - if (typeof body !== 'string') return ; + if (typeof body !== 'string') { + return ; + } const trimmedBody = trimReplyFromBody(body); const urlsMatch = renderUrlsPreview && trimmedBody.match(URL_REG); const urls = urlsMatch ? [...new Set(urlsMatch)] : undefined; @@ -248,7 +256,7 @@ export function MImage({ content, renderImageContent, outlined }: MImageProps) { const imgInfo = content?.info; const mxcUrl = content.file?.url ?? content.url; if (typeof mxcUrl !== 'string') { - return ; + return ; } const MAX_SIZE = 400; const imgW = imgInfo?.w ?? MAX_SIZE; @@ -310,7 +318,7 @@ export function MVideo({ content, renderAsFile, renderVideoContent, outlined }: if (mxcUrl) { return renderAsFile(); } - return ; + return ; } const height = Math.min(scaleYDimension(videoInfo.w || 400, 400, videoInfo.h || 400), 400); @@ -379,7 +387,7 @@ export function MAudio({ content, renderAsFile, renderAudioContent, outlined }: if (mxcUrl) { return renderAsFile(); } - return ; + return ; } const filename = content.filename ?? content.body ?? 'Audio'; @@ -430,7 +438,7 @@ export function MFile({ content, renderFileContent, outlined }: MFileProps) { const mxcUrl = content.file?.url ?? content.url; if (typeof mxcUrl !== 'string') { - return ; + return ; } return ( @@ -461,7 +469,9 @@ type MLocationProps = { }; export function MLocation({ content }: MLocationProps) { const geoUri = content.geo_uri; - if (typeof geoUri !== 'string') return ; + if (typeof geoUri !== 'string') { + return ; + } const location = parseGeoUri(geoUri); return ( @@ -490,7 +500,7 @@ export function MSticker({ content, renderImageContent }: MStickerProps) { const imgInfo = content?.info; const mxcUrl = content.file?.url ?? content.url; if (typeof mxcUrl !== 'string') { - return ; + return ; } const height = scaleYDimension(imgInfo?.w || 152, 152, imgInfo?.h || 152); diff --git a/src/app/components/message/content/FallbackContent.tsx b/src/app/components/message/content/FallbackContent.tsx index 8156a5d0c..9bd012a13 100644 --- a/src/app/components/message/content/FallbackContent.tsx +++ b/src/app/components/message/content/FallbackContent.tsx @@ -16,12 +16,16 @@ export const MessageDeletedContent = as<'div', { children?: never; reason?: stri ) ); -export const MessageUnsupportedContent = as<'div', { children?: never }>(({ ...props }, ref) => ( - - - Unsupported message - -)); +export const MessageUnsupportedContent = as<'div', { children?: never; body?: string }>( + ({ body, ...props }, ref) => ( + + + Unsupported message + {body && `: ${body}`} + {!body && ' (no body)'} + + ) +); export const MessageFailedContent = as<'div', { children?: never }>(({ ...props }, ref) => ( @@ -44,12 +48,17 @@ export const MessageNotDecryptedContent = as<'div', { children?: never }>(({ ... )); -export const MessageBrokenContent = as<'div', { children?: never }>(({ ...props }, ref) => ( - - - Broken message - -)); +// display body of the message if it is available, as it may give some clue about why the message is broken +export const MessageBrokenContent = as<'div', { children?: never; body?: string }>( + ({ body, ...props }, ref) => ( + + + Broken message + {body && `: ${body}`} + {!body && ' (no body)'} + + ) +); export const MessageEmptyContent = as<'div', { children?: never }>(({ ...props }, ref) => ( From 1874524f5bfeba4d18ce2c6fe361940d3d68c017 Mon Sep 17 00:00:00 2001 From: Rose Date: Mon, 9 Mar 2026 01:39:21 +0100 Subject: [PATCH 16/80] added changeset for https://github.com/7w1/sable/pull/267 Enhance the UnsupportedContent and BrokenContent components to include a message body for better user feedback. --- ...ortedcontent_and_brokencontent_to_display_message_body.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/enhance_unsupportedcontent_and_brokencontent_to_display_message_body.md diff --git a/.changeset/enhance_unsupportedcontent_and_brokencontent_to_display_message_body.md b/.changeset/enhance_unsupportedcontent_and_brokencontent_to_display_message_body.md new file mode 100644 index 000000000..983247a2d --- /dev/null +++ b/.changeset/enhance_unsupportedcontent_and_brokencontent_to_display_message_body.md @@ -0,0 +1,5 @@ +--- +sable: patch +--- + +Enhance UnsupportedContent and BrokenContent to display message body From c5dca6150d62007dad020405f2f00a2df3329038 Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 9 Mar 2026 01:57:17 +0100 Subject: [PATCH 17/80] fix: prevent duplicate forwards by managing forwarding state in MessageForwardInternal --- .../message/modals/MessageForward.tsx | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/app/components/message/modals/MessageForward.tsx b/src/app/components/message/modals/MessageForward.tsx index d113cbecf..42eb6af82 100644 --- a/src/app/components/message/modals/MessageForward.tsx +++ b/src/app/components/message/modals/MessageForward.tsx @@ -92,6 +92,7 @@ export function MessageForwardInternal({ room, mEvent, onClose }: MessageForward const [isTargetSelected, setIsTargetSelected] = useState(false); const [isForwardSuccess, setIsForwardSuccess] = useState(false); + const [isForwarding, setIsForwarding] = useState(false); const [isForwardError, setIsForwardError] = useState(false); const [targetRoomId, setTargetRoomId] = useState(null); @@ -143,11 +144,18 @@ export function MessageForwardInternal({ room, mEvent, onClose }: MessageForward // actually forward the message to the selected room const handleForwardClick = () => { - if (!targetRoomId) return; + setIsForwarding(true); + if (!targetRoomId) { + setIsForwarding(false); + return; + } const targetRoom = getRoom(targetRoomId); const eventId = mEvent.getId(); - if (!targetRoom || !eventId) return; + if (!targetRoom || !eventId) { + setIsForwarding(false); + return; + } type SendEventType = Parameters[2]; type SendEventContent = Parameters[3]; @@ -212,10 +220,15 @@ export function MessageForwardInternal({ room, mEvent, onClose }: MessageForward } try { - mx.sendEvent(targetRoom.roomId, null, eventType, content as unknown as SendEventContent).then( - () => setIsForwardSuccess(true) - ); + mx.sendEvent(targetRoom.roomId, null, eventType, content as unknown as SendEventContent) + .then(() => setIsForwardSuccess(true)) + .catch(() => { + setIsForwarding(false); + setIsForwardSuccess(false); + setIsForwardError(true); + }); } catch { + setIsForwarding(false); setIsForwardSuccess(false); setIsForwardError(true); } @@ -264,7 +277,11 @@ export function MessageForwardInternal({ room, mEvent, onClose }: MessageForward {isTargetSelected && targetRoomId && ( - )} From 53f6fc8ea8312e22dc43c29c947ba3c6346177bf Mon Sep 17 00:00:00 2001 From: 7w1 Date: Sun, 8 Mar 2026 20:17:36 -0500 Subject: [PATCH 18/80] update changeset --- .changeset/avatars.md | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/.changeset/avatars.md b/.changeset/avatars.md index 86f484f15..001dd7780 100644 --- a/.changeset/avatars.md +++ b/.changeset/avatars.md @@ -2,26 +2,5 @@ sable: minor --- -# avatars! +Add avatars to calls by forking element call. -#227 by @melogale - -I bring in https://github.com/melogale/element-call/tree/avatars as a submodule for now. - -Element call disables thumbnails in widget mode by default, and it can't really be overridden except by janky means. Forking element call allows us to set this up kind of cleanly though! - -In element call, we add two new capabilities to the host-widget contract. - -`moe.sable.thumbnails` -`moe.sable.media_proxy` - -If neither is set, fallback thumbnails will be used: the letter over color sort. -If `moe.sable.thumbnails` is set, element call will attempt to use the old unauthenticated media endpoint to grab thumbnails. -If `moe.sable.media_proxy` or both are set, will shoot for the authenticated endpoint, and hope and pray the client hosting the widget keeps its promise: adding authentication to the request, via a service worker or something. - -Sable automatically accepts all capability requests, so these are set, and in fact, we add on authentication to media requests in the service worker! - -Since the frames in which widgets run have separate client ids, I simply look through the session list and find a session with the right base url. This is kind of odd: it could end up being for a different user on another tab. - -But as things are, the server doesn't care: so long as its authenticated by a user on the server. -Ideally it would use the session info for the tab hosting the widget, but I couldn't come up with a super clean way of doing that doesn't distract from the proof of concept. Let me know if anyone has any ideas for that. Or if we don't care for now. From 99314b4fdf414662f89674b3001f4ec6e26327c5 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Sun, 8 Mar 2026 20:24:08 -0500 Subject: [PATCH 19/80] plz work thanks --- .changeset/avatars.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.changeset/avatars.md b/.changeset/avatars.md index 001dd7780..954693d0d 100644 --- a/.changeset/avatars.md +++ b/.changeset/avatars.md @@ -2,5 +2,4 @@ sable: minor --- -Add avatars to calls by forking element call. - +Add avatars to calls by forking element call, among other things. From dd65e2241e801e70719552c2eec4e7ca290936f0 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Mon, 9 Mar 2026 08:47:06 -0500 Subject: [PATCH 20/80] Revert "avatars!" --- .changeset/avatars.md | 5 ----- .gitignore | 1 - .gitmodules | 3 --- .prettierignore | 1 - element-call | 1 - eslint.config.js | 1 - package-lock.json | 20 ++++++++++---------- package.json | 2 +- src/app/plugins/call/utils.ts | 2 -- src/sw.ts | 14 -------------- 10 files changed, 11 insertions(+), 39 deletions(-) delete mode 100644 .changeset/avatars.md delete mode 100644 .gitmodules delete mode 160000 element-call diff --git a/.changeset/avatars.md b/.changeset/avatars.md deleted file mode 100644 index 954693d0d..000000000 --- a/.changeset/avatars.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sable: minor ---- - -Add avatars to calls by forking element call, among other things. diff --git a/.gitignore b/.gitignore index 5cc8aa47a..1c1104414 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,3 @@ devAssets *.tfbackend !*.tfbackend.example crash.log -build.sh diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 21b4a2cc4..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "element-call"] - path = element-call - url = https://github.com/melogale/element-call.git diff --git a/.prettierignore b/.prettierignore index cc2e80225..dd3a20e64 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,5 @@ dist node_modules -element-call package.json package-lock.json LICENSE diff --git a/element-call b/element-call deleted file mode 160000 index ecef381c2..000000000 --- a/element-call +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ecef381c246c177af28b8c99c5076da19878a136 diff --git a/eslint.config.js b/eslint.config.js index fcd06a9b4..9fa0c87bb 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -134,7 +134,6 @@ const projectOverrides = defineConfig([ ]); export default defineConfig([ - { ignores: ['element-call/'] }, includeIgnoreFile(gitignorePath), ...jsConfig, ...reactConfig, diff --git a/package-lock.json b/package-lock.json index 2a8fa778d..5683a6d19 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,7 +71,7 @@ }, "devDependencies": { "@cloudflare/vite-plugin": "^1.26.0", - "@element-hq/element-call-embedded": "file:element-call/embedded/web", + "@element-hq/element-call-embedded": "0.16.3", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "@eslint/compat": "2.0.2", "@eslint/js": "9.39.3", @@ -110,11 +110,6 @@ "npm": "11.x" } }, - "element-call/embedded/web": { - "name": "@element-hq/element-call-embedded", - "version": "0.0.0", - "dev": true - }, "node_modules/@apideck/better-ajv-errors": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.6.tgz", @@ -1917,8 +1912,10 @@ } }, "node_modules/@element-hq/element-call-embedded": { - "resolved": "element-call/embedded/web", - "link": true + "version": "0.16.3", + "resolved": "https://registry.npmjs.org/@element-hq/element-call-embedded/-/element-call-embedded-0.16.3.tgz", + "integrity": "sha512-OViKJonDaDNVBUW9WdV9mk78/Ruh34C7XsEgt3O8D9z+64C39elbIgllHSoH5S12IRlv9RYrrV37FZLo6QWsDQ==", + "dev": true }, "node_modules/@emnapi/core": { "version": "1.8.1", @@ -17887,7 +17884,10 @@ } }, "@element-hq/element-call-embedded": { - "version": "file:element-call/embedded/web" + "version": "0.16.3", + "resolved": "https://registry.npmjs.org/@element-hq/element-call-embedded/-/element-call-embedded-0.16.3.tgz", + "integrity": "sha512-OViKJonDaDNVBUW9WdV9mk78/Ruh34C7XsEgt3O8D9z+64C39elbIgllHSoH5S12IRlv9RYrrV37FZLo6QWsDQ==", + "dev": true }, "@emnapi/core": { "version": "1.8.1", @@ -26905,4 +26905,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 25f4ca223..2667d1481 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ }, "devDependencies": { "@cloudflare/vite-plugin": "^1.26.0", - "@element-hq/element-call-embedded": "file:element-call/embedded/web", + "@element-hq/element-call-embedded": "0.16.3", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "@eslint/compat": "2.0.2", "@eslint/js": "9.39.3", diff --git a/src/app/plugins/call/utils.ts b/src/app/plugins/call/utils.ts index 8c4955b4e..0ea72b3c8 100644 --- a/src/app/plugins/call/utils.ts +++ b/src/app/plugins/call/utils.ts @@ -18,8 +18,6 @@ export function getCallCapabilities( capabilities.add(MatrixCapabilities.MSC3846TurnServers); capabilities.add(MatrixCapabilities.MSC4157SendDelayedEvent); capabilities.add(MatrixCapabilities.MSC4157UpdateDelayedEvent); - capabilities.add('moe.sable.thumbnails'); - capabilities.add('moe.sable.media_proxy'); capabilities.add(`org.matrix.msc2762.timeline:${roomId}`); capabilities.add(`org.matrix.msc2762.state:${roomId}`); diff --git a/src/sw.ts b/src/sw.ts index 815c3be71..7185fbd30 100644 --- a/src/sw.ts +++ b/src/sw.ts @@ -270,20 +270,6 @@ self.addEventListener('fetch', (event: FetchEvent) => { return; } - // Since widgets like element call have their own client ids, - // we need this logic. We just go through the sessions list and get a session - // with the right base url. Media requests to a homeserver simply are fine with any account - // on the homeserver authenticating it, so this is fine. But it can be technically wrong. - // If you have two tabs for different users on the same homeserver, it might authenticate - // as the wrong one. - // Thus any logic in the future which cares about which user is authenticating the request - // might break this. Also, again, it is technically wrong. - const byBaseUrl = [...sessions.values()].find((s) => validMediaRequest(url, s.baseUrl)); - if (byBaseUrl) { - event.respondWith(fetch(url, { ...fetchConfig(byBaseUrl.accessToken), redirect })); - return; - } - event.respondWith( requestSessionWithTimeout(clientId).then((s) => { if (s && validMediaRequest(url, s.baseUrl)) { From bb67d54d1085f499de2c774a090870f2c497c2f0 Mon Sep 17 00:00:00 2001 From: Rose Date: Mon, 9 Mar 2026 18:26:46 +0100 Subject: [PATCH 21/80] Add restrictions on generative AI usage in contributions Added guidelines regarding the use of generative AI in contributions to ensure authenticity and value. taken from: https://github.com/commetchat/commet/blob/b3c1545d395bc93af59d25d87ef79221eb17d367/CONTRIBUTING.md?plain=1#L7-L17 --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d18fd73cb..71226fc97 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,6 +44,18 @@ Also, we use [ESLint](https://eslint.org/) for clean and stylistically consisten - `npm run typecheck` - `npm run knip` +## Restrictions on Generative AI Usage + +We expect and appreciate authentic engagement in our community. + +Do not post output from Large Language Models or similar generative AI as comments on GitHub, as such comments tend to be formulaic and low content. + +If you use generative AI tools as an aid in developing code, ensure that you fully understand the proposed changes and can explain why they are the correct approach. + +Make sure you have added value based on your personal competency to your contributions. Just taking some input, feeding it to an AI and posting the result is not of value to the project. We reserve the right to rigorously reject seemingly AI generated low-value contributions. + +Maintainers may close issues and PRs that are not useful or productive, including those that are fully generated by AI. If a contributor repeatedly opens unproductive issues or PRs, they may be blocked. + ## Release notes and versioning (Knope) We use [Knope](https://knope.tech/) with the Knope GitHub Bot to manage change documentation and releases. The workflow configuration lives in [`knope.toml`](./knope.toml). From f45deeb037590920354a9d32398467cd889e3ab5 Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 9 Mar 2026 18:57:02 +0100 Subject: [PATCH 22/80] fixed formatting --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 71226fc97..48939843b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,7 +46,7 @@ Also, we use [ESLint](https://eslint.org/) for clean and stylistically consisten ## Restrictions on Generative AI Usage -We expect and appreciate authentic engagement in our community. +We expect and appreciate authentic engagement in our community. Do not post output from Large Language Models or similar generative AI as comments on GitHub, as such comments tend to be formulaic and low content. From 2e156f55e5a55c991b7103e27f71feb8bcf09411 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Mon, 9 Mar 2026 14:47:53 -0500 Subject: [PATCH 23/80] Delete .github/CODEOWNERS --- .github/CODEOWNERS | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index be6c9424d..000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @7w1 \ No newline at end of file From 27600e2e63a41b6dd81382f91e763dac8c1dbcfc Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Sun, 8 Mar 2026 14:38:06 -0400 Subject: [PATCH 24/80] chore: add changeset for notification banner fix --- .changeset/fix-notification-banner.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-notification-banner.md diff --git a/.changeset/fix-notification-banner.md b/.changeset/fix-notification-banner.md new file mode 100644 index 000000000..a3b7b19cb --- /dev/null +++ b/.changeset/fix-notification-banner.md @@ -0,0 +1,5 @@ +--- +"sable": patch +--- + +fix: in-app notification banner placement From 780591580f367d06f9c0dd26324d1c73fdf4e688 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Sun, 8 Mar 2026 18:35:52 -0400 Subject: [PATCH 25/80] fix: remove NotificationBanner from ClientNonUIFeatures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Completes the placement move — banner is now rendered only in ClientLayout as position:fixed. --- src/app/pages/client/ClientNonUIFeatures.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/pages/client/ClientNonUIFeatures.tsx b/src/app/pages/client/ClientNonUIFeatures.tsx index 3116c4c56..56c333065 100644 --- a/src/app/pages/client/ClientNonUIFeatures.tsx +++ b/src/app/pages/client/ClientNonUIFeatures.tsx @@ -7,7 +7,6 @@ import { getReactCustomHtmlParser, LINKIFY_OPTS } from '$plugins/react-custom-ht import { sanitizeCustomHtml } from '$utils/sanitize'; import { roomToUnreadAtom } from '$state/room/roomToUnread'; import LogoSVG from '$public/res/svg/cinny.svg'; -import { NotificationBanner } from '$components/notification-banner'; import LogoUnreadSVG from '$public/res/svg/cinny-unread.svg'; import LogoHighlightSVG from '$public/res/svg/cinny-highlight.svg'; import NotificationSound from '$public/sound/notification.ogg'; @@ -559,7 +558,6 @@ export function ClientNonUIFeatures({ children }: ClientNonUIFeaturesProps) { - {children} ); From 652c487544597e6d87f3c436bdf9d39be0dbabf9 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Mon, 9 Mar 2026 17:08:03 -0400 Subject: [PATCH 26/80] chore: fix changeset formatting (prettier) --- .changeset/fix-notification-banner.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/fix-notification-banner.md b/.changeset/fix-notification-banner.md index a3b7b19cb..b46793fbe 100644 --- a/.changeset/fix-notification-banner.md +++ b/.changeset/fix-notification-banner.md @@ -1,5 +1,5 @@ --- -"sable": patch +'sable': patch --- fix: in-app notification banner placement From 65be06ea0fbf9317a9a3faa0ae2dea425619c9e3 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Mon, 9 Mar 2026 16:22:39 -0500 Subject: [PATCH 27/80] changesets --- .changeset/feat-notification-settings-ui.md | 11 +---------- .changeset/feat_notification_highlight_messages.md | 4 ++-- .changeset/z_igt_repo_change.md | 5 +++++ 3 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 .changeset/z_igt_repo_change.md diff --git a/.changeset/feat-notification-settings-ui.md b/.changeset/feat-notification-settings-ui.md index 8908c269c..ee90c2c87 100644 --- a/.changeset/feat-notification-settings-ui.md +++ b/.changeset/feat-notification-settings-ui.md @@ -2,13 +2,4 @@ sable: minor --- -feat: notification settings page improvements - -- Rename "Mobile In-App Notifications" → "In-App Notifications"; show the toggle on all platforms. -- Rename "Notification Sound" → "In-App Notification Sound" to clarify it only controls in-page audio, not push sound. -- Move badge display settings (Show Unread Counts, Badge Counts for DMs Only, Show Unread Ping Counts) from Appearance into the Notifications page. -- Fix "System Notifications" description — remove incorrect claim that mobile uses the in-app banner instead. -- Add a notification levels info button (ⓘ) to the All Messages, Special Messages, and Keyword Messages section headings explaining Disable / Notify Silent / Notify Loud. -- Add descriptive text under each notification section heading. -- Collapse the two `@room` push rules into a single "Mention @room" control (routes to `IsRoomMention` on modern servers, `AtRoomNotification` on older servers). Showing them separately caused an apparent sync loop where setting one immediately reset the other. -- Add "Follows your global notification rules" subtitle to the "Default" option in the per-room notification switcher. +Notification settings page improvements. diff --git a/.changeset/feat_notification_highlight_messages.md b/.changeset/feat_notification_highlight_messages.md index e111707cf..055f2c11d 100644 --- a/.changeset/feat_notification_highlight_messages.md +++ b/.changeset/feat_notification_highlight_messages.md @@ -1,5 +1,5 @@ --- -sable: minor +sable: patch --- -Messages that trigger a push rule with `highlight: true` (e.g. @mentions, keyword matches) now receive a full-width background highlight in the room timeline. Notifications with a sound tweak ("Notify Loud") use a warning-amber colour; silent highlights use the secondary-surface colour. Both colours adapt automatically to the active theme. +Mentions now receive a full-width background highlight in the room timeline. diff --git a/.changeset/z_igt_repo_change.md b/.changeset/z_igt_repo_change.md new file mode 100644 index 000000000..8dd739523 --- /dev/null +++ b/.changeset/z_igt_repo_change.md @@ -0,0 +1,5 @@ +--- +sable: patch +--- + +GitHub repo moved to [SableClient/Sable](https://github.com/SableClient/Sable) go star it! From bff06ce80e31c6ad51d2129adcfa2f6a31bf51f2 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Mon, 9 Mar 2026 16:27:10 -0500 Subject: [PATCH 28/80] changesets --- .changeset/feat-notification-settings-ui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/feat-notification-settings-ui.md b/.changeset/feat-notification-settings-ui.md index ee90c2c87..43d529c26 100644 --- a/.changeset/feat-notification-settings-ui.md +++ b/.changeset/feat-notification-settings-ui.md @@ -1,5 +1,5 @@ --- -sable: minor +sable: patch --- Notification settings page improvements. From 779a91f9e84c35a7a0807645832cb2cfa473797b Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Mon, 9 Mar 2026 17:47:26 -0400 Subject: [PATCH 29/80] chore: update all repo references to SableClient/Sable The project has moved from github.com/7w1/sable to github.com/SableClient/Sable. Update all non-historical references throughout the codebase: - README.md: github.com and ghcr.io links - CONTRIBUTING.md: issues link - .github/ISSUE_TEMPLATE/bug_report.yml: existing-issues search link - knope.toml: owner/repo for release automation - src/app/features/settings/about/About.tsx: repo + pulls links - src/app/pages/auth/AuthFooter.tsx: repo link - src/app/pages/client/WelcomePage.tsx: source + changelog links Historical PR/issue links in CHANGELOG.md and issue-specific deep-links (e.g. github.com/7w1/sable/issues/146) are intentionally left pointing to the old repo where those items live. --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- CONTRIBUTING.md | 2 +- README.md | 10 +++++----- knope.toml | 4 ++-- src/app/features/settings/about/About.tsx | 4 ++-- src/app/pages/auth/AuthFooter.tsx | 2 +- src/app/pages/client/WelcomePage.tsx | 8 ++++---- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 8a18f400f..a2ad3cd92 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -6,7 +6,7 @@ body: attributes: value: | ## First of all - 1. Please search for [existing issues](https://github.com/7w1/sable/issues?q=is%3Aissue) about this problem first. + 1. Please search for [existing issues](https://github.com/SableClient/Sable/issues?q=is%3Aissue) about this problem first. 2. Make sure Sable is up to date. 3. Make sure it's an issue with Sable and not something else you are using. 4. Remember to be friendly. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 48939843b..3b0b3cee3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ All types of contributions are encouraged and valued. Please make sure to read t ## Bug reports -Bug reports and feature suggestions must use descriptive and concise titles and be submitted to [GitHub Issues](https://github.com/7w1/sable/issues). Please use the search function to make sure that you are not submitting duplicates, and that a similar report or request has not already been resolved or rejected. +Bug reports and feature suggestions must use descriptive and concise titles and be submitted to [GitHub Issues](https://github.com/SableClient/Sable/issues). Please use the search function to make sure that you are not submitting duplicates, and that a similar report or request has not already been resolved or rejected. ## Pull requests diff --git a/README.md b/README.md index 606258a12..50cd094be 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Sable -A Matrix client built to enhance the user experience with quality-of-life features, cosmetics, utilities, and sheer usability. See the [changelog](https://github.com/7w1/sable/blob/dev/CHANGELOG.md). +A Matrix client built to enhance the user experience with quality-of-life features, cosmetics, utilities, and sheer usability. See the [changelog](https://github.com/SableClient/Sable/blob/dev/CHANGELOG.md). Join our matrix space [here](https://matrix.to/#/#sable:sable.moe) to discuss features, issues, or meowing. @@ -9,7 +9,7 @@ Forked from [Cinny](https://github.com/cinnyapp/cinny/). ## Getting started The web app is available at [app.sable.moe](https://app.sable.moe/) and gets updated on frequently, as soon as a feature is deemed stable. -You can also download our desktop app for windows and linux from [releases](https://github.com/7w1/sable/releases/latest). +You can also download our desktop app for windows and linux from [releases](https://github.com/SableClient/Sable/releases/latest). ## Self-hosting You have a few options for self hosting, you can: @@ -19,7 +19,7 @@ You have a few options for self hosting, you can: ### Docker -Prebuilt images are published to `ghcr.io/7w1/sable`. +Prebuilt images are published to `ghcr.io/sableclient/sable`. - `latest` tracks the current `dev` branch image. - `X.Y.Z` tags are versioned releases. @@ -29,7 +29,7 @@ Prebuilt images are published to `ghcr.io/7w1/sable`. Run the latest image with: ```sh -docker run --rm -p 8080:8080 ghcr.io/7w1/sable:latest +docker run --rm -p 8080:8080 ghcr.io/sableclient/sable:latest ``` Then open `http://localhost:8080`. @@ -40,7 +40,7 @@ file at `/app/config.json`: ```yaml services: sable: - image: ghcr.io/7w1/sable:latest + image: ghcr.io/sableclient/sable:latest ports: - '8080:8080' volumes: diff --git a/knope.toml b/knope.toml index cc19b1dc5..1af99b174 100644 --- a/knope.toml +++ b/knope.toml @@ -37,8 +37,8 @@ help_text = "Create a new change file to be included in the next release" type = "CreateChangeFile" [github] -owner = "7w1" -repo = "sable" +owner = "SableClient" +repo = "Sable" [bot.releases] enabled = true diff --git a/src/app/features/settings/about/About.tsx b/src/app/features/settings/about/About.tsx index abeec4ae7..17b580c6e 100644 --- a/src/app/features/settings/about/About.tsx +++ b/src/app/features/settings/about/About.tsx @@ -190,7 +190,7 @@ export function About({ requestClose }: AboutProps) {