Skip to content

Add keyed {#each} blocks in SidePanel.svelte#4

Merged
rdtect merged 2 commits intobolt-cesium-state-raw-5174348588541632920from
copilot/sub-pr-3
Mar 24, 2026
Merged

Add keyed {#each} blocks in SidePanel.svelte#4
rdtect merged 2 commits intobolt-cesium-state-raw-5174348588541632920from
copilot/sub-pr-3

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 24, 2026

The {#each} blocks iterating over cities and nature in SidePanel.svelte were unkeyed, causing Svelte to do full DOM teardown/rebuild on list changes instead of surgical keyed diffing.

Changes

  • SidePanel.svelte: Added (loc.id) keys to both location list iterators
{#each cities as loc (loc.id)}
{#each nature as loc (loc.id)}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] [WIP] Address feedback on preventing deep proxy performance overhead in Cesium.Viewer Add keyed {#each} blocks in SidePanel.svelte Mar 24, 2026
Copilot AI requested a review from rdtect March 24, 2026 10:17
@rdtect rdtect marked this pull request as ready for review March 24, 2026 11:08
Copilot AI review requested due to automatic review settings March 24, 2026 11:08
@rdtect rdtect merged commit 5da622d into bolt-cesium-state-raw-5174348588541632920 Mar 24, 2026
@rdtect rdtect deleted the copilot/sub-pr-3 branch March 24, 2026 11:09
@rdtect
Copy link
Copy Markdown
Contributor

rdtect commented Mar 24, 2026

Pr to main @copilot

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves UI update performance in SidePanel.svelte by keying the two {#each} blocks that render location buttons, allowing Svelte to apply stable keyed diffing rather than recreating DOM nodes when the lists change.

Changes:

  • Added (loc.id) keys to the cities list iterator.
  • Added (loc.id) keys to the nature list iterator.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants