Found during review of PR #971.
spaceGroupOptionsMetadata's Year entry is disabled while the active sort is Date created or Date modified (web/src/lib/utils/space-album-grouping.ts). When that happens:
- the menu option is correctly
disabled (space-albums-controls.svelte:182), so it cannot be selected
buildSpaceAlbumGroups / getSelectedSpaceAlbumGroupOption correctly fall back to None, so the list renders flat
- but the toolbar trigger still reads "Group by year", because
selectedGroupOption (space-albums-controls.svelte:88) resolves the stored groupBy via findSpaceGroupOptionMetadata without consulting isDisabled()
Repro: group a space's albums by Year, then switch the sort to Date created. The list becomes ungrouped while the button still claims Year.
Display-only — no data or ordering bug. Pre-existing; #971 did not introduce it and deliberately left it alone (Year stayed enabled for the new Recently linked sort precisely so this would not be reachable from the default).
Likely fix is one line: resolve the label through getSelectedSpaceAlbumGroupOption($spaceAlbumViewSettings) rather than the raw stored groupBy.
Found during review of PR #971.
spaceGroupOptionsMetadata's Year entry is disabled while the active sort is Date created or Date modified (web/src/lib/utils/space-album-grouping.ts). When that happens:disabled(space-albums-controls.svelte:182), so it cannot be selectedbuildSpaceAlbumGroups/getSelectedSpaceAlbumGroupOptioncorrectly fall back toNone, so the list renders flatselectedGroupOption(space-albums-controls.svelte:88) resolves the storedgroupByviafindSpaceGroupOptionMetadatawithout consultingisDisabled()Repro: group a space's albums by Year, then switch the sort to Date created. The list becomes ungrouped while the button still claims Year.
Display-only — no data or ordering bug. Pre-existing; #971 did not introduce it and deliberately left it alone (Year stayed enabled for the new Recently linked sort precisely so this would not be reachable from the default).
Likely fix is one line: resolve the label through
getSelectedSpaceAlbumGroupOption($spaceAlbumViewSettings)rather than the raw storedgroupBy.