Skip to content

Fix: Details layout rows render empty in grouped folders - #103

Merged
MemerGamer merged 1 commit into
mainfrom
linux/fix-grouped-details
Oct 6, 2026
Merged

MemerGamer merged 1 commit into
mainfrom
linux/fix-grouped-details

Conversation

@MemerGamer

Copy link
Copy Markdown
Owner

Resolved / Related Issues

  • No issue filed. Found in a desktop test: Downloads (415 items) in Details showed only the folder icon and one or two clipped glyphs per row, with empty Date modified and Type cells and no group header.

Root cause

Grouping and grouped virtualization (#96, #100) are not involved. The Linux layout preferences database (layoutpreferences.json) serialized DetailsLayoutColumnItem.UserLength, which is a GridLength. System.Text.Json writes it as {IsAbsolute, IsAuto, IsStar} with no value. On load, UserLength comes after UserLengthPixels, so it overwrote every column width with default(GridLength) (Auto, 0).

The row template binds cell widths to LengthIncludingGridSplitterPixels, which came out as 0 or 12 px, so the cells collapsed. The header uses GridLength directly and still looked right. The zero widths were then saved back, so the folder stayed broken. Any folder whose preferences were loaded from disk hit this. The reported Downloads entry had zero widths and no grouping (it was saved before #96 restored the grouping default), which is why no group header appeared.

Fix

  • UserLength is now [JsonIgnore] (it was already [RegistryIgnore]). The width is persisted only through UserLengthPixels.
  • When loading or importing the Linux database, a column width of 0 or less goes back to the default width from settings (24 px for the icon column). A width of 0 is never valid because hidden columns are tracked separately. This repairs files that earlier builds already corrupted.

Steps used to test these changes

All runs used headless-run.sh with a sandboxed HOME and FILES_SANDBOX_DRIVES=scripts/linux/showcase-drives.txt. Downloads was seeded with 380 long-named folders and 35 files, with modification dates spread over about 400 days, and the app started directly in Downloads.

  1. Before the fix, a valid persisted Details entry for Downloads reproduced the report exactly: icon plus clipped glyph, empty cells. After that run the file held UserLengthPixels: 0.
  2. After the fix, an already corrupted entry (zero widths) with grouping by date modified renders name, date, type and size correctly. Switching to Grid, then List, then Cards, then back to Details all render correctly. The saved file has default widths and no UserLength.
  3. After the fix, a valid entry without grouping renders correctly. A second session that loads the file written by the fixed build also renders correctly.
  4. Earlier runs without persisted preferences (grouped by date, all-today dates, resize under kwin_x11) were already correct and still are.
  5. tests/Files.Platform.Tests: 1055 total, 1048 passed, 7 skipped, 0 failed. Desktop app build succeeded.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY

…ences

The Linux layout database serialized DetailsLayoutColumnItem.UserLength, a
GridLength that System.Text.Json cannot read back. On load it was written
after UserLengthPixels and reset every column width to 0, so Details rows
showed only the icon and a clipped name, and the zero widths were saved again.

Persist the width only through UserLengthPixels and restore non-positive
widths already saved by earlier builds to the default column widths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY
@MemerGamer
MemerGamer merged commit 7c3164b into main Oct 6, 2026
3 checks passed
@MemerGamer
MemerGamer deleted the linux/fix-grouped-details branch October 6, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant