Skip to content

feat: request deduplication, task queue, asset versioning & error tracking (#323 #325 #326 #327)#329

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
authenticeasy-sys:feat/request-dedup-task-queue-asset-versioning-error-tracking
Apr 28, 2026
Merged

feat: request deduplication, task queue, asset versioning & error tracking (#323 #325 #326 #327)#329
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
authenticeasy-sys:feat/request-dedup-task-queue-asset-versioning-error-tracking

Conversation

@authenticeasy-sys
Copy link
Copy Markdown
Contributor

Summary

Implements four performance/reliability improvements and fixes a CI workflow bug.


CI Fix

  • ci.yml: The npm run build and npm run lint steps were concatenated on a single line (missing newline), causing lint to never run. Split into separate run steps.

#323 – Request Deduplication

  • src/lib/api/dedupe.ts – In-flight request cache. Concurrent calls with the same method + url + body key share one promise; no duplicate network requests are fired.
  • src/hooks/useApi.ts – React hook for data fetching backed by the dedupe cache. Exposes { data, loading, error, refetch }.

#325 – Task Queues

  • src/lib/queue/index.ts – Lightweight TaskQueue class with configurable concurrency, exponential-backoff retry, and a dead-letter queue for exhausted jobs. Exports a shared taskQueue singleton.

#326 – Asset Versioning

  • next.config.ts – Added headers() returning:
    • /_next/static/**Cache-Control: public, max-age=31536000, immutable (Next.js already content-hashes these files)
    • /static/** → 7-day cache with stale-while-revalidate
    • All HTML pages → must-revalidate so deployments are picked up immediately

#327 – Error Tracking

  • src/lib/errors/index.ts – Sentry-compatible interface (init, captureException, captureMessage, addBreadcrumb, setUser) wired over the existing errorReportingService. Swap init() for a real Sentry.init() call when the SDK is installed.

Testing

  • TypeScript: no new errors introduced (pre-existing errors in unrelated files remain unchanged).
  • All new files are zero-dependency additions that do not break existing imports.

Closes #323
Closes #325
Closes #326
Closes #327

…king

- fix(ci): split concatenated 'npm run build' and 'npm run lint' steps in ci.yml
- feat(rinafcode#323): add src/lib/api/dedupe.ts – in-flight request deduplication cache
- feat(rinafcode#323): add src/hooks/useApi.ts – data-fetching hook backed by dedupe
- feat(rinafcode#325): add src/lib/queue/index.ts – TaskQueue with concurrency, exponential-backoff retry, dead-letter queue
- feat(rinafcode#326): update next.config.ts – long-lived cache headers for hashed static assets, 7-day headers for /static, must-revalidate for HTML pages
- feat(rinafcode#327): add src/lib/errors/index.ts – Sentry-compatible error tracking interface wired over errorReportingService

Closes rinafcode#323
Closes rinafcode#325
Closes rinafcode#326
Closes rinafcode#327
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 28, 2026

@authenticeasy-sys Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER RUKAYAT-CODER merged commit 568e4db into rinafcode:main Apr 28, 2026
1 of 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.

Error Tracking Asset Versioning Task Queues Request Deduplication

2 participants