nx-webmail: fix hydration race and ensure continued inbox loading
Some checks failed
Publish nx-webmail Image (Gitea) / publish (push) Has been cancelled
Some checks failed
Publish nx-webmail Image (Gitea) / publish (push) Has been cancelled
This commit is contained in:
@@ -30,7 +30,7 @@ Umbrel installation is most reliable when your app uses a prebuilt image from a
|
||||
- `git.weektab.org/nexus/nx-webmail:latest`
|
||||
3. The workflow then pins `nx-webmail/docker-compose.yml` to `tag@sha256:digest` automatically.
|
||||
4. Manual fallback:
|
||||
docker buildx build --platform linux/amd64,linux/arm64 -t git.weektab.org/nexus/nx-webmail:1.0.8 --push .
|
||||
docker buildx build --platform linux/amd64,linux/arm64 -t git.weektab.org/nexus/nx-webmail:1.0.9 --push .
|
||||
|
||||
## Umbrel app packaging
|
||||
|
||||
@@ -55,7 +55,7 @@ This repository is prepared for Umbrel app-store usage.
|
||||
Notes:
|
||||
- Umbrel uses the `app_proxy` service in `docker-compose.yml`.
|
||||
- Internal app port is `3001`.
|
||||
- `server` uses a prebuilt registry image (`git.weektab.org/nexus/nx-webmail:1.0.8`).
|
||||
- `server` uses a prebuilt registry image (`git.weektab.org/nexus/nx-webmail:1.0.9`).
|
||||
- If your store prefix changes, update `id` in `umbrel-app.yml` and `APP_HOST` in `docker-compose.yml`.
|
||||
|
||||
## Notes
|
||||
|
||||
@@ -7,7 +7,7 @@ services:
|
||||
APP_PORT: 3001
|
||||
|
||||
server:
|
||||
image: git.weektab.org/nexus/nx-webmail:1.0.8@sha256:db773eea0c6d836360ad52a7e55f25d5f1b3684a73e2cbce21d4c1fec55137f5
|
||||
image: git.weektab.org/nexus/nx-webmail:1.0.9@sha256:bd8d9c38edbc43924a69509d7d1e19e343ead17e7d87f7b52dda540f09e9a3e9
|
||||
init: true
|
||||
restart: on-failure
|
||||
stop_grace_period: 1m
|
||||
|
||||
@@ -381,6 +381,10 @@ export default function Webmail() {
|
||||
&& baseEmailsForSync.length > 0
|
||||
&& lastLoadedDirection === 'newest';
|
||||
|
||||
// Keep refs in sync immediately to avoid stale-closure race conditions
|
||||
// during progressive hydration and background refresh operations.
|
||||
activeFolderRef.current = folder;
|
||||
activeAccountIdRef.current = accountId;
|
||||
setActiveFolder(folder);
|
||||
if (!append && !forceRefresh && cachedFolderEmails.length > 0) {
|
||||
const initial = shouldResetWindow
|
||||
@@ -606,12 +610,14 @@ export default function Webmail() {
|
||||
setFolders(normalized);
|
||||
setIsLoggedIn(true);
|
||||
setIsAddingAccount(false);
|
||||
activeAccountIdRef.current = accountId;
|
||||
setActiveAccountId(accountId);
|
||||
|
||||
const defaultFolder = normalized.find((f) => String(f.name).toUpperCase() === String(lastFolder || '').toUpperCase())?.name
|
||||
|| normalized.find((f) => String(f.name).toUpperCase() === 'INBOX')?.name
|
||||
|| normalized[0]?.name
|
||||
|| 'INBOX';
|
||||
activeFolderRef.current = defaultFolder;
|
||||
|
||||
const cachedDefaultFolderEntry = accountCache?.emailsByFolder?.[defaultFolder];
|
||||
const cachedDefaultEmails = Array.isArray(cachedDefaultFolderEntry)
|
||||
|
||||
@@ -4,7 +4,7 @@ name: Webmail
|
||||
tagline: Self-hosted IMAP/SMTP webmail client
|
||||
icon: https://git.weektab.org/nexus/umbrel-apps/raw/branch/main/gallery/webmail/icon.png
|
||||
category: utilities
|
||||
version: "1.0.8"
|
||||
version: "1.0.9"
|
||||
port: 3001
|
||||
description: >-
|
||||
Webmail is a lightweight, self-hosted webmail app for connecting to external
|
||||
@@ -17,7 +17,7 @@ repo: https://git.weektab.org/nexus/webmail
|
||||
support: https://git.weektab.org/nexus/webmail/issues
|
||||
gallery: []
|
||||
releaseNotes: >-
|
||||
Added robust paged auto-hydration after login to improve sync consistency in Docker.
|
||||
Fixed hydration race condition so full inbox loading continues reliably after login.
|
||||
dependencies: []
|
||||
path: ""
|
||||
defaultUsername: ""
|
||||
|
||||
Reference in New Issue
Block a user