From e8d36efa790f629a86da506058f5b89f82093ee7 Mon Sep 17 00:00:00 2001 From: Giovani Guizzo Date: Thu, 12 Mar 2026 08:43:43 -0300 Subject: [PATCH 1/2] fix: resolve HTMX bug causing unstyled page when restoring dashboard tab from cache --- packages/dashboard/src/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/dashboard/src/index.ts b/packages/dashboard/src/index.ts index bb950d3..c49b719 100644 --- a/packages/dashboard/src/index.ts +++ b/packages/dashboard/src/index.ts @@ -144,6 +144,15 @@ export class SidequestDashboard { res.locals.basePath = this.config!.basePath ?? ""; next(); }); + + // Fixes a HTMX bug where restoring the dashboard tab from cache causes it to show an unstyled page + // https://github.com/bigskysoftware/htmx/issues/497 + this.app?.use((req, res, next) => { + if (req.headers["hx-request"]) { + res.setHeader("Cache-Control", "no-store, max-age=0"); + } + next(); + }); } /** From 6442862506c7715dfb2fd5bd0a08bb165d95c9eb Mon Sep 17 00:00:00 2001 From: Giovani Guizzo Date: Thu, 12 Mar 2026 08:48:37 -0300 Subject: [PATCH 2/2] fix: add data-theme attribute to html tag for consistent theming --- packages/dashboard/src/views/layout.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dashboard/src/views/layout.ejs b/packages/dashboard/src/views/layout.ejs index 18a8282..678be9e 100644 --- a/packages/dashboard/src/views/layout.ejs +++ b/packages/dashboard/src/views/layout.ejs @@ -1,5 +1,5 @@ - + <%= title || 'Sidequest Dashboard' %>