← Back to Pull requests

SOLR-17887: Add a reusable FileTree component to the new Admin UI #5256

Open
unknown opened this pull request with 614 lines diff across 7 files
View on GitHub
unknown unknown commented on Oct 28, 2026 05:03 UTC
Author

🤖 AI text below 🤖 (reviewed by Nick Shanin)

Ready for review, but held as a draft due to the project's open-PR cap; I'll mark it open on request.

https://issues.apache.org/jira/browse/SOLR-17887

What happens today

ui/shared has no composable that shows a folder hierarchy. No FileTree file exists under ui/ at the merge-base c8ab71430f. A screen that needs nested, expandable folders has to build one from scratch.

What this change does

A reusable FileTree composable adds nested folders with expand, collapse, and selection. Folders open and close from the chevron or a double click on the folder name. A click or double click on any row selects that row, and the component keeps the selection. A single click calls onItemClick, and a double click calls onItemDoubleClick. The selectedPath input sets the starting selection, and a later change to it replaces the selection. The selected row and its file icon use the app's selected colors. The expanded state stays inside the component. The data model, FileTreeNode with FileTreeFile and FileTreeFolder, has no API dependency.

Behavior change, stated openly: a single click reports after the platform double-click window, because combinedClickable must wait to tell a single click from a double click. Selection and onItemClick both wait for that window.

Christos Malliaridis scoped this ticket and asked for the PR in his Jira comment. He said he will review it.

Proof

The new tests check selection, but the component is new, so they cannot fail on the base. The proof is inconclusive by construction. The click-selection test fails when the selection update is removed from the click handler.

FileTreeTest passes 8 of 8 on the JVM and 8 of 8 in the browser wasm run, verified 2026-10-27 at head 025164fb, with a fresh run and no build cache.

The full ./gradlew -p ui check passes at the same head: JVM tests 55 run, 0 failures, 2 skipped; browser wasm tests 59 run, 0 failures, 3 skipped; spotless passes.

A screen check renders the component inside the app theme and compares it with the design's file tree frames (Configsets Files and Cluster Zookeeper Files). The structure matches: chevron before the folder icon, indented children, and file rows. The selected row is close to the design's color but a little darker: sampled #ED937E in the render and #FE9E85 in the design. The selected file icon is dark red in both: #511104 in the render and #550000 in the design. The unselected file icon is gray in the design, and the component uses the theme's text color. The thumbnails are too small to confirm that gray, so it is not claimed as matched.

Screenshots

Headless Chromium 156, production FileTree inside SolrTheme (light theme), 1024x768, fixture states. Icons load asynchronously on wasm, so the captures wait for them. Hosted in a secret gist.

| Collapsed | Folder expanded, file selected |
| --- | --- |
| !Collapsed | !Expanded and selected |

Limits

  • A chevron click toggles the folder and does not select it. Selection comes from a click on the row, outside the chevron. Selecting the folder from its chevron is a possible follow-up.

  • The screen check is an offscreen render on the JVM with the software renderer, not a run in the app. Colors come from design thumbnails, so they are approximate.

  • The unselected file icon color is not confirmed against the design.

  • Nothing in the app uses FileTree yet. Christos asked that the components that use it come in later tickets. This PR adds no integration. A follow-up ticket for that is Christos's to create, and I can open a PR for it on request.

  • Out of scope per the ticket: right-click menus, search, and the file viewer (SOLR-17911, separate branch).
  • Changelog: changelog/unreleased/SOLR-17887.yml

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

    Diff: 614 lines (+460 / -154) across 7 files Reviewer: nick-boss-tech Review duration: 43479m
    All Vouch review confidence checks passed
    Residual risk 0.29 = Change Risk (0.50) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 614 lines diff across 7 files
    0.50
    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%
    42%
    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.384
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #5256"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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: 50.2% (MEDIUM) · Higher = larger blast radius
    50.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: 43.0% · Lower = rushed or shallow review
    43.0%
    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: 28.6% · Safe to merge
    28.6%
    Repository