← Back to Pull requests

SOLR-16398: Fix Admin UI collection selector refresh #5282

Open
unknown opened this pull request with 433 lines diff across 5 files
View on GitHub
unknown unknown commented on Nov 03, 2026 16:02 UTC
Author

🤖 AI text below 🤖 (reviewed by Nick Shanin)

Jira: https://issues.apache.org/jira/browse/SOLR-16398

Follow-up to the split-shard UI findings.

What happens today

Navigation refreshes can clear the collection selection too early or display state from an older route.

At the pre-change base, resetMenu clears the model before the collection and alias requests finish. Older requests can also complete after a newer navigation and overwrite its menu. Alias overview copies that model once, before loading completes, so its details can remain empty or stale. These paths predate the split-shard migration.

What this change does

Only the latest refresh updates the menu, and alias details follow the requested alias.

  • Preserve the collection selection and options until both requests succeed, then publish the rebuilt lists and matching selection together. A successful root-page or no-match refresh clears the selection. A current list/alias failure preserves the old selection and reports the error.

  • Ignore obsolete core, system, collection and alias callbacks. Starting another refresh or changing routes invalidates pending callbacks.

  • Update alias overview when the refreshed model changes, accepting only an alias matching its route and clearing the view when it disappears.

  • Keep the empty-input guard inside showCollection, protecting every call to the handler.
  • Implementation: menu refresh and alias overview.

    Proof

    JavaScript syntax checks pass; Linux behavioral and build verification is pending.

    <details>
    <summary>Verification at 200ff5e5c6c214212f72f37485487f3092e05541</summary>

    On Windows, Node v22.17.0 parses both changed production JavaScript files and all five embedded Selenium script blocks. Scoped git diff --check passes.

    AdminUiMenuRefreshTest adds nine tests using the bundled Angular/Chosen code, production selector attributes, actual alias template and controlled API callback ordering.

    Linux execution of those tests, the two neighboring collection-screen suites, tidy, the webapp check and root check -x test is pending. Fail-before comparisons against the original production JavaScript are also pending. No passing browser or build result is claimed for this head yet.

    </details>

    Limits

    This changes legacy UI navigation and display; no collection API migration behavior changes.

    The tests use controlled callback ordering. Direct empty-handler coverage does not establish that deleting a model automatically fires ng-change on every page load.

    Changelog: SOLR-16398-admin-ui-showcollection.yml.

    AI-generated description. Nick Shanin directed the work and takes responsibility for this contribution.

    Diff: 433 lines (+324 / -109) across 5 files Reviewer: nick-boss-tech Review duration: 34180m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.45) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 433 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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.363
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #5282"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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.2% (MEDIUM) · Higher = larger blast radius
    45.2%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 24.1% · Safe to merge
    24.1%
    Repository