## Description When the app returns from background, `retryImmediately()` triggers a fresh sliding sync response. If the server includes `initial: true` for the currently open room, the SDK emits `RoomEvent.TimelineReset`, replacing the live timeline with a new empty one. `eventsLength` drops to 0 but `isReady` stays `true`, leaving the message list visually blank for ~500 ms until events re-arrive from the server. ### Changes **`RoomTimeline.tsx`** - Added a `useLayoutEffect` that detects `eventsLength` dropping to 0 while the timeline is already visible (`isReady === true`). It immediately sets `isReady = false` and resets `hasInitialScrolledRef`, re-arming the existing initial-scroll logic. Uses `useLayoutEffect` so the transition happens before the browser paints — the blank frame is never shown. - Expanded `showLoadingPlaceholders`, `vListItemCount`, and the container `opacity` to include the `!isReady` case, so skeleton placeholders are shown immediately during the reload rather than leaving an invisible list. ### Before / After | Before | After | |--------|-------| | Room goes blank for ~500 ms on foreground return | Skeleton placeholders appear instantly, then content fades in | Fixes # ### 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 - [x] I have commented my code, particularly in hard-to-understand areas - [x] My changes generate no new warnings ## AI disclosure: Fully AI generated (explain what all the generated code does in moderate detail). The `useLayoutEffect` guard and the three `!isReady` condition expansions were fully AI generated. The effect fires synchronously before paint when `eventsLength` drops to 0 on an already-visible timeline, hides content and resets the initial-scroll flag. The existing 80 ms scroll timer then re-runs once events refill and calls `setIsReady(true)`. The `showLoadingPlaceholders` / `vListItemCount` changes ensure VList renders 3 placeholder skeleton rows (matching the existing pagination-loading behaviour) while events are absent.
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:
- Run the prebuilt docker container.
- Deploy on a site like GitLab Pages. Jae has a guide here.
- Build it yourself.
Docker
Prebuilt images are published to ghcr.io/sableclient/sable.
latesttracks the currentdevbranch image.X.Y.Ztags are versioned releases.X.Ytags float within a release line.- Pushes to
devalso 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
basepath inbuild.config.ts.- For example, if you want to deploy on
https://sable.moe/app, then setbase: '/app'.
- For example, if you want to deploy on
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.