Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix(frontend): full-width setting sync and webhook auth header preservation

rcourtmane5a95a0da133
diff --git a/frontend-modern/src/components/Alerts/WebhookConfig.tsx b/frontend-modern/src/components/Alerts/WebhookConfig.tsx
index d7c1929520..4e69a91f99 100644
--- a/frontend-modern/src/components/Alerts/WebhookConfig.tsx
+++ b/frontend-modern/src/components/Alerts/WebhookConfig.tsx
@@ -293,13 +293,16 @@ export function WebhookConfig(props: WebhookConfigProps) {
});
// Update header inputs when switching services
const headers = template.headers || {};
- setHeaderInputs(
- Object.entries(headers).map(([key, value], index) => ({
- id: `header-${Date.now()}-${index}`,
- key,
- value,
- })),
- );
+ // When editing an existing webhook, preserve any user-added auth headers.
+ if (!editingId()) {
+ setHeaderInputs(
+ Object.entries(headers).map(([key, value], index) => ({
+ id: `header-${Date.now()}-${index}`,
+ key,
+ value,
+ })),
+ );
+ }
} else {
setFormData({
...formData(),
diff --git a/frontend-modern/src/utils/layout.ts b/frontend-modern/src/utils/layout.ts
index 06a4f81e0e..2580344f4f 100644
--- a/frontend-modern/src/utils/layout.ts
+++ b/frontend-modern/src/utils/layout.ts
@@ -40,12 +40,12 @@ function createLayoutStore() {
/**
* Load full-width preference from server (called after auth)
- * Only uses server preference if no local preference exists
+ * Always uses server preference after auth to keep localStorage in sync
+ * (server is the source of truth for cross-device/browser persistence).
*/
const loadFromServer = async () => {
- const hasLocalPreference = localStorage.getItem(STORAGE_KEYS.FULL_WIDTH_MODE) !== null;
- if (hasLocalPreference || hasLoadedFromServer()) {
- return; // Prefer local preference or already loaded
+ if (hasLoadedFromServer()) {
+ return; // Already loaded this session
}
try {
@@ -72,4 +72,3 @@ function createLayoutStore() {
}
export const layoutStore = createLayoutStore();
-