Skip to content

Fix root-group selection in grouped stores#108

Merged
eeholmes merged 3 commits into
mainfrom
copilot/fix-root-group-handling
Jun 11, 2026
Merged

Fix root-group selection in grouped stores#108
eeholmes merged 3 commits into
mainfrom
copilot/fix-root-group-handling

Conversation

Copilot AI commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Root-level variables in Icechunk/Zarr stores could be displayed while the group selector only showed a child group, causing the active group to mismatch the data being shown. This updates the selector so / is surfaced whenever root variables coexist with subgroups, selected by default, and ordered before named groups.

  • Root group discovery

    • Detect root-level visible variables and inject / into the group list only when root data exists.
    • Preserve existing behavior for stores that contain only child groups.
  • Default selection

    • Initialize the selected group to / when present.
    • Keep the selection stable as datasets change.
  • Variable filtering

    • Treat / as the root-group filter and show only root-level variables there.
    • Keep subgroup filtering unchanged for named groups.

Example:

// If both root variables and a child group exist:
["/", "status"]

// If only child groups exist:
["status"]

Copilot AI changed the title [WIP] Fix root-group handling when both root variables and subgroups exist Fix root-group selection in grouped stores Jun 11, 2026
Copilot AI requested a review from eeholmes June 11, 2026 00:59
@eeholmes
eeholmes marked this pull request as ready for review June 11, 2026 01:19
@eeholmes
eeholmes merged commit e4daa8d into main Jun 11, 2026
@eeholmes
eeholmes deleted the copilot/fix-root-group-handling branch June 11, 2026 01:19
@eeholmes
eeholmes restored the copilot/fix-root-group-handling branch June 11, 2026 23:37
@eeholmes

Copy link
Copy Markdown
Owner

@copilot The changes are now showing / (root) when there are no subgroups

Example
https://earthmover-icechunk-era5.s3.us-east-1.amazonaws.com/era5_surface_aws/spatial
this has only vars at root no subgroup. In this case, the group dropdown should not appear in the UI on left but it does. In fact, ALL datasets are showing / regardless of whether they have any groups.

image

Task: Fix so that / and group selector dropdown only appears when there are vars AND subgroups at root level.

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.

Fix root-group handling when both root variables and subgroups exist

2 participants