Skip to content

feat(list): add optional media and creation columns - #2603

Merged
l0gicgate merged 7 commits into
lgse:mainfrom
adamcbrewer:feat/2574-list-columns
Nov 19, 2026
Merged

l0gicgate merged 7 commits into
lgse:mainfrom
adamcbrewer:feat/2574-list-columns

Conversation

@adamcbrewer

@adamcbrewer adamcbrewer commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

Add Duration, Dimensions and Created to the List view's Columns menu. All three start hidden. The picker, headings and saved widths use the same column definitions.

Media metadata loads in the background. Missing values stay blank and sort after known values within each folder/file group. Dimensions sorts by total pixels. Media sorts keep making progress across batches and use fresh metadata after files change.

The earlier full QA run stopped after thread-spawn errors. Three media-preview tests from the full Rust run reproduced on the unchanged base commit. The local CodeScene check requires a credential that was unavailable.

Visual evidence

image image image

How to test

  1. Open a folder with a video, an audio file, an image and a text file. Switch to List view and enable Duration, Dimensions and Created from Columns.
  2. Sort by Duration and Dimensions in both directions. Add another media file while the sort is active, then switch to Icons or Columns and open the sort menu.
  3. Reset the List columns, then return to List view.

Expected result: Applicable cells show values and the rest stay blank. Known values come first in either direction, subject to Folders first. New media moves into place as its metadata loads. The active sort remains visible in the sort menu after switching views, and reset hides the optional columns.

Related issue

Refs #2574

Make it possible to compare media and creation times in mixed folders while keeping the standard List layout compact.

Refs lgse#2574
The new media sort tests left an idle sort resync on the default main
context. The next test that took the async lock on another thread
dispatched it and aborted the strata-fs test binary.
handle_metadata_finished said only Complete fills publish, but media
sorts now publish a truncated batch and continue with the rest.
@l0gicgate

Copy link
Copy Markdown
Contributor

Review and cleanup

CI has not run. This is a draft from a fork, so every CI job skips (the CI run for 8675d452e is action_required). Only Metadata policy and Type label ran, and both passed. CI will run once the PR is marked ready for review.

main: the branch already contained main at 7cc1543e9, so no merge was needed.

Review against the description and #2574. Every claim checks out in the code:

  • Duration, Dimensions and Created are in the Columns menu and start hidden (list_shown_columns opt-in).
  • The picker, headings, row cells, widths and skeleton all use ListColumnId::definition().
  • Missing values sort after known ones in both directions, within the Folders-first groups.
  • Dimensions sorts by pixel count.
  • Media sorts continue across 256-entry batches and refetch after splices.
  • Reset clears the opt-ins.
  • Both new strings are in all 13 catalogs.

The issue asked for Duration and video fields as a first step, and the author asked for feedback on these three before adding more, so the scope matches. There were no earlier review comments.

Fixes pushed

  • 471545d38 test(browser): drain queued sort resyncs after media sort tests. The three new tests in app::browser::tests::metadata left an idle schedule_sort_resync source on the default main context. The next test to take ASYNC_MAIN_CONTEXT_DEFAULT on another thread dispatched it, and glib's ThreadGuard panic aborted the whole strata-fs test binary (SIGABRT). This happened in 3/3 runs of the module; skipping the new tests made it pass. The tests now call a shared drain_main_context() before they return.
  • 8675d452e docs(browser): describe truncated media sort publication. The handle_metadata_finished doc comment still said only Complete fills publish.

Tests. None removed. The new tests cover distinct behaviour: media batch filtering, retry after a truncated fill, stale-probe rejection after a replaced file, survival across another column's sort, and Duration/Dimensions ordering in both directions with incremental insert. The two dropped first_headings.len() == 5 widget-count assertions were tautological.

Validation

  • ./scripts/test-headless.py -- app::browser app::navigation model:: ui::browser_modes ui::browser:: ui::preferences ui::chooser::tests::column_widths ui::window::tests::preferences ui::settings i18n::: strata 458, strata-core 56, strata-fs 509, strata-preview 27 passed, 0 failed.
  • ./scripts/test-headless.py -- app::browser::tests::metadata ×3 after the fix: 21 passed each time, no aborts.
  • ./scripts/qa.sh --test-threads 6 chooser-heading-escape-keeps-selection additional-sort-choices appearance-menu-switches-view-list list-column-drag-applies-on-release: 6/6 runs passed.
  • ./scripts/quality.sh fmt, ./scripts/quality.sh clippy: clean.
  • Not run: the full Rust and QA suites (the scoped selection covers the sort pipeline, List views and preferences), and scripts/code-health.sh (no CodeScene token here).

Follow-ups (not blocking)

  • Batches always take the first 256 Unknown targets in column order, and continue_media_sort stops after a batch that makes no progress. If the front of the list stays Unknown (broken symlinks, or a mount where no probe finishes in the budget), later media files are never probed until the next splice or reload.
  • Each 256-entry batch is a full pass: a column_unknown_sort_metadata scan with a content-type guess per entry, plus a full re-sort and republish. Very large folders (tens of thousands of media files) do quadratic main-thread work.
  • A media-revision mismatch in apply_sort_metadata throws away the whole in-flight batch, not just the spliced locations. The icon-details cache makes the re-probe cheap, but filtering per location would keep valid results.
  • media_sort_metadata_missing (strata-fs) and icon_details_need_fill (UI) decide "needs media details" differently: for Dimensions the first counts image and video files, the second only images. One shared predicate would stop them drifting apart.
  • Hidden Duration, Dimensions and Created labels are still updated on every bind, and hidden Created registers a live date binding. This keeps toggling instant, but doubles per-row date-binding work while Created is hidden.
  • As on main, a sort started in another column replaces the single pending sort, so an in-flight Duration/Dimensions sort can be abandoned. The PR cancels it immediately instead of when the fill ends.

@l0gicgate
l0gicgate marked this pull request as ready for review November 19, 2026 05:23
Keep saved widths independent of CSS class names.

Refs lgse#2574
Count unresolved media rows without allocating their paths and stop existence checks at the first match.

Refs lgse#2574
@adamcbrewer

Copy link
Copy Markdown
Contributor Author

I've pushed two small follow-ups:

  • c5324f943 gives saved column widths stable IDs, so renaming a CSS class won't reset anyone's widths. Existing settings still work.
  • 402fcc3ea only collects the paths needed for the next metadata batch. That avoids building a full list of unresolved paths on each pass and keeps the same sort behaviour.

The focused tests, formatting and Clippy all passed.

The saved-preferences fixture now shows Duration, so List rows probed the
header-only .wav and video fixtures. Their durations became unavailable
and the preview dropped them from its media sequence, failing the
audio-track and video-clip stepping tests.
@l0gicgate

Copy link
Copy Markdown
Contributor

CI follow-up

Merged main at 9ea79324a (no conflicts) on top of c5324f943 and 402fcc3ea.

Fixed: d8eee1726 test(window): hide the Duration column in keyboard fixtures.

Three keyboard-dispatch tests failed in shards 0, 1 and 3, all with "did not settle":

  • audio_tracks::tenxer_angle_brackets_step_through_audio_files_from_the_preview
  • video_clips::configured_start_skips_raw_video_streams
  • video_clips::tenxer_angle_brackets_step_through_videos_and_skip_other_media

They pass on main and fail from 464a7ee0e onwards. The cause is the exhaustive saved-preferences fixture, which now includes list_shown_columns = [Duration]. With Duration visible, List rows request media details for the header-only .wav/video fixtures. The probe marks their duration Unavailable, and entry_family then removes them from the preview's media sequence by design. The caption never reads "1 of 3 in folder" and stepping has nothing to step through. seed_fixture_preferences already resets fixture choices that conflict with these tests (sidebar, 10xer), so it now hides Duration as well. Product behaviour is unchanged.

Not caused by this PR:

  • Dependency and spelling policy fails on main and every open PR. The cause is RUSTSEC-2026-0543 (chrono unmaintained) and RUSTSEC-2026-0545 to 0548 (zip 8 via docx-rs). fix(deps): ignore the unfixable chrono and docx-rs zip 8 advisories #2618 ignores exactly these IDs, and its CI is green. Once it lands, merging main here clears this check.
  • Release workflow scripts failed once on 402fcc3ea in test_installer…test_package_logging_preserves_terminal_prompts_without_recording_passwords. It passes 5/5 locally and passed on this push. This PR doesn't touch the installer.

Validation

  • ./scripts/test-headless.py -- ui::window::tests::keyboard_dispatch: 201 passed, 0 failed.
  • ./scripts/quality.sh fmt, ./scripts/quality.sh clippy: clean.
  • CI run 44552265161 on d8eee1726: all four Rust shards, Format, lint, and test, Quality build and lint and Release workflow scripts passed. Only Dependency and spelling policy failed, as described above.

@l0gicgate
l0gicgate merged commit 9ad4b82 into lgse:main Nov 19, 2026
10 of 11 checks passed
wmfeht added a commit that referenced this pull request Nov 21, 2026
…for Rune

Each is an item under the owning package's Open, as a follow-up after done (A2, A8 and A10
for #2603, A6 for #2533, A18 for #2448, and A19, A20 and A9 for #2108), with a reference
issue: #2684, #2685, #2686 and #2687. The A19 successor rows and the E1 Menu-key row say what
the Rune runs showed, and H5.md takes the Menu key's line-14 failure as a finding to confirm.
wmfeht added a commit to wmfeht/strata-feature-map that referenced this pull request Nov 29, 2026
Sync lgse/strata#2603, #2615: optional List media and creation columns, media sorts, Fedora manual-install packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants