Skip to content

Migrate preferences from writable stores to runes#42

Merged
msmolens merged 1 commit intomainfrom
migrate-preferences-to-runes
Oct 16, 2025
Merged

Migrate preferences from writable stores to runes#42
msmolens merged 1 commit intomainfrom
migrate-preferences-to-runes

Conversation

@msmolens
Copy link
Owner

No description provided.

@msmolens msmolens marked this pull request as ready for review October 16, 2025 17:59
@msmolens msmolens requested a review from Copilot October 16, 2025 17:59
Copy link

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 migrates preferences from Svelte writable stores to runes, modernizing the state management approach. The migration changes how preferences are created, accessed, and managed throughout the codebase.

  • Replaced PreferencesManager.createStore() with createPreference() that returns getter functions
  • Updated all preference access from $store syntax to function calls like preference()
  • Migrated subscription-based reactivity to $effect() for handling preference changes

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/treetop/Treetop.svelte Updated preference access syntax and replaced store subscription with $effect()
src/treetop/PreferencesManager.ts Replaced writable stores with SvelteMap and getter functions
src/treetop/PreferencesManager.test.ts Updated tests to use new preference API and function calls
src/treetop/Folder.svelte.test.ts Changed test setup to use preference getter functions
src/treetop/Bookmark.svelte.test.ts Modified test mocks to use preference getter pattern
src/treetop/Bookmark.svelte Updated preference access from store syntax to function calls
_locales/en/messages.json Added new error message for history manager refresh

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@msmolens msmolens merged commit 684fc21 into main Oct 16, 2025
2 checks passed
@msmolens msmolens deleted the migrate-preferences-to-runes branch October 16, 2025 18:09
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