An almost stable Matrix client.
  • TypeScript 98.1%
  • CSS 1%
  • JavaScript 0.7%
  • HTML 0.1%
Find a file
7w1 fcff9ef378
Fix PMP ID handling and generation (#583)
### Description

This pull request addresses issues with ID handling and generation for
Personas by standardizing the way short IDs are generated and used
throughout the codebase. It replaces the use of `crypto.randomUUID()`
with a new utility function, `generateShortId`, ensuring IDs are shorter
and more consistent. Additionally, it improves command parsing for
Persona-related commands.

#### ID Generation Improvements

- Introduced a new utility function `generateShortId` in
`src/app/utils/shortIdGen.ts` to generate short, consistent IDs by
truncating UUIDs.
- Replaced all instances of `crypto.randomUUID()` with
`generateShortId(5)` when creating new Persona or member IDs in
`PerMessageProfileOverview.tsx` and `PKitCommandMessageHandler.ts`,
ensuring all IDs are now short and uniform.

#### Command Parsing Enhancements

- Updated regular expressions in `useCommands.ts` to use `\S+` instead
of `\w+` for Persona IDs, allowing IDs with a broader set of characters
and improving robustness of command parsing.

Fixes #582

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] 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
- [ ] 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).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->

No AI was used for this PR
2026-03-29 03:05:30 +00:00
.changeset fix(PMP, ID): changed pmp id handling and generation 2026-03-29 03:29:56 +02:00
.github Update cloudflare-web-deploy.yml 2026-03-23 23:54:23 -05:00
.vscode chore(vscode): add knip extension recommendation 2026-03-01 14:09:18 +01:00
contrib merge 2026-03-17 23:18:55 -05:00
docs merge 2026-03-17 23:18:55 -05:00
infra chore: migrate package manager from npm to pnpm 2026-03-11 15:19:09 +01:00
public Make Vite store all icons in public folders and make manifest.json pull from production file locations 2026-03-22 12:50:19 -05:00
scripts chore: remove non-thread files and references 2026-03-13 23:33:33 -04:00
src fix(PMP, ID): changed pmp id handling and generation 2026-03-29 03:29:56 +02:00
.dockerignore ci(docker): build site once and package per-arch 2026-03-07 00:54:17 +00:00
.gitattributes Create .gitattributes 2026-03-05 22:34:11 -06:00
.gitignore merge 2026-03-17 23:18:55 -05:00
.node-version Merge upstream 2026-03-04 19:21:00 -06:00
.nvmrc fix: badge positioning and alignment across sidebar components 2026-03-12 14:25:32 -04:00
.prettierignore fix: type and fmt issues 2026-03-11 17:20:05 +01:00
.prettierrc.json chore: modernize dependencies and linting stack 2026-02-14 22:08:26 +01:00
build.config.ts feat: URL navigation in auth (#1603) 2024-01-21 18:20:56 +05:30
Caddyfile merge 2026-03-17 23:18:55 -05:00
CHANGELOG.md chore: prepare release 1.13.0 2026-03-28 15:28:53 +00:00
CODE_OF_CONDUCT.md merge 2026-03-17 23:18:55 -05:00
config.json Update config.json 2026-03-20 19:19:43 -05:00
CONTRIBUTING.md Update CONTRIBUTING.md 2026-03-21 18:23:30 +01:00
Dockerfile fix: docker images 2026-03-12 00:31:27 +01:00
eslint.config.js Revert "avatars!" 2026-03-09 08:47:06 -05:00
index.html Update favicon and apple-touch-icon paths to relative 2026-03-22 17:20:34 +01:00
knip.json merge 2026-03-17 23:18:55 -05:00
knope.toml chore: add changeset 2026-03-22 17:37:17 +01:00
LICENSE Change license to AGPLv3 (#1115) 2023-02-24 17:28:04 +05:30
package.json chore: prepare release 1.13.0 2026-03-28 15:28:53 +00:00
pnpm-lock.yaml chore: bump picomatch from 2.3.1 to 2.3.2 2026-03-27 21:49:32 +00:00
pnpm-workspace.yaml chore: merge dev into hazre/fix/sidebar-count-badge-positioning 2026-03-25 15:47:50 +01:00
README.md fix#: correct GitLab docs url following new schema 2026-03-19 17:13:46 +02:00
tsconfig.json merge 2026-03-17 23:18:55 -05:00
vite.config.ts feat: add editor multiline mode and many edge case fixes (#476) 2026-03-23 04:02:36 +00:00
vitest.config.ts merge 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.