Skip to content

Commit 292e024

Browse files
committed
docs(poll): updates README and JSDoc for background refresh
1 parent 0c81bbe commit 292e024

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Dashboard SPA tracking GitHub issues, PRs, and GHA workflow runs across multiple
1818
- **Ignore System** — Hide specific items with an "N ignored" badge and unignore popover.
1919
- **Dark Mode** — System-aware with flash prevention via inline script + CSP SHA-256 hash.
2020
- **ETag Caching** — Conditional requests (304s are free against GitHub's rate limit).
21-
- **Auto-refresh**Visibility-aware polling that pauses when tab is hidden.
21+
- **Auto-refresh**Background polling keeps data fresh even in hidden tabs; hot poll pauses to save API budget.
2222

2323
## Tech Stack
2424

@@ -55,7 +55,7 @@ src/
5555
services/
5656
api.ts # GitHub API methods (fetchOrgs, fetchRepos, fetchIssues, fetchPRs, fetchWorkflowRuns)
5757
github.ts # Octokit client factory with ETag caching and rate limit tracking
58-
poll.ts # Poll coordinator with visibility-aware auto-refresh
58+
poll.ts # Poll coordinator with background refresh + hot poll for in-flight items
5959
stores/
6060
auth.ts # OAuth token management (localStorage persistence, validateToken)
6161
cache.ts # IndexedDB cache with TTL eviction and ETag support

src/app/services/poll.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,9 @@ export async function fetchHotData(): Promise<{
580580
* in-flight items without a full poll cycle. Uses setTimeout chains to avoid
581581
* overlapping concurrent fetches.
582582
*
583+
* - Pauses when document is hidden (visual-only feedback has no value in background tabs)
584+
* - Resumes on next scheduled cycle when tab becomes visible
585+
*
583586
* Must be called inside a SolidJS reactive root (uses createEffect + onCleanup).
584587
*
585588
* @param getInterval - Reactive accessor returning interval in seconds

0 commit comments

Comments
 (0)