SOLR-17887: Add a reusable FileTree component to the new Admin UI #5256
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
nick-boss-tech
🤖 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/sharedhas no composable that shows a folder hierarchy. NoFileTreefile exists underui/at the merge-basec8ab71430f. A screen that needs nested, expandable folders has to build one from scratch.What this change does
A reusable
FileTreecomposable 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 callsonItemClick, and a double click callsonItemDoubleClick. TheselectedPathinput 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,FileTreeNodewithFileTreeFileandFileTreeFolder, has no API dependency.Behavior change, stated openly: a single click reports after the platform double-click window, because
combinedClickablemust wait to tell a single click from a double click. Selection andonItemClickboth 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.
FileTreeTestpasses 8 of 8 on the JVM and 8 of 8 in the browser wasm run, verified 2026-10-27 at head025164fb, with a fresh run and no build cache.The full
./gradlew -p ui checkpasses 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
#ED937Ein the render and#FE9E85in the design. The selected file icon is dark red in both:#511104in the render and#550000in 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
FileTreeinsideSolrTheme(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
FileTreeyet. 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.Changelog: changelog/unreleased/SOLR-17887.yml
AI-generated description. Nick Shanin directed the work and takes responsibility for this contribution.