← Back to Pull requests

perf: read tree children and jump targets off the UI thread #326

Closed
unknown closed this pull request without merging on Nov 21, 2026 01:16 UTC
View on GitHub
unknown unknown commented on Nov 20, 2026 22:10 UTC
Author

:robot: _AI text below_ :robot:

Moves the tree I/O off the UI thread (items 7, 8 and 10 of the review).

  • Every expand reads the children in the load worker (_load_in_thread). Before, a node with is_loaded true (an open file, a local directory) loaded on the UI thread, so a file with many objects or uproot-browser ~ froze the UI at start. load_directory is removed; the tree records the filled nodes, so is_loaded now only tells the jump list which nodes it must not enter (an unopened file, an unlisted remote directory). Directory.is_loaded does not change: the local listing is now in a worker, and the jump list still shows the local subdirectories.

  • / builds the jump list in a worker (request_jump_candidates), with the status bar, and caches it for each file as before. The finder still shows the full contents of open files.

  • Every remote URL that does not end with / is a LazyRoot root, also when no format claims it (it can be a file or a directory). LazyRoot.root gives the root of the opened node, so a remote directory is not walked as one file. A failed LazyRoot open (also a failed listing) now shows a notification in addition to the failed-entry label. The next expand tries the load again.

  • I did not use LazyRoot for local files. A path:key spec opens a node inside the file, and the selections are paths below that node. LazyRoot would need to know the key and change the paths, which conflicts with the Node.path change. A local open is fast, and the CLI check covers a failure.
  • The TUI tests call a new wait_for_tree helper at start, because the first children now load in a worker. A new test records the thread of every Folder.child and Directory._listable call for a file and a directory; it failed before this change.

    Refs #322

    Diff: 225 lines (+168 / -57) across 2 files Reviewer: henryiii Review duration: 186m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 225 lines diff across 2 files
    0.37
    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.324
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #326"
    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: 36.9% (MEDIUM) · Higher = larger blast radius
    36.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: 14.6% · Safe to merge
    14.6%