Show new display_name parameter#384
Conversation
|
Warning Review limit reached
More reviews will be available in 10 minutes and 6 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR updates the OpenAPI spec and generated Changesdisplay_name Adoption and API Endpoint Expansion
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/components/analysis/AnalysesTable.vue`:
- Around line 135-137: The `display_name` field is nullable in the API but the
code assumes it is always populated, causing incomplete data mapping and blank
UI labels. In app/components/analysis/AnalysesTable.vue (lines 135-137), replace
the conditional check with a fallback that uses `display_name ?? name ?? id`
when adding to projMap, and ensure the project fields query includes both
`display_name` and `name`. In app/components/projects/ProjectProposalTable.vue
(lines 97-122), apply the same fallback pattern `project.display_name ??
project.name` when filtering and rendering project names to avoid blank labels
and search misses. In
app/components/data-stores/create/DataStoreProjectInitializer.vue (lines 41-43),
map the select option label using the fallback `proj.project?.display_name ??
proj.project?.name ?? proj.project_id` to prevent empty project options in the
dropdown.
In `@app/services/hub_adapter_swagger.json`:
- Around line 1183-1235: In the hub_adapter_swagger.json file for the
/analysis-nodes/{analysis_node_id} endpoint, remove the "page" and "sort" query
parameter definitions since these parameters only apply to list endpoints that
return multiple resources, not single-resource endpoints. Keep the "fields"
parameter since it remains relevant for selecting which fields to include in the
response for a single AnalysisNode resource.
- Around line 3941-3951: The `display_name` field is defined as nullable
(allowing both string and null types) across multiple schema definitions in the
swagger.json file, but since UI labels now depend on this field, it can render
blank names. Either remove the null type from the anyOf definition for
`display_name` at lines 3941-3951 (anchor), 4200-4204 (Analysis), 5186-5196
(DetailedAnalysis), 5452-5456 (Project), 7106-7116, and 7181-7186 to make it a
required non-null string, or ensure the API contract guarantees display_name is
always populated from the name field when not explicitly provided. If going the
non-null route, update all six occurrences to keep only the string type and
remove the null option from the anyOf array.
- Around line 702-718: The fields query parameter is advertised in the Swagger
specification, but the corresponding 200 response schemas still define complete
required objects, creating a contract mismatch when sparse responses are
returned. For all affected endpoints (at lines 702-718, 720-731, 869-885,
887-898, 1103-1119, 1121-1132, 1381-1397, 1399-1410, 1607-1623, and 1625-1636 in
app/services/hub_adapter_swagger.json), either remove the fields parameter
definition entirely from the query parameters, or define separate response
schemas that represent the partial/sparse object structures that can be returned
when fields are specified, ensuring the TypeScript types generated from the
schema accurately reflect what the endpoint actually returns.
- Around line 664-719: The page parameter in the list endpoints (/projects,
/project-nodes, /analysis-nodes, /analyses, /nodes) lacks bounds documentation
to prevent unbounded queries. For each of these five endpoints, add either a
maxItems constraint to the response array schema or enhance the page parameter
description to document the backend's default maximum page size. The current
parameter description example shows a limit of 50, so consider either
documenting that as the enforced maximum or adding maxItems: 50 (or appropriate
limit) to the response schema's array items to make the constraint explicit in
the API specification.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 524c62e2-b7a0-41d7-9401-58c9d3e12453
📒 Files selected for processing (12)
app/components/analysis/AnalysesTable.vueapp/components/data-stores/DataStoreList.vueapp/components/data-stores/create/DataStoreProjectInitializer.vueapp/components/projects/ProjectProposalTable.vueapp/composables/useDataStoreList.tsapp/services/Api.tsapp/services/hub_adapter_swagger.jsontest/components/analysis/AnalysisTable.spec.tstest/components/analysis/constants.tstest/components/data-stores/create/DataStoreProjectInitializer.spec.tstest/components/projects/constants.tstest/composables/useDataStoreList.test.ts
Summary by CodeRabbit
New Features
Refactor