[JUM-908][Fix] Dashboard resolves organization ids to names - #543
Merged
web2solutions merged 3 commits intoSep 27, 2026
Merged
Conversation
JUM-908. DashboardView printed the raw organization UUID on the "My organization" card and in the "Users by Organization" chart bucket labels; X-CRUD already resolved x-relation ids to names for its grid but the dashboard never reused that lookup. relationLabels.ts extracts the shared resolver (used by useXCrud and loadMetrics groupBy buckets alike), skips the network read when the caller's role lacks the target list operation's scope, and falls back to the raw id whenever the relation can't be read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_00835204-de49-4053-84d3-d68b356cb5fd) |
…hboard-organization-names
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_ed424228-69a2-4bf9-a23c-659a2a21ef34) |
…hboard-organization-names
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_c6d1b9ea-d763-45a9-9e9f-83673f8f7aa0) |
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.
Summary
/#/m/users/dashboardshowed the raw organization UUID instead of its name.useXCrud) into a sharedrelationLabels.ts, and reuses it for the dashboard card and forloadMetrics' groupBy chart buckets.Test plan
bun run test(apps/frontend) — 314 passed, 0 failed, 3 consecutive runsbun run typecheck(apps/frontend) — cleanbun run lint(apps/frontend) — 0 errors (5 pre-existing unrelated warnings)bun run build(apps/frontend) — cleanbun run cli:build-templates— packaged CLI frontend seed resyncedNotes
loadMetrics's new groupBy-label wiring threw on non-OAS schema names and made an unguarded network call regardless of RBAC, which leaked async state across the frontend's shared bun:test process and broke 14 unrelated tests (auth/router/profile stores). Both are now guarded (relationFornever throws; the network read is skipped when the caller's role lacks the target list operation's scope).CommercialPages.a11y.test.tsx) found while pushing a sibling branch — not fixed here, out of scope for this change.🤖 Generated with Claude Code
Note
Low Risk
Display-layer changes with defensive RBAC and empty-map fallbacks; no auth or persistence logic changes beyond reusing existing list operations for labels.
Overview
Dashboard and charts now show human-readable names for
x-relationforeign keys instead of raw IDs (JUM-908).A shared
relationLabelsmodule centralizes resolving FK values via the target entity’s list operation (Cana offline or API), with RBAC checks before network reads and safe fallbacks to the raw id when resolution fails. X-Crud’s inline FK labeling is replaced by this helper; dashboard metricsgroupByon relation fields attach optionallabelon buckets;ChartCardrenderslabel ?? key; and the “My organization” card resolves the profile’s organization id to its display name.MetricsBucketgains an optionallabelfield, with a unit test for offline groupBy labeling. CLI init templates are resynced to match.Reviewed by Cursor Bugbot for commit b4da171. Bugbot is set up for automated code reviews on this repo. Configure here.