Skip to content

fix: dashboard stale data on browser refresh#18

Merged
avrabe merged 1 commit intomainfrom
fix/dashboard-cache-headers
Mar 2, 2026
Merged

fix: dashboard stale data on browser refresh#18
avrabe merged 1 commit intomainfrom
fix/dashboard-cache-headers

Conversation

@avrabe
Copy link
Contributor

@avrabe avrabe commented Mar 2, 2026

Summary

  • Add Cache-Control: no-store to sendHtml() and sendJson() in the dashboard handler
  • Prevents browsers from caching HTMX partial responses (deployment panel, summary, repos, PRs, etc.)
  • Fixes the issue where refreshing the page shows stale data (deployed SHA, "started X ago", branch count all frozen)

Root cause

The sendHtml and sendJson helpers had no Cache-Control header, so browsers cached XHR responses from HTMX partials. On page reload, the browser served disk-cached HTML instead of hitting the server.

Test plan

  • Deploy and verify: refresh the dashboard — deployment SHA, "started ago", and branch count should update on each reload
  • Verify HTMX polling still works (partials auto-refresh every 10 min)
  • Static assets (htmx.js, idiomorph.js, app.js) still cache normally via their own max-age headers

🤖 Generated with Claude Code

Browser was caching HTMX partial responses, causing stale data on
page refresh. The deployment panel and other sections would show
old values until the 10-minute HTMX poll cycle caught up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@avrabe avrabe merged commit 1e19937 into main Mar 2, 2026
5 checks passed
@avrabe avrabe deleted the fix/dashboard-cache-headers branch March 2, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant