← Back to Pull requests

Feat(RHOAIENG-102984): added ups UI changes #10788

Closed
unknown closed this pull request without merging on Nov 24, 2026 21:49 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 16:50 UTC
Author

Closes RHOAIENG-102984

Problem

The Unified Project Selector did not provide a consistent flow when no projects were available. In the normal project-listing flow, users could be taken directly into project creation instead of first seeing the selector and choosing how to proceed. The selector also had to preserve the existing xKS/manual project behavior, including manually adding and validating projects when namespace listing is unavailable.

The selector footer and empty-state logic had also become difficult to maintain, and several tests no longer accurately represented the expected interaction flow.

Solution

Update the Unified Project Selector empty-project experience so that the selector is shown first and users can choose the next action:

  • Display the empty-project state inside the Unified Project Selector.

  • Add a Create project action that closes the selector before opening the project creation modal.

  • Add an optional Cancel action for empty states rendered inside the selector.

  • Ensure the Create project button displays the correct user-facing label and invokes the creation callback.

  • Highlight the newly created project when the selector reopens for review.

  • Enable Select for the project being reviewed after creation.

  • Keep Select disabled during a normal selector open until the user explicitly selects a project.

  • Prevent duplicate project-created notifications.

  • Preserve selector dismissal and review-state cleanup behavior.
  • Preserve xKS/manual project support:

  • Continue handling ListingUnavailable.

  • Preserve the manual project fallback flow.

  • Preserve the Add project action and project validation behavior.

  • Preserve the manual empty state, project lookup messaging, and Cancel behavior.

  • Preserve the existing populated xKS/manual selector behavior, including project descriptions, project identity display, filtering, and selection feedback.
  • Refactor the selector implementation to improve maintainability:

  • Extracted the selector footer into an internal WorkingProjectSelectorFooter component and empty-state rendering into an internal ProjectSelectorEmptyState component.

  • Add the selector-specific help content sticky header, selection column, empty-state illustration, project-count badge, and filter controls.
  • Update test coverage for the revised behavior:

  • Normal selector opening and selection.

  • Empty-project creation flow.

  • Selector closing before project creation.

  • Create project button label and callback behavior.

  • Optional Cancel callback behavior in EmptyProjects.

  • Select button disabled/enabled states.

  • Project review after creation.

  • Selection state preservation when the project list refreshes.

  • xKS/manual project listing, lookup, validation, retry, and dismissal flows.

  • Add Project modal timing and actions.

  • Isolated scrollIntoView mocking.

  • Removal of the unsupported aria-checked assertion.
  • <img width="2666" height="1378" alt="image" src="https://github.com/user-attachments/assets/dc99eade-7bdd-4da1-a3af-1262b8d276ea" />

    https://github.com/user-attachments/assets/59352fc2-0b9b-459f-b28a-1bc06f6aa08c

    <img width="2477" height="1599" alt="image" src="https://github.com/user-attachments/assets/208de41c-df7a-4795-9a21-82a956f3e159" />

    Evidence

    The focused Unified Project Selector test suite passes:

    ```text
    Test Suites: 1 passed, 1 total
    Tests: 32 passed, 32 total

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Added project review mode that opens the selector with a newly created project highlighted.
    Added clearer empty states, contextual help, project counts, and project-creation options in the selector.
    Added Create project and Cancel actions to the empty-project screen when available.

    Bug Fixes
    Creating a project now shows a single success notification without automatically selecting it or displaying the previous working-project update notification.
    * Improved project-list scrolling and kept the available-project header visible while browsing.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 535 lines (+401 / -134) across 6 files Reviewer: lucferbux Review duration: 8939m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 535 lines diff across 6 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.376
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #10788"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.9% (MEDIUM) · Higher = larger blast radius
    47.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.9% · Safe to merge
    18.9%