Skip to content

Load hidden ancestor models when first shown - #121

Open
k-kostin wants to merge 1 commit into
omacom:mainfrom
k-kostin:codex/visible-columns
Open

k-kostin wants to merge 1 commit into
omacom:mainfrom
k-kostin:codex/visible-columns

Conversation

@k-kostin

@k-kostin k-kostin commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Defer hidden ancestor listings after a sidebar place is picked. Keep each
model once first approached; no retention budget or eviction policy.

unvisited ancestor outside viewport margin -> no FolderModel
within one column of viewport              -> create model
later offscreen                            -> retain model and scroll

Evidence

  • Before: the added LTR/RTL regression fails against main 5179c58 because
    hidden ancestors instantiate models.
    After: first-load freshness, offscreen trail reveal, scroll retention
    and a real file drop pass in tests/folio_tests.cpp, without a new target.
  • Synthetic sidebar pick, 500 files per ancestor, 8 paired runs per depth and
    direction, Qt 6.12 Release/offscreen/software, warm file cache. LTR medians:
Depth First visible QML row, main → patch Models, main → patch
3 9.9 → 2.0 ms 4 → 2
8 11.6 → 2.5 ms 9 → 2

RTL results are comparable. These measure QML readiness, not monitor frame
presentation or completed thumbnails. Current and peek columns are unchanged.

Full local bin/test: 243 passed, 0 failed, 1 skipped (root-drive trash needs writable /).
The Qt plugin set uses package-owned qt6-base/imageformats/svg image handlers;
this is local qualification, not a container CI run. One theme-watcher failure
in the shared temporary directory was reproduced on the unpatched main test
when its temporary parent changed. The full suite passes with a private TMPDIR.

Merge Danger

Door: Two-way

Local QML change; no stored data or new dependency.

Blast Radius: Columns

First listing timing for hidden ancestors; models already shown retain their
existing lifetime. LTR/RTL, trail highlighting, sorting, sidebar navigation,
peek behavior and drops are covered by the new and existing suite.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

Ancestor columns now wait until they approach the visible area before creating their folder models, then keep those models and their scroll positions.

  • Ancestor listings load as their columns approach the viewport.

No actionable issues found.

Reviews (3) · Last reviewed commit: "Load hidden ancestor models only when fi..." · Reviewed by Greptile

@dhh

dhh commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Thanks for this. FolderColumns.qml has changed a lot under it: the details are a column after the selected file, and a place picked in the sidebar is the first column shown, with the folders above it as columns scrolled out of sight to the left (#157). So this needs to be redone rather than rebased, and that's a good moment to make it smaller.

Most paths are a handful of folders deep, where loading every ancestor costs little; the 24-deep case is rare. What's new on main, and probably the clearest win now, is those hidden columns: each still makes a model and reads its folder although nothing shows it. A PR that gives an ancestor column a model only once it's in view (or near it), without the retention budget, keeping scroll position, the trail's highlight and drops working, measured against main for a place picked deep in the sidebar, would be much easier to take. Its tests should go in tests/folio_tests.cpp and stay proportionate to the change.

@k-kostin
k-kostin force-pushed the codex/visible-columns branch from 0e0e8b4 to f67ae06 Compare November 18, 2026 15:56
@k-kostin k-kostin changed the title Load ancestor columns on demand and retain recent ones Load hidden ancestor models when first shown Nov 18, 2026
@k-kostin

Copy link
Copy Markdown
Contributor Author

Thanks.

I rebuilt this around the hidden ancestors on main (5179c58). An ancestor now gets its model when it comes within one column of the viewport, and keeps it after that. The retention budget and eviction logic are gone.

For sidebar picks into synthetic folders with 500 files per ancestor, median time to the first visible QML row was 9.9 → 2.0 ms at 3 levels and 11.6 → 2.5 ms at 8 levels. That creates 2 models instead of 4 and 9. These are offscreen LTR measurements, with eight paired runs per case; RTL gave similar results. They measure QML readiness, not monitor frame presentation.

The regression is in tests/folio_tests.cpp and covers first-load freshness, scrolling to the trail highlight, preserving scroll position, and drops in both directions. The full local suite passes: 243 passed, 1 skipped (requires writable /). A theme-watcher test also failed on unpatched main when its temporary parent changed; the complete run passes with a private TMPDIR.

@dhh
dhh force-pushed the codex/visible-columns branch from f67ae06 to 2c53c3f Compare November 18, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants