This repository has been archived on 2026-10-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
7w1 82f9c8d7d0 Change code block highlighting from Prism to Arborium (#576)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

I was inspired by this tweet.
https://fxtwitter.com/DiscordPreviews/status/2036671398265995336

- replace Prism-based code block highlighting with Arborium for timeline
code blocks and text previews
- add Arborium theme metadata, runtime wiring, and a code block theme
setting that matches the existing System Theme pattern, with system
light/dark selections plus a single manual override
- extract a reusable `SettingMenuSelector`, remove
`NotificationModeSwitcher`, and reuse the shared selector in
notification, room, and theme settings
- wrap rendered code blocks so long lines break in both highlighted
messages and text previews instead of forcing wide horizontal overflow

The cool thing about Arborium is that all the language support and
themes are loaded from a CDN. So you basically ship nothing and on
demand, it downloads the proper grammer for each language that shows up
in the messages. fallback is just no syntax highlighting.

### Sceenshots

https://github.com/user-attachments/assets/1185d147-50ad-4b77-87c2-50660899c4b8

<img width="593" height="411" alt="image"
src="https://github.com/user-attachments/assets/b2eb8915-59dc-4198-a6de-7c8ae8c8d1d5"
/>

#### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings

### AI disclosure:

- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [x] Fully AI generated (explain what all the generated code does in
moderate detail).

The main change in this PR is replacing the old Prism-based highlighting
path with Arborium for rendered message code blocks and text previews.
The message renderer and text viewer now go through the Arborium-backed
code highlight renderer, Arborium themes are loaded through the new
theme bridge instead of the old Prism theme classes, and unsupported or
failed language/theme loads still fall back safely to plain rendered
code. The settings work in this PR now exposes code block theming with
the same structure as the existing app theme controls: a System Theme
toggle that keeps separate light and dark Arborium theme selections,
plus a single Manual Theme selector that can override them when system
mode is off. The reusable `SettingMenuSelector` extraction is supporting
cleanup that lets the same dropdown pattern drive notification settings,
room notification controls, and the theme pickers while removing the
older one-off switcher component. The wrapping changes are the last part
of that migration work: Arborium-rendered code now wraps in both
timeline messages and text previews so long lines stay readable without
forcing wide overflow. The tests cover Arborium theme selection and
loading, selector reuse, notification option reuse, and the
message/text-viewer code block regressions.
2026-03-30 23:56:59 +00:00
2026-03-17 23:18:55 -05:00
2026-03-17 23:18:55 -05:00
2026-03-05 22:34:11 -06:00
2026-03-17 23:18:55 -05:00
2026-03-04 19:21:00 -06:00
2026-03-11 17:20:05 +01:00
2026-03-17 23:18:55 -05:00
2026-03-30 03:33:46 +00:00
2026-03-17 23:18:55 -05:00
2026-03-20 19:19:43 -05:00
2026-03-21 18:23:30 +01:00
2026-03-12 00:31:27 +01:00
2026-03-09 08:47:06 -05:00
2026-03-17 23:18:55 -05:00
2026-03-22 17:37:17 +01:00
2023-02-24 17:28:04 +05:30
2026-03-17 23:18:55 -05:00
2026-03-17 23:18:55 -05:00

Sable

A Matrix client built to enhance the user experience with quality-of-life features, cosmetics, utilities, and sheer usability. See the changelog.

Soon to be replaced desktop apps can be downloaded here. They auto-update by pulling the website.

Join our matrix space here to discuss features, issues, or meowing.

Forked from Cinny.

Getting started

The web app is available at 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.

Self-hosting

You have a few options for self hosting, you can:

  1. Run the prebuilt docker container.
  2. Deploy on a site like GitLab Pages. Jae has a guide here.
  3. Build it yourself.

Docker

Prebuilt images are published to ghcr.io/sableclient/sable.

  • latest tracks the current dev branch image.
  • X.Y.Z tags are versioned releases.
  • X.Y tags float within a release line.
  • Pushes to dev also publish a short commit SHA tag.

Run the latest image with:

docker run --rm -p 8080:8080 ghcr.io/sableclient/sable:latest

Then open http://localhost:8080.

If you want to override the bundled config.json, mount your own file at /app/config.json:

services:
  sable:
    image: ghcr.io/sableclient/sable:latest
    ports:
      - '8080:8080'
    volumes:
      - ./config.json:/app/config.json:ro

Build it yourself

To build and serve Sable yourself with nginx, clone this repo and build it:

pnpm i # Installs all dependencies
pnpm run build # Compiles the app into the dist/ directory

After that, you can copy the dist/ directory to your server and serve it.

  • In the config.json, you can modify the default homeservers, feature rooms/spaces, toggle the account switcher, and toggle experimental simplified slilding sync support.

  • To deploy on subdirectory, you need to rebuild the app youself after updating the base path in build.config.ts.

    • For example, if you want to deploy on https://sable.moe/app, then set base: '/app'.

Local development

Tip

We recommend using a version manager as versions change quickly. fnm is a great cross-platform option (Windows, macOS, and Linux). NVM on Windows and nvm on Linux/macOS are also good choices. Use the version defined in .node-version.

Execute the following commands to start a development server:

fnm use --corepack-enabled # Activates the Node version and enables corepack
# If you not using fnm, install corepack manually: npm install --global corepack@latest
corepack install # Installs the pnpm version specified in package.json
pnpm i # Installs all dependencies
pnpm run dev # Serve a development version

To build the app:

pnpm run build # Compiles the app into the dist/ directory

Deployment and infrastructure

Deployment workflows and infrastructure details live in infra/README.md.

S
Description
Fork of SableClient/Sable with decryption fix
Readme AGPL-3.0
22 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 98.2%
CSS 1%
JavaScript 0.6%
HTML 0.1%