refactor(frontend): migrate Svelte stores from .ts to .svelte.ts runes

- Delete legacy .ts stores (auth, activity, assistantChat, datasetReview, environmentContext, health, sidebar, taskDrawer, translationRun)
- Create new .svelte.ts runes-based stores using  reactive primitives
- Migrate i18n: /i18n → /i18n/index.svelte.js
- Migrate toasts: /toasts → /toasts.svelte.js
- Update all component imports across 180+ files: components, pages, routes, lib
- Remove fromStore() wrappers — use store.value directly with Svelte 5 runes
- Update test mocks for new import paths
- Add @DEPRECATED annotation to legacy  alias
This commit is contained in:
2026-06-02 09:54:18 +03:00
parent 3214d8c659
commit 4fc3356312
223 changed files with 3045 additions and 3897 deletions

View File

@@ -47,12 +47,12 @@ function resetMockStore() {
}
// Mock toasts
vi.mock('$lib/toasts.js', () => ({
vi.mock('$lib/toasts.svelte.js', () => ({
addToast: vi.fn()
}));
// Mock i18n — $t is a derived store, needs subscribe method for Svelte $ prefix
vi.mock('$lib/i18n', () => {
vi.mock('$lib/i18n/index.svelte.js', () => {
const subscribers = new Set();
const tData = {
maintenance: {
@@ -83,6 +83,7 @@ vi.mock('$lib/i18n', () => {
}
},
_: (key) => key,
getT: () => ({}),
};
});