Repository navigation
Leave tdeiMetadata and kartaViewToken out of GET /workspaces/mine - #159
Merged
Merged
Conversation
For a workspace created from a TDEI dataset, tdeiMetadata is the whole
dataset record, so it made the list large; the dashboard now fetches it
for the selected workspace from GET /workspaces/{id}. kartaViewToken was
sent to every member of the project group; no client reads it from the
list. The always-null longFormQuestDef and imageryListDef go too.
/mine now uses WorkspaceSummaryResponse; WorkspaceResponse extends it for
the single-workspace GET, which still sends all four. The list query no
longer loads tdeiMetadata.
Deploy after the frontend change that reads tdeiMetadata per workspace.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This was referenced Oct 28, 2026
jeffmaki
added a commit
to TaskarCenterAtUW/workspaces-frontend
that referenced
this pull request
Oct 28, 2026
The dashboard read `tdeiMetadata` from `GET /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:** - A new `services/workspace-metadata.ts` fetches a workspace's `tdeiMetadata` through `GET /workspaces/{id}`. It caches per workspace, so the map and the info panel share one request, and doesn't cache failures. - The dashboard clears the cache in setup and on refresh, so changes from an export show up. It clears in setup rather than `onMounted` because the child components start loading before the page's `onMounted` runs. - `components/dashboard/Map.vue` fetches the metadata alongside the bbox and still draws once. If the metadata request fails, it outlines the bbox as before. - `components/dashboard/WorkspaceInformation.vue` loads the metadata for the selected workspace (dataset version, dataset area) and ignores stale answers. Nothing else reads `tdeiMetadata` from `/mine`: the merge and export pages already load their workspace with `getWorkspace(id)`. This works with both the current and the new backend, so it can deploy any time. **Testing:** - Unit tests (680, including 4 new ones for the cache), lint and `nuxt typecheck` pass. - `dashboard.spec.ts`: `/mine` mocks now omit `tdeiMetadata`, as the new backend will, and serve it from `GET /workspaces/{id}`. The dataset-version test now passes only through that route. 14 passed, 6 skipped (the existing `test.fixme` placeholders). - Full e2e suite: 178 passed. Four unrelated tests (TDEI export, review deep links, team join) failed in the full run but pass when run alone, both here and on `develop`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary - Fetch TDEI metadata for the selected workspace through `GET /workspaces/{id}` instead of relying on metadata in `GET /workspaces/mine`. - Cache metadata requests by workspace ID so the map and information panel can share a request. Failed requests are not cached, and the dashboard clears the cache on setup and refresh. - Load metadata alongside the map’s bounding-box request. If metadata loading fails, use the bounding box for the outline. - Load the selected workspace’s dataset version and area asynchronously. Clear stale values when the workspace changes and ignore responses for an outdated selection. - Update dashboard tests to provide metadata in individual workspace responses. Add unit tests for request reuse, retry after failure, and cache clearing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This was referenced Nov 2, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Merge only after TaskarCenterAtUW/workspaces-frontend#176 is deployed. Until then, the dashboard reads
tdeiMetadatafrom/mine; without it, the dashboard map loses dataset areas and the info panel loses the dataset version.Stacked on #158, so this diff shows only its own change. Once #158 is squash-merged, rebase this onto
developand retarget it there.What changes:
/minenow returns a newWorkspaceSummaryResponse, which leaves out:tdeiMetadata: for a workspace created from a TDEI dataset, it's the whole dataset record, area polygon included, and was most of the list's size.kartaViewToken: it was sent to every member of the workspace's project group, and no client reads it from the list.longFormQuestDefandimageryListDef: alwaysnullin the list; they're filled only by the single-workspace GET.WorkspaceResponsenow extendsWorkspaceSummaryResponse, soGET /workspaces/{id}still sends all four fields.tdeiMetadatacolumn.Clients checked:
tdeiMetadatafromGET /workspaces/{id}. It never readskartaViewToken.aviv-dev-latest): its list model has none of these fields and usesignoreUnknownKeys. It readskartaViewTokenandtdeiMetadatafrom the per-workspace endpoint, which is unchanged.dev): decodesimageryListDefandlongFormQuestDefwithdecodeIfPresent, and reads their real values from the per-workspace GET.App versions already installed on phones may be older than these branches, but the fields their list models require (
id,title,externalAppAccess) are all still sent.Tests: a new integration test checks that
/mineitems lack all four fields whileGET /1still returns them with their values. The list-query unit test now also checks thattdeiMetadataisn't selected../scripts/ci.shpasses.🤖 Generated with Claude Code