Skip to content

refactor(dx): replace loadWithPagination with getAllItems#2942

Draft
stalniy wants to merge 1 commit intomainfrom
refactor/dx-replace-loadWithPagination
Draft

refactor(dx): replace loadWithPagination with getAllItems#2942
stalniy wants to merge 1 commit intomainfrom
refactor/dx-replace-loadWithPagination

Conversation

@stalniy
Copy link
Copy Markdown
Contributor

@stalniy stalniy commented Mar 17, 2026

Why

  • loadWithPagination is deprecated in favor of getAllItems from @akashnetwork/http-sdk
  • getAllItems includes circular loop detection, preventing infinite pagination loops
  • Consolidates pagination logic into a single, well-tested utility

What

  • Replaced all usages of loadWithPagination with getAllItems from @akashnetwork/http-sdk in:
    • apps/deploy-web/src/queries/useDeploymentQuery.ts
    • apps/deploy-web/src/queries/useGrantsQuery.ts
    • apps/deploy-web/src/queries/useLeaseQuery.ts
    • apps/deploy-web/src/services/wallet-balances/wallet-balances.service.ts
    • packages/http-sdk/src/deployment/deployment-http.service.ts
  • Removed deprecated loadWithPagination and hasQueryParam from:
    • apps/deploy-web/src/utils/apiUtils.ts
    • packages/http-sdk/src/utils/pagination.utils.ts
  • Removed dead loadWithPagination code from apps/indexer/src/shared/utils/query.ts
  • Updated test assertions to match the new axios params-based API call pattern

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: badf0b29-e3e7-4baf-8629-2c694bd90036

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/dx-replace-loadWithPagination
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@stalniy stalniy force-pushed the refactor/dx-replace-loadWithPagination branch 2 times, most recently from 8a64763 to 0057fbc Compare March 17, 2026 12:56
@github-actions github-actions bot added size: S and removed size: M labels Mar 17, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 82.35294% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.78%. Comparing base (0fb1e50) to head (e3bd9e2).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/deploy-web/src/queries/useDeploymentQuery.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2942      +/-   ##
==========================================
- Coverage   57.79%   57.78%   -0.01%     
==========================================
  Files        1019     1019              
  Lines       23675    23669       -6     
  Branches     5861     5864       +3     
==========================================
- Hits        13682    13677       -5     
+ Misses       8707     8701       -6     
- Partials     1286     1291       +5     
Flag Coverage Δ *Carryforward flag
api 79.22% <ø> (+0.02%) ⬆️
deploy-web 41.31% <82.35%> (-0.04%) ⬇️
log-collector 84.83% <ø> (ø)
notifications 85.86% <ø> (ø)
provider-console 81.48% <ø> (ø) Carriedforward from 0fb1e50
provider-proxy 85.93% <ø> (ø) Carriedforward from 0fb1e50
tx-signer 76.26% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
apps/deploy-web/src/queries/useGrantsQuery.ts 100.00% <100.00%> (ø)
apps/deploy-web/src/queries/useLeaseQuery.ts 95.65% <100.00%> (+0.19%) ⬆️
...ervices/wallet-balances/wallet-balances.service.ts 84.84% <100.00%> (+1.51%) ⬆️
apps/deploy-web/src/utils/apiUtils.ts 62.19% <ø> (-4.82%) ⬇️
apps/deploy-web/src/queries/useDeploymentQuery.ts 33.33% <0.00%> (-4.17%) ⬇️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Replace all usages of the deprecated loadWithPagination utility with
getAllItems from @akashnetwork/http-sdk, which includes circular loop
detection. Remove dead loadWithPagination code from deploy-web,
http-sdk, and indexer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@stalniy stalniy force-pushed the refactor/dx-replace-loadWithPagination branch from 0057fbc to e3bd9e2 Compare March 17, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant