Repository navigation
Fetch the selected workspace's TDEI metadata on the dashboard - #176
Conversation
The dashboard read tdeiMetadata from GET /workspaces/mine, which sends it
for every workspace. For one created from a TDEI dataset it is the whole
dataset record, so it made the list large. The map and information panel
now get it for the selected workspace from GET /workspaces/{id}, through a
small per-workspace cache so they share one request. The map fetches it
alongside the bbox and falls back to the bbox outline if it fails.
This lets the backend drop tdeiMetadata from /mine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
Brings the Sentry changes to Stage, so Stage reports under `environment: stage` and drops local-dev and network noise, plus a dashboard fix. Includes: - #176 Fetch the selected workspace's TDEI metadata on the dashboard - #177 Report mostly real production defects to Sentry After it deploys, `window.__NUXT__.config.public.sentryEnvironment` on the Stage site should read `stage`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The dashboard read
tdeiMetadatafromGET /workspaces/mine, which sends it for every workspace. For a workspace created from a TDEI dataset, that field is the whole dataset record, including the area polygon, so it was most of the list's size. The backend wants to drop it from/mine(TaskarCenterAtUW/workspaces-backend#159); this change has to ship first.What changes:
services/workspace-metadata.tsfetches a workspace'stdeiMetadatathroughGET /workspaces/{id}. It caches per workspace, so the map and the info panel share one request, and doesn't cache failures.onMountedbecause the child components start loading before the page'sonMountedruns.components/dashboard/Map.vuefetches the metadata alongside the bbox and still draws once. If the metadata request fails, it outlines the bbox as before.components/dashboard/WorkspaceInformation.vueloads the metadata for the selected workspace (dataset version, dataset area) and ignores stale answers.Nothing else reads
tdeiMetadatafrom/mine: the merge and export pages already load their workspace withgetWorkspace(id).This works with both the current and the new backend, so it can deploy any time.
Testing:
nuxt typecheckpass.dashboard.spec.ts:/minemocks now omittdeiMetadata, as the new backend will, and serve it fromGET /workspaces/{id}. The dataset-version test now passes only through that route. 14 passed, 6 skipped (the existingtest.fixmeplaceholders).develop.🤖 Generated with Claude Code
Summary
GET /workspaces/{id}instead of relying on metadata inGET /workspaces/mine.