Skip to content

perf: optimize app-wide startup and route loading [6/6] - #194

Draft
Anthony Cintron (prbatero) wants to merge 7 commits into
prbatero/feat/perf-ui-route-loadingfrom
prbatero/feat/perf-app-wide-loading
Draft

perf: optimize app-wide startup and route loading [6/6]#194
Anthony Cintron (prbatero) wants to merge 7 commits into
prbatero/feat/perf-ui-route-loadingfrom
prbatero/feat/perf-app-wide-loading

Conversation

@prbatero

@prbatero Anthony Cintron (prbatero) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Extend the project layer-loading stack with app-wide startup, publishing, map, and route optimizations. This follow-up also resolves observed duplicate loading indicators, slow standard-labeling startup, and route contention from abandoned Dashboard work.

Changes

  • Add a read-only session bootstrap with object-ID-first ACL matching and principal/ACL role intersection.
  • Add bounded Published Datasets caching, ETags, conditional polling, and mutation invalidation.
  • Add GetLabelingWorkspace, returning one allowlisted target layer plus current labels and project labeling configuration.
  • Add cached GetActiveJobs, replacing Dashboard N-way GetProjectDetails fan-out with one compact conditional request.
  • Render Dashboard as soon as required data resolves; load Model Catalog and Ongoing Jobs independently.
  • Propagate AbortSignal through route GETs and abort Dashboard, jobs, and map-owned work on navigation.
  • Suppress route-local loaders while a global blocking action is active, leaving one visible loading surface.
  • Load only each map route’s required Azure Maps capabilities.
  • Add a staged “Preparing your workspace” experience for standard labeling through map ready, drawing setup, AOI fit, and stable idle frame.
  • Dispose failed/abandoned maps safely and delay guided tours until readiness.
  • Harden Interactive Labeler metadata/artifact cancellation and retry isolation.
  • Extend the route matrix for staged labeling readiness and expected navigation aborts.

Testing

  • Core library: 614 passed.
  • HTTP API: 79 passed.
  • Queue Functions: 6 passed.
  • UI: 161 passed.
  • Production Vite build: 2,423 modules in 399 ms.
  • Black, isort, and Flake8 passed for five follow-up Python files.
  • ESLint passed for 26 changed/new UI files.
  • Route benchmark syntax and navigation-abort tests passed.
  • VS Code diagnostics, Markdown links/tables/anchors, git diff --check, and feature-only detect-secrets passed.

Browser Evidence

  • With Model Catalog and Active Jobs delayed by two seconds, Dashboard displayed one spinner and navigation to Help completed in 38 ms; both abandoned requests were aborted.
  • With invalid local Azure Maps credentials, standard labeling displayed one persistent retry surface, no duplicate/global loader, no premature tour, and no application lifecycle exception.

Stack

Open Gates

  • Do not deploy the session-bootstrap path while the Function endpoint accepts public traffic and trusts x-ms-client-principal. Restrict ingress to trusted SWA/APIM traffic or validate signed identity first.
  • Successful real-credential Azure Maps loading and the authenticated desktop/mobile Dev1 route matrix remain unexecuted.
  • The one-to-three-second production route target is therefore not yet claimed as achieved.
  • ADR-0005 remains proposed and rollout remains blocked until these gates close.

Document the startup, publishing, map-loading, and route performance contract. Keep deployment gated on trusted Function ingress and authenticated Dev1 measurements.
Replace stable startup reconciliation with a read-only ACL bootstrap, enforce strong principal binding, and restrict legacy user reads. Add bounded single-flight Published Datasets caching with ETags and mutation invalidation.
Bootstrap sessions in one request, overlap independent route data and Azure Maps assets, and add retryable loading states. Deduplicate Published Datasets polling and cancel sibling artifact transfers on failure.
Measure cold and warm direct and in-app navigation across desktop and mobile profiles. Fail on readiness, browser, API, or p95 budget violations while keeping auth state and fixture details out of results.
Add allowlisted Labeling Workspace reads and compact cached Active Jobs responses with ACL authorization, direct label lookup, ETags, bounded concurrency, and legacy fallback coverage.
Render Dashboard independently of optional work, replace project fan-out with conditional Active Jobs polling, and abort route-owned requests. Add one staged standard-labeling workspace through AOI map readiness with capability-specific Maps assets and safe retry cleanup.
Extend the app-wide performance contract for owned loading state, Labeling Workspace, and Active Jobs. Measure staged labeling shell readiness separately and treat only expected navigation aborts as non-failures.
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