Skip to content

Hot-reload watcher fires but home page (/) keeps serving stale render #269

Description

@adnaan

Repro

  1. tinkerdown serve content/ against a multi-page docs site
  2. Edit content/index.md (the home page mapped via site.home)
  3. Watch the server log: [Watch] File changed: index.md fires (twice, even)
  4. Hard-refresh http://localhost:PORT/ in the browser
  5. Observed: still serving the pre-edit render
  6. Expected: re-rendered HTML reflecting the edit

Other pages (e.g., /getting-started/your-first-app) hot-reload correctly when their .md is edited. The issue is specific to the / → home-page mapping.

Workaround

Restart tinkerdown serve. After restart, the new content is served immediately.

Hypothesis

The watcher invalidates a per-path cache, but the home-page mapping (site.home: index.md/) may use a separate code path that doesn't invalidate when index.md is touched. Likely candidates:

  • internal/server/watcher.go isIncludedFile or the handler that dispatches /
  • A pre-built static index served separately from the per-page render path

Discovered

While doing the literate rehaul of livetemplate/docs for v0.2.0 (your-first-app + landing page). Edited content/index.md to replace a cross-origin iframe with an embed-lvt block. Watcher logged File changed: index.md twice, but curl http://localhost:8084/ continued returning the pre-rehaul iframe HTML. Restarting tinkerdown produced the new content immediately.

Severity

Annoying for authors iterating on the home page. Not a correctness bug for non-home pages. The restart workaround is fast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-mediumMedium: quality, platform coverage, CIbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions