Improve page data loading performance #15

Closed
opened 2026-06-17 00:52:09 +02:00 by pregno · 3 comments
Owner

Summary

Improve perceived data loading performance when entering app pages, especially the Trading page, so recently loaded data is reused immediately instead of making the user wait on every navigation.

Plan saved at: .hermes/plans/2026-06-17_005055-improve-page-data-loading.md

Final plan

See .hermes/plans/2026-06-17_005055-improve-page-data-loading.md in the repository for the full implementation plan.

Implementation checklist

  • Add centralized TanStack Query client defaults in the web app.
  • Tune Trading page query options for positions and trade automation data.
  • Preserve the 15s positions refresh while Trading is mounted.
  • Ensure open/close/mode mutations still invalidate affected queries.
  • Add or update tests for query-client defaults and/or Trading query behavior.
  • Run pnpm test.
  • Run pnpm typecheck.
  • Optionally verify route re-entry behavior manually with the web app/network panel.

Acceptance criteria

  • Returning to Trading within the cache window renders last loaded positions/automation data immediately.
  • Trading data still refreshes approximately every 15 seconds while the page is open.
  • Mutations still refresh affected data after success.
  • Existing alert, scanner, and navigation behavior remains unchanged except for improved cache reuse.
  • Tests and typecheck pass.

Test plan

  • pnpm test
  • pnpm typecheck
  • Manual validation if practical: first Trading visit fetches data; leaving and returning shortly after shows cached data immediately; periodic refetch still happens while open.

Notes

Implementation is gated by applying the ready-for-dev label. Hermes will monitor this issue and start implementation automatically after that label is added.

## Summary Improve perceived data loading performance when entering app pages, especially the `Trading` page, so recently loaded data is reused immediately instead of making the user wait on every navigation. Plan saved at: `.hermes/plans/2026-06-17_005055-improve-page-data-loading.md` ## Final plan See `.hermes/plans/2026-06-17_005055-improve-page-data-loading.md` in the repository for the full implementation plan. ## Implementation checklist - [ ] Add centralized TanStack Query client defaults in the web app. - [ ] Tune `Trading` page query options for positions and trade automation data. - [ ] Preserve the 15s positions refresh while Trading is mounted. - [ ] Ensure open/close/mode mutations still invalidate affected queries. - [ ] Add or update tests for query-client defaults and/or Trading query behavior. - [ ] Run `pnpm test`. - [ ] Run `pnpm typecheck`. - [ ] Optionally verify route re-entry behavior manually with the web app/network panel. ## Acceptance criteria - Returning to `Trading` within the cache window renders last loaded positions/automation data immediately. - Trading data still refreshes approximately every 15 seconds while the page is open. - Mutations still refresh affected data after success. - Existing alert, scanner, and navigation behavior remains unchanged except for improved cache reuse. - Tests and typecheck pass. ## Test plan - `pnpm test` - `pnpm typecheck` - Manual validation if practical: first Trading visit fetches data; leaving and returning shortly after shows cached data immediately; periodic refetch still happens while open. ## Notes Implementation is gated by applying the `ready-for-dev` label. Hermes will monitor this issue and start implementation automatically after that label is added.
Author
Owner

copy ".hermes/plans/2026-06-17_005055-improve-page-data-loading.md" content here

copy ".hermes/plans/2026-06-17_005055-improve-page-data-loading.md" content here
Author
Owner

Hermes implementation has started for issue #15. I will work from the saved plan, run tests/typecheck, and open a PR linked with Closes #15.

Hermes implementation has started for issue #15. I will work from the saved plan, run tests/typecheck, and open a PR linked with Closes #15.
Author
Owner

Hermes opened PR #16 for review: #16

Hermes opened PR #16 for review: https://forgejo.basa-mimosa.ts.net/pregno/polymarket-screener/pulls/16
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pregno/polymarket-screener#15
No description provided.