Skip to content

select any#674

Open
lazarusA wants to merge 48 commits into
mainfrom
la/merge_dims
Open

select any#674
lazarusA wants to merge 48 commits into
mainfrom
la/merge_dims

Conversation

@lazarusA

@lazarusA lazarusA commented Jul 4, 2026

Copy link
Copy Markdown
Member

I'm satisfied with the current status. And it does the job. I tried to tackle all corner cases, and see that everything works, but for sure there must be some hidden bug or use case I didn't catch. I used Gemini to find solutions and possible bugs in this transition.

Screenshot 2026-07-06 at 09 15 02 Screenshot 2026-07-06 at 09 12 55

Pull Request Summary (by Gemini, but is accurate)

This pull request introduces a significant round of updates focusing on a major new workflow for multidimensional variable selection, layout responsiveness, rendering performance with WebGPU/WebGL, data handling for Zarr stores, and general UI/UX improvements across the core components.

Major Highlight: Multidimensional Variable Selection

  • DimSlider Workflow: Introduced and refined the powerful DimSlider components workflow. This new system allows users to intuitively slice, filter, and select variables at will from complex, multidimensional datasets. It fundamentally improves how users navigate and visualize multi-variable Zarr data.

Key Features & Performance

  • Optimized Time Combobox: Refactored the TimeCombobox and MetaDimSelector with windowing and scrolling improvements. This dramatically increases performance when handling datasets with a massive number of input dates.
  • Improved Zarr Data Loaders: Enhanced GetArray, dataFetchers, and utils to handle packed chunks, flat datasets (isFlat), and 2D variables.
  • Enhanced Computation & Memory Management: Fixed index memory strides and fixed issues where NaN and Infinity values were propagating incorrectly during 1-variable and 2-variable statistics computation.
  • Playback Controls: Added support to "play" the timeline in any direction.

UI & Layout Refinements

  • Responsive Dialogs & Popovers: Moved Attributes, Variables, and Colorbar details to use Dialog components (especially on mobile) while retaining Popover on desktop when appropriate.
  • MetaDimSelector Redesign: Redesigned the data shape, selection, and chunk shape summary readouts. Relocated the Plot button to the right for a better layout flow.
  • Responsive Alerts & Containers: The "Selection won't fit in Cache" warning has been updated to use muted, responsive UI alerts instead of hardcoded red backgrounds. Removed hardcoded fixed widths and borders from outer containers to prevent unwanted horizontal scrolling on mobile.
  • UX Polish: Added loading spinners when variables are clicked, preventing empty boxes from displaying while metadata fetches. Dates with hours are now appropriately formatted and handled.

Rendering & Plotting (WebGL/WebGPU)

  • Firefox Compatibility: Resolved WebGL issues specific to Firefox.
  • Shader Enhancements: Updates to glsl3 and specialized vertex shaders for specific rendering use cases (vertex.glsl, LandingVertex.glsl, etc).
  • Plotting Fixes: Adjustments to AxisLines, FlatMap, and Sphere mapping to correctly pass the right indices and coordinate rules.

Changed Files Breakdown

  • UI/Components: MetaDimSelector.tsx, TimeCombobox.tsx, Variables.tsx, MetaData.tsx, Colorbar.tsx, PlayButton.tsx
  • Plotting & WebGL: Plot.tsx, FlatMap.tsx, AxisLines.tsx, WGSLShaders.ts, webGPU.ts, multiple *.glsl files.
  • Data & Zarr: GetArray.ts, dataFetchers.ts, utils.ts, GlobalStore.ts

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces multi-dimensional slicing and custom axis mapping to the Zarr store and visualization components, allowing users to map arbitrary dimensions to the X, Y, and Z axes. It adds a comprehensive set of DimSlicer UI components, updates data fetching and chunk copying logic to support arbitrary slicing, and updates shaders to GLSL 3.0 syntax. The review feedback highlights a critical issue where zDimIndex defaults to -1 when unmapped, breaking 3D rendering, as well as several bugs in MetaDimSelector.tsx where parsing inclusive slice stop indices (especially when the index is 0) fails to handle the exclusive nature of Zarr slices correctly.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/components/zarr/GetArray.ts Outdated
Comment thread src/components/ui/MainPanel/MetaDimSelector.tsx Outdated
Comment thread src/components/ui/MainPanel/MetaDimSelector.tsx Outdated
Comment thread src/components/ui/MainPanel/MetaDimSelector.tsx
Comment thread src/components/ui/MainPanel/MetaDimSelector.tsx
@lazarusA

lazarusA commented Jul 5, 2026

Copy link
Copy Markdown
Member Author

/gemini summary

@gemini-code-assist

Copy link
Copy Markdown

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

@TheJeran

TheJeran commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

A few things.

The slicers grab one fewer than they should.
image

This may be why analysis doesn't work. But either way. The analysis doesn't work anymore. I haven't looked into why. But its almost certainly something with the slices.

image

Also would be nice to have the cached chunks info back. maybe here

image

@lazarusA

lazarusA commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

are you on the latest commit?

The slicers grab one fewer than they should.

No, those are in the zero-index notation. So, is grabbing all as expected.

All operations worked on my end. Tested with Firefox.

Screenshot 2026-07-07 at 12 23 21 Screenshot 2026-07-07 at 12 23 04 Screenshot 2026-07-07 at 12 22 46 Screenshot 2026-07-07 at 12 22 35

@TheJeran

TheJeran commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

You can see it in your own screenshots that its not grabbing the full array

image

See how the lons are no longer symmetrical?
image

Slicing is not inclusive. So whatever the last index is, is NOT included.

And yes on the latest commit. Inference doesn't work.

@TheJeran

TheJeran commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

WebGPU still broken. I had assumed it was the slicing because I didn't realize you changed the webGPU stuff. So whatever changed there is the issue.

Replacing the webGPU code in this branch with the old code works just fine on both Chrome and Firefox so please explain to me why it was changed? What was the problem that was being solved?

@lazarusA

lazarusA commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

indeed. Initially I was monkeying around that bit for the Firefox issue. Is back now.

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.

2 participants