Skip to content

fix: dimension table freezes when resizing the dimension column in DimensionTable.svelte - #9944

Merged
AdityaHegde merged 1 commit into
mainfrom
nishant/fix-dimension-resize-hang
Sep 24, 2026
Merged

AdityaHegde merged 1 commit into
mainfrom
nishant/fix-dimension-resize-hang

Conversation

@nishantmonu51

@nishantmonu51 nishantmonu51 commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator
  • Resizing the dimension column in an expanded dimension table froze the browser tab for ~45s until Svelte threw effect_update_depth_exceeded.
  • Broken by refac: unified expression filter component across explore, canvas, alerts and reports #9746, which migrated DimensionTable.svelte to runes and converted the column width $: block to an $effect verbatim. The effect assigned estimateColumnSize and then read it back through estimateColumnSize[0] = manualDimensionColumnWidth. In Svelte 5 an effect that reads a source it just wrote registers it as its own dependency and reschedules itself, so the first manual resize looped forever. That branch only runs after a resize, which is why the table loaded fine.
  • Fix: compute estimateColumnSize with $derived.by instead of writing $state inside an effect.
  • No other table is affected: the measure column headers never wire up a resize handler, and the pivot, TDD and alert preview tables are still on Svelte 4 syntax where this mechanism does not apply.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Since #9746 migrated DimensionTable.svelte to runes, the column width $effect
assigned estimateColumnSize and then read it back through
estimateColumnSize[0] = manualDimensionColumnWidth. In Svelte 5 an effect that
reads a source it just wrote registers it as a dependency and reschedules
itself, so the first manual resize looped until effect_update_depth_exceeded.
Compute the widths as a $derived instead.
@AdityaHegde
AdityaHegde merged commit cfb3108 into main Sep 24, 2026
16 checks passed
@AdityaHegde
AdityaHegde deleted the nishant/fix-dimension-resize-hang branch September 24, 2026 13:59
AdityaHegde pushed a commit that referenced this pull request Sep 24, 2026
Since #9746 migrated DimensionTable.svelte to runes, the column width $effect
assigned estimateColumnSize and then read it back through
estimateColumnSize[0] = manualDimensionColumnWidth. In Svelte 5 an effect that
reads a source it just wrote registers it as a dependency and reschedules
itself, so the first manual resize looped until effect_update_depth_exceeded.
Compute the widths as a $derived instead.
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