Skip to content

Fix: date widget readings by when the service produced them - #522

Merged
SandObserver merged 1 commit into
mainfrom
fix/reading-age
Oct 19, 2026
Merged

SandObserver merged 1 commit into
mainfrom
fix/reading-age

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Stamp each latest() outcome with the time it settled (at), and use it as the entry time.
  • Send an Age header (whole seconds since the outcome settled) on successful GET /api/widget-data/:id replies, so a stored result served during a slow refresh states its real age.
  • Add readingTime(data) to the widget toolbox: fetchData records now - Age per returned object; anything else reads as now.
  • Use it for the toolbox's last-success time in the stale caption and for Weather's "Updated" label.
  • Refresh cache-busting stamps for widget-toolbox.js.

Testing
All green. Added tests for the settle time, the Age header on a stored reply, readingTime, and Weather's use of it.

Changelog

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.

@SandObserver SandObserver added the bug Something isn't working label Oct 19, 2026
@SandObserver
SandObserver merged commit 19c807a into main Oct 19, 2026
6 checks passed
@SandObserver
SandObserver deleted the fix/reading-age branch October 19, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant