Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: remove duplicate build drift alert

[._.]/ Adam Eivy92865cc7ab75
diff --git a/client/src/services/socket.js b/client/src/services/socket.js
index 6f36e5a17f..ba6544a1b8 100644
--- a/client/src/services/socket.js
+++ b/client/src/services/socket.js
@@ -1,6 +1,6 @@
import { io } from 'socket.io-client';
import { isPublicGuestRoute } from '../lib/publicGuestRoutes';
-import { showStaleBuildToast, showBuildDriftToast } from './staleBuildToast';
+import { showStaleBuildToast } from './staleBuildToast';
import { createBuildDriftWatcher, SERVED_BUILD_ID } from '../lib/buildStamp.js';
import { getSystemBuild } from './apiSystem';
import toast from '../components/ui/Toast';
@@ -48,7 +48,7 @@ const EMBEDDED_BUILD_ID = SERVED_BUILD_ID;
// One frame, two different staleness problems with two different remedies —
// `resolveBuildFrame` owns that decision (it is pure and tested); this just
// dispatches, once per kind per tab.
-const TOAST_IDS = { reload: 'portos-stale-build', drift: 'portos-build-drift' };
+const TOAST_IDS = { reload: 'portos-stale-build' };
// The bundle hash arrives on the socket; the commit is FETCHED over the
// authenticated API, because the server's `connection` handler also fires for
@@ -58,8 +58,8 @@ const TOAST_IDS = { reload: 'portos-stale-build', drift: 'portos-build-drift' };
const buildWatcher = createBuildDriftWatcher({
embeddedBuildId: EMBEDDED_BUILD_ID,
fetchIdentity: () => getSystemBuild({ silent: true }),
- onShow: (action) => (action === 'reload' ? showStaleBuildToast() : showBuildDriftToast()),
- onClear: (action) => toast.dismiss(TOAST_IDS[action])
+ onShow: (action) => (action === 'reload' ? showStaleBuildToast() : undefined),
+ onClear: (action) => action === 'reload' ? toast.dismiss(TOAST_IDS.reload) : undefined
});
socket.on('build:id', ({ buildId } = {}) => buildWatcher.onBuildId(buildId));
diff --git a/client/src/services/staleBuildToast.jsx b/client/src/services/staleBuildToast.jsx
index e529a35665..05e418e520 100644
--- a/client/src/services/staleBuildToast.jsx
+++ b/client/src/services/staleBuildToast.jsx
@@ -20,26 +20,3 @@ export function showStaleBuildToast() {
{ id: 'portos-stale-build', duration: Infinity, label: 'New build available' },
);
}
-
-/**
- * Sticky toast for the OTHER staleness: this tab matches the bundle on disk,
- * but that bundle was built from a different git commit than the server process
- * is running (#4694).
- *
- * No Reload button, because reloading ON ITS OWN re-serves the same stale dist
- * and changes nothing — but the copy must not say reloading never helps either:
- * after the rebuild it names first, a reload is exactly what puts this tab on
- * the new bundle. Restarting the server instead drops the socket, and the
- * reconnect frame clears this toast (see services/socket.js).
- */
-export function showBuildDriftToast() {
- toast(
- <div className="flex flex-col gap-0.5">
- <span>UI and server were built from different commits.</span>
- <span className="text-xs opacity-80">
- Rebuild the client and reload, or restart the server from the checkout you are editing.
- </span>
- </div>,
- { id: 'portos-build-drift', duration: Infinity, label: 'UI and server built from different commits' },
- );
-}