← Back to Pull requests

[RHAII/xKS] Add AI project filtering and auto-dismiss selector notifications #10780

Closed
unknown closed this pull request without merging on Nov 23, 2026 08:32 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 08:05 UTC
Author

Fixes: https://redhat.atlassian.net/browse/RHAI-49785

Problem

The RHAII/xKS masthead project selector does not expose the shared AI-project filter or badges because the namespace adapter drops the Core BFF's isAiProject classification. Users cannot distinguish AI projects from other accessible namespaces in the selector.

In the manual namespace fallback, the "Working project updated" and "Project added" notifications remain visible until manually dismissed instead of expiring like RHOAI notifications.

Solution


<img width="1508" height="710" alt="xks-pr" src="https://github.com/user-attachments/assets/c1390ad3-8a2e-4717-a27b-eaab208290b3" />

https://github.com/user-attachments/assets/da3778f8-ecb2-4f81-9234-36d19e25647d

  • Preserve AI-project classification from namespace list and exact-name lookup responses. Only boolean true maps to the dashboard-resource label used by the existing classifier; display-name annotations and phase validation remain intact.

  • Supply the existing shared selector's AI classifier and a compact PatternFly AI label. Default to "AI projects only" while retaining "All projects" so non-AI namespaces remain selectable.

  • Use PatternFly's built-in eight-second toast timeout and clear notification state on expiry. Keep manual close and hover/focus handling, and key each notification by its type and project so a different project's notification receives a fresh timer.

  • Cover classification, filtering, empty-filter recovery, selection, notification expiry, replacement timers, and hover/focus behavior with automated tests.
  • This change does not alter namespace authorization, BFF API contracts, the UPS feature gate, Model Serving page/route integration, or deployment wizard behavior. Existing manual lookup remains in place. No temporary proxy, Tilt configuration, Dockerfile changes, or feature-flag overrides are included.

    Evidence

  • RHAII: 127 tests pass across 10 suites.

  • Shared project selector: 32 tests pass, including fake-timer checks at the eight-second boundary, replacement notifications, and hover/focus retention.

  • Type-checking passes for both affected workspaces.

  • ESLint passes for all six changed files; it prints the existing TypeScript/parser compatibility warning.
  • Pending visual verification

    This PR remains a draft because browser visual verification and screenshots/video are not yet available. No browser automation MCP is connected. Automated tests are not claimed as visual proof or restricted-user RBAC evidence.

    To verify manually with UPS enabled in RHAII/xKS:

    1. With both AI and non-AI namespaces available, open the masthead selector. Confirm "AI projects only" is selected, only AI projects appear, and AI badges render. Switch to "All projects" and select a non-AI namespace. Check the zero-AI-project empty state is recoverable through "All projects".
    2. In listing-unavailable mode, search for and add an accessible namespace by exact resource name. Confirm first-add selection and both notifications; add another namespace and confirm the current selection remains unchanged.
    3. Confirm the notifications disappear after eight seconds without interaction, remain visible while hovered or keyboard-focused, and can still be closed manually. Trigger another project's notification before expiry and verify its timer starts afresh.
    4. Confirm invalid lookup results cannot be added and the UPS-disabled configuration retains its existing behavior.

    Use authenticated restricted-identity testing separately for authorization verification; a simulated listing 403 is only a UI-fallback check.

    Diff: 455 lines (+341 / -114) across 5 files Reviewer: jenny-s51 Review duration: 7226m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 455 lines diff across 5 files
    0.45
    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.366
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #10780"
    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: 45.5% (MEDIUM) · Higher = larger blast radius
    45.5%
    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.0% · Safe to merge
    18.0%