Repository navigation
fix: correct daily history and cache public pages - #170
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Daily publication reposted unchanged work because PostgreSQL JSONB reorders object keys. Compare facts structurally and remove identical repeated revisions with a one-time migration. A read-only production replay identifies 29 false Monday cards and preserves the four genuine cards plus all original dated entries.
Missing token dates display zero daily usage and a flat cumulative line, fixing the gaps introduced by the one-year history query without changing stored data or totals.
Home, Work, and Tokens now cache rendered pages for 60 seconds and prefetch navigation. Successful syncs/publications warm the relevant data cache after invalidation, keeping the previous snapshot available during refresh. No loaders.
Validation: full suite (289 tests), targeted regression tests, typecheck, lint, both Knip passes, and production build. Browser checks covered all three routes; local cached responses took 7–17 ms. Production replay fills all 84 token gaps with the same 136,465,979,496 total. The repair query selects exactly 29 duplicates and passes PostgreSQL EXPLAIN in a read-only transaction; no production rows were changed during testing.