Skip to content

Performance improvements#149

Merged
MaciejTe merged 13 commits into
developfrom
fix/performance-improvements
Jun 1, 2026
Merged

Performance improvements#149
MaciejTe merged 13 commits into
developfrom
fix/performance-improvements

Conversation

@MaciejTe
Copy link
Copy Markdown
Collaborator

PR type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other... Please describe:

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR focuses on reducing user-perceived latency in the web app (route chunk preloading + loader cache revalidation), improving operational safety of MongoDB migrations under concurrent startup, and enabling additional compression/caching in the delivery stack. It also removes the queries field/metrics plumbing from the Account model across backend + generated clients.

Changes:

  • Add preloadable lazy routes and wire hover/focus/touch preloading into navigation components.
  • Make protected-route loaders return Zustand-cached data on warm navigations and revalidate in the background.
  • Improve MongoDB migration locking/observability (advisory lock + TTL cleanup + better dirty/locked error surfacing) and add HTTP compression/caching changes.

Reviewed changes

Copilot reviewed 18 out of 21 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/moddns_client/moddns/models/model_subscription.py Add legacy type field to subscription model for backward compatibility.
tests/moddns_client/moddns/models/model_account.py Remove queries from generated test client model.
libs/store/migrator/migrator.go Add advisory locking, TTL index for lock cleanup, improved migrate logging and error handling.
app/src/pages/navigation_menu/NavigationMenu.tsx Trigger route chunk preloading on hover/focus/touch for nav items.
app/src/lib/lazyWithRetry.ts Add preload() support and in-flight promise memoization for lazy imports.
app/src/components/navigation/BottomNav.tsx Trigger route chunk preloading on hover/focus/touch for bottom nav.
app/src/App.tsx Add routePreload map, background store revalidation for warm navigations, and export preloader map.
app/src/api/client/api.ts Remove queries from generated TS API model.
app/nginx.conf Enable gzip and add long-lived caching for content-hashed static assets.
api/service/service.go Remove GetAccountMetrics from AccountServicer interface.
api/service/account/service_test.go Remove GetAccountMetrics tests/mocks from account service tests.
api/service/account/account.go Stop populating account Queries and remove GetAccountMetrics implementation.
api/model/account.go Remove Queries field and related limit/helper.
api/mocks/servicer.go Remove mocked GetAccountMetrics method.
api/mocks/account_servicer.go Remove mocked GetAccountMetrics method.
api/docs/swagger.yaml Remove queries from swagger model definition.
api/docs/swagger.json Remove queries from generated swagger JSON.
api/docs/docs.go Remove queries from embedded swagger docs template.
api/db/mongodb/migrations/018_profiles_account_id_index.up.json Add index on profiles.account_id.
api/db/mongodb/migrations/018_profiles_account_id_index.down.json Drop index on profiles.account_id.
api/api/server.go Enable Fiber compression middleware for API responses.
Files not reviewed (3)
  • api/docs/docs.go: Language not supported
  • api/mocks/account_servicer.go: Language not supported
  • api/mocks/servicer.go: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/lib/lazyWithRetry.ts Outdated
Comment thread app/src/App.tsx
Comment thread app/nginx.conf Outdated
Comment thread app/src/api/client/api.ts
MaciejTe added 11 commits June 1, 2026 10:22
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
…ory)

Signed-off-by: Maciek <tomczukmaciej@gmail.com>
@MaciejTe MaciejTe force-pushed the fix/performance-improvements branch from b5cb59d to e6e5116 Compare June 1, 2026 11:06
@MaciejTe MaciejTe requested a review from Copilot June 1, 2026 11:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 25 changed files in this pull request and generated 4 comments.

Files not reviewed (3)
  • api/docs/docs.go: Language not supported
  • api/mocks/account_servicer.go: Language not supported
  • api/mocks/servicer.go: Language not supported

Comment thread tests/moddns_client/moddns/models/model_account.py
Comment thread app/src/App.tsx
Comment thread scripts/validate-nginx.sh Outdated
Comment thread .github/workflows/nginx.yml Outdated
MaciejTe added 2 commits June 1, 2026 13:29
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Signed-off-by: Maciek <tomczukmaciej@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 25 changed files in this pull request and generated 1 comment.

Files not reviewed (3)
  • api/docs/docs.go: Language not supported
  • api/mocks/account_servicer.go: Language not supported
  • api/mocks/servicer.go: Language not supported

Comment thread tests/moddns_client/moddns/models/model_account.py
@MaciejTe MaciejTe merged commit 9161eb2 into develop Jun 1, 2026
11 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.

2 participants