Skip to content

dot mod: app browser uses wrong cursor when paginating getApps #134

@ReinhardHatko

Description

@ReinhardHatko

AppBrowser advances the page cursor by BATCH (the requested count) instead of by the scanned value the registry returns:

https://github.com/paritytech/playground-cli/blob/main/src/commands/mod/AppBrowser.tsx#L56

getApps(start, count) walks scanned storage slots and returns up to count matching entries — when filtering applies (e.g. visibility=private apps owned by others, empty slots), scanned > entries.length and the next page must resume at start + scanned. With start + count we re-walk the already-scanned region.

Symptoms

  • duplicate entries across pages
  • pagination may never reach the true end (start + count < total stays true forever)

Fix: read scanned from the response and use start + scanned as the next cursor; terminate when scanned === 0 or the offset reaches total.

Metadata

Metadata

Assignees

Labels

P0Blocker — required for V1 shipThu 7 May P0sP0 work targeted to land EOD Thu 7 May

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions