Skip to content

Conversation

@greatgitsby
Copy link
Contributor

@greatgitsby greatgitsby commented Apr 9, 2025

like commaai/connect#514, but for every critical path network request

the only things that get fetched on-demand are:

  1. map coordinates
  2. qcam stream URL

(only fetched once, then cached for as long as the page is open)

everything else is loaded from Dashboard or RouteList initial load

not meant to merge as it needs lots of polish and can be done in less lines, this is for demo purposes only

Screen.Recording.2025-04-08.at.10.53.07.PM.mov

notes:

  1. we could technically optimistically fetch more data (see docs), but it might add too much up front network pressure

@greatgitsby greatgitsby changed the title refactor: tanstack in critical path demo: tanstack in critical path Apr 9, 2025
@github-actions
Copy link

github-actions bot commented Apr 9, 2025

Changes:

path lines diff
./pages/dashboard/activities/RouteActivity.tsx 124 +33
./App.browser.test.tsx 60 +20
./components/RouteStaticMap.tsx 84 +17
./api/query-client.ts 18 +9
./pages/dashboard/Dashboard.tsx 167 +8
./components/RouteVideoPlayer.tsx 194 +6
./components/RouteActions.tsx 129 +6
./pages/dashboard/activities/DeviceActivity.tsx 156 +1
./pages/dashboard/components/RouteList.tsx 151 -7

Total lines: 4571 (+93)

@github-actions
Copy link

github-actions bot commented Apr 9, 2025

deployed preview: https://539.connect-d5y.pages.dev

Welcome to connect! Make sure to:

  • read the contributing guidelines
  • mark your PR as a draft until it's ready to review
  • post the preview on Discord; feedback from users will speedup the PR review

Mobile

Desktop

@greatgitsby greatgitsby changed the title demo: tanstack in critical path demo(speed): tanstack in critical path Apr 9, 2025
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.

1 participant