feat(releases): replace readiness version dropdown with 3-tier selector - #1521
feat(releases): replace readiness version dropdown with 3-tier selector#1521deekay2310 wants to merge 1 commit into
Conversation
Overhaul the Release Readiness dashboard version filter to use the same family/version/phase selector pattern as the Capacity Commitment report. Families and phases are multi-select (inclusive), version is single-select. Phase tabs allow viewing multiple milestones (EA1, EA2, GA) side by side. Generalizes useReleaseSelector with a fetchReleases option so consumers can provide custom data sources. The readiness dashboard feeds parsed version filenames through this composable instead of the registry API. Closes RHOAIENG-85414 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @deekay2310's task in 3m 43s —— View job PR Review: feat(releases): replace readiness version dropdown with 3-tier selectorRead-only review (fork PR) — no autofixes applied.
Issues Found1. Bug — Double-load on mount (inline comment) 2. Potential correctness issue — Release ID format mismatch (inline comment) 3. OpenAPI annotation incomplete (inline comment) 4. Manual edit in auto-generated file (inline comment)
|
| onMounted(async () => { | ||
| await loadVersions() | ||
| if (versions.value.length > 0) { | ||
| const initial = defaultVersion.value || versions.value[0] | ||
| selectedVersion.value = initial | ||
| await loadMetrics(initial) | ||
| if (data.value && data.value.component_readiness) { | ||
| selectedComponents.value = [...(data.value.component_readiness.all_components || [])] | ||
| } | ||
| await fetchRegistry() | ||
| restoreSelection() | ||
| if (hasSelection.value) { | ||
| await loadSelectedPhases() | ||
| } | ||
| }) |
There was a problem hiding this comment.
Bug: Double-load on mount. restoreSelection() mutates selection, which triggers the watch below (lines 637–645). But the very next line also calls loadSelectedPhases() explicitly. Both run concurrently, doubling API calls and causing a second pass that resets selectedComponents / selectedPhases.
Fix: remove the explicit loadSelectedPhases() from onMounted and let the watcher handle it, or add { flush: 'post' } to the watch and guard with a flag.
| onMounted(async () => { | |
| await loadVersions() | |
| if (versions.value.length > 0) { | |
| const initial = defaultVersion.value || versions.value[0] | |
| selectedVersion.value = initial | |
| await loadMetrics(initial) | |
| if (data.value && data.value.component_readiness) { | |
| selectedComponents.value = [...(data.value.component_readiness.all_components || [])] | |
| } | |
| await fetchRegistry() | |
| restoreSelection() | |
| if (hasSelection.value) { | |
| await loadSelectedPhases() | |
| } | |
| }) | |
| await fetchRegistry() | |
| restoreSelection() |
| .map(f => f.replace('.json', '')); | ||
|
|
||
| const versions = rawNames.map(n => n.replace(/_/g, ' ')); | ||
| const releases = rawNames.map(name => ({ id: name, state: 'active' })); |
There was a problem hiding this comment.
Potential format mismatch: parseReleaseId() expects IDs matching ^([a-z]+)-(\d+\.\d+)(?:\.(ea\d?))?$ (e.g. rhoai-2.20.ea1). Here, release IDs are raw filenames (minus .json). If files were uploaded with display-style version names (e.g. "RHOAI 2.20 EA1"), sanitizeFilename produces RHOAI_2.20_EA1 — which parseReleaseId can't parse, making the 3-tier selector empty.
Please verify the actual filenames on disk match the {family}-{version}[.{phase}] convention, or add a normalization step here (e.g. lowercase + replace underscores with hyphens).
| const defaultVersion = findUpcomingVersion(versions, storage); | ||
|
|
||
| res.json({ versions, default_version: defaultVersion }); | ||
| res.json({ versions, releases, default_version: defaultVersion }); |
There was a problem hiding this comment.
OpenAPI description out of date. The response now includes a releases array alongside versions and default_version. The @openapi annotation (line 40) should be updated to reflect the new field:
description: Object with versions array, releases array, and default_version
| 'releases/reports/tv-fv-delta': 'Dimitri Saridakis', | ||
|
|
||
| // team-tracker > reports | ||
| 'team-tracker/reports/allocation': 'Alex Corvin', |
There was a problem hiding this comment.
Manual edit in auto-generated file. This file's header says "DO NOT EDIT MANUALLY — regenerated by scripts/update-view-owners.js". This entry will be overwritten on the next regeneration. If this is intentional, add the override to data/view-owner-overrides.json instead (which the script merges in).
Also, this change is unrelated to the readiness selector feature — consider splitting it into its own PR.
Summary
useReleaseSelectorwith afetchReleasesoption for custom data sources (backward-compatible — existing Capacity Commitment usage unchanged)Closes RHOAIENG-85414
Changes
useReleaseSelector.jsparseReleaseId, addfetchReleasesoptionrelease-readiness/routes.jsreleasesarray in/versionsresponseuseReleaseReadiness.jsfetchMetricsandfetchReadinessReleasesReleaseReadinessDirector.vueTest plan
useReleaseSelectorchange)npm run build)npm run lint)🤖 Generated with Claude Code