Browser shows stale content after re-running mdview with different file #14

Closed
opened 2026-06-05 12:26:37 +00:00 by ldraney · 0 comments
Owner

Type

Bug

Lineage

Standalone -- discovered during session while testing mdview from ~/macbook-ssh.

Repo

ldraney/mdview

What Broke

Re-running mdview with a different file kills the old server and starts a new one correctly, but the browser shows the previously rendered file. Two causes: Turbo Drive caches the page at / and serves a stale snapshot, and missing Cache-Control headers let the browser serve from disk cache.

Additionally, puma binds to 127.0.0.1 (Rails server default overrides puma.rb's bind "tcp://0.0.0.0:...") making it unreachable from the k8s nginx reverse proxy via Tailscale IP.

Repro Steps

  1. Run mdview ~/project-a/README.md
  2. Open browser to localhost:3137 or mdview.tail5b443a.ts.net
  3. Run mdview ~/project-b/README.md
  4. Observe: browser still shows project-a's README

Expected Behavior

Browser shows project-b's README after step 4, both on localhost and via the Tailscale Funnel URL.

Environment

  • Cluster/namespace: local archbox + mdview namespace in k3s
  • Service version/commit: 78918ec
  • Related alerts: none

Acceptance Criteria

  • Cache-Control: no-store header on all responses
  • <meta name="turbo-cache-control" content="no-cache"> in layout
  • Puma binds to 0.0.0.0:3137 (reachable from Tailscale network)
  • Browser shows correct file after re-running mdview
  • ldraney/pal-e-deployments -- companion fix to swap Docker app for nginx proxy
### Type Bug ### Lineage Standalone -- discovered during session while testing mdview from ~/macbook-ssh. ### Repo `ldraney/mdview` ### What Broke Re-running `mdview` with a different file kills the old server and starts a new one correctly, but the browser shows the previously rendered file. Two causes: Turbo Drive caches the page at `/` and serves a stale snapshot, and missing `Cache-Control` headers let the browser serve from disk cache. Additionally, puma binds to `127.0.0.1` (Rails `server` default overrides puma.rb's `bind "tcp://0.0.0.0:..."`) making it unreachable from the k8s nginx reverse proxy via Tailscale IP. ### Repro Steps 1. Run `mdview ~/project-a/README.md` 2. Open browser to `localhost:3137` or `mdview.tail5b443a.ts.net` 3. Run `mdview ~/project-b/README.md` 4. Observe: browser still shows project-a's README ### Expected Behavior Browser shows project-b's README after step 4, both on localhost and via the Tailscale Funnel URL. ### Environment - Cluster/namespace: local archbox + mdview namespace in k3s - Service version/commit: `78918ec` - Related alerts: none ### Acceptance Criteria - [x] `Cache-Control: no-store` header on all responses - [x] `<meta name="turbo-cache-control" content="no-cache">` in layout - [x] Puma binds to `0.0.0.0:3137` (reachable from Tailscale network) - [x] Browser shows correct file after re-running mdview ### Related - `ldraney/pal-e-deployments` -- companion fix to swap Docker app for nginx proxy
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/mdview#14
No description provided.