Skip to content

fix: address Copilot review comments from PR #180#182

Merged
berntpopp merged 1 commit intomasterfrom
fix/copilot-review-pr180
Feb 10, 2026
Merged

fix: address Copilot review comments from PR #180#182
berntpopp merged 1 commit intomasterfrom
fix/copilot-review-pr180

Conversation

@berntpopp
Copy link
Owner

Summary

  • useToast: Replace unsafe as string type assertions with typeof guards; silently skip __handled401 errors to prevent duplicate toasts after 401 redirect
  • ReloadPrompt: Store interval ID and clear on onUnmounted; add navigator.onLine / registration.installing guards and try/catch per vite-plugin-pwa best practices
  • axios interceptor: Replace never-resolving new Promise(() => {}) with a marked Promise.reject() so .finally() cleanup blocks still run
  • vite proxy: Only set Host: localhost header when using the default Traefik target; skip when VITE_API_URL is set
  • annotation_dates endpoint: Fetch get_job_history(100) once instead of 3x per request; sort by completed_at desc instead of relying on submitted_at order

Test plan

  • TypeScript type-check passes (vue-tsc --noEmit)
  • ESLint clean
  • Prettier formatted
  • 230/230 Vitest unit tests pass
  • Manual: verify 401 redirect still works and no duplicate toasts appear
  • Manual: verify annotation dates endpoint returns correct timestamps

- useToast: replace unsafe `as string` casts with typeof guards, skip
  __handled401 errors to prevent duplicate toasts
- ReloadPrompt: clean up setInterval on unmount, add network/installing
  guards and try/catch per vite-plugin-pwa best practices
- axios: replace never-resolving promise with marked rejection so
  .finally() cleanup blocks still run
- vite proxy: only set Host:localhost header when using default Traefik
  target, skip when VITE_API_URL overrides it
- annotation_dates: fetch job history once instead of 3x, sort by
  completed_at desc instead of submitted_at
@berntpopp berntpopp merged commit b031c13 into master Feb 10, 2026
6 checks passed
@berntpopp berntpopp deleted the fix/copilot-review-pr180 branch February 10, 2026 08:01
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

Comments