Skip to content

Fix All-period loading and reduce history query latency - #48

Merged
capisoft-lib merged 2 commits into
mainfrom
codex/all-period-fixes
Sep 16, 2026
Merged

capisoft-lib merged 2 commits into
mainfrom
codex/all-period-fixes

Conversation

@capisoft-lib

@capisoft-lib capisoft-lib commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Fixes switching from Today to All leaving today's figures visible after a failed history request, and reduces full-history database round trips.

  • Keep stale period data hidden behind an explicit error state until the requested period loads. Drop obsolete ETags when a response is no longer cacheable.
  • Return completed history summaries without caching when concurrent ingestion advances the revision, instead of discarding the result with HTTP 409.
  • Read aggregate pages in batches of 1,024 (raw detail reads remain at 128), select each page before aggregation, and fetch independent metadata concurrently.

Built on current main, preserving the already-merged project grouping, title fallback, historical cache and loading-region changes. The functional and performance changes were deployed in private Sites version 44 and tested by the owner.

Validation: regression coverage for Today → All failure/recovery, ETag invalidation, concurrent ingestion, and complete pagination over 2,050 synthetic sessions. Local before/after comparison preserved the entire response while reducing history reads from 70 to 9; local timings are not a production latency guarantee. Validation completed locally: npm run check (302 tests), hosted build and 15 Sites tests, ESLint, TypeScript, and a clean diff/privacy scan. GitHub CI also validates Windows and the Docker storage smoke test before merge.

@capisoft-lib
capisoft-lib merged commit 79006cc into main Sep 16, 2026
2 checks passed
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