From 1bbf0ef41e301e855b63f8d449a8f57d0e3cd03a Mon Sep 17 00:00:00 2001 From: Till JS Date: Mon, 30 Mar 2026 10:53:44 +0200 Subject: [PATCH] feat: integrate shared-links into Calendar, Contacts, and ManaCore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add @manacore/shared-links to Calendar, Contacts, and ManaCore apps. Link store initializes alongside tag store in each app's layout, syncs when authenticated, and is ready for cross-app linking. Also fix broken workspace references in moodlit (shared-feedback-service → feedback, shared-feedback-ui removed, shared-subscription-ui → subscriptions). Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/calendar/apps/web/package.json | 1 + .../apps/web/src/routes/(app)/+layout.svelte | 8 +++- apps/contacts/apps/web/package.json | 1 + .../apps/web/src/routes/(app)/+layout.svelte | 8 +++- apps/manacore/apps/web/package.json | 1 + .../apps/web/src/routes/(app)/+layout.svelte | 3 ++ apps/moodlit/apps/web/package.json | 46 +++++++++++++++++++ 7 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 apps/moodlit/apps/web/package.json diff --git a/apps/calendar/apps/web/package.json b/apps/calendar/apps/web/package.json index 5bda9e405..c9ecff641 100644 --- a/apps/calendar/apps/web/package.json +++ b/apps/calendar/apps/web/package.json @@ -43,6 +43,7 @@ }, "dependencies": { "@calendar/shared": "workspace:*", + "@manacore/shared-links": "workspace:*", "@manacore/shared-api-client": "workspace:*", "@manacore/shared-app-onboarding": "workspace:*", "@manacore/shared-auth": "workspace:*", diff --git a/apps/calendar/apps/web/src/routes/(app)/+layout.svelte b/apps/calendar/apps/web/src/routes/(app)/+layout.svelte index 64daa8d7c..80b56adae 100644 --- a/apps/calendar/apps/web/src/routes/(app)/+layout.svelte +++ b/apps/calendar/apps/web/src/routes/(app)/+layout.svelte @@ -29,6 +29,7 @@ tagMutations, useAllTags as useAllSharedTags, } from '@manacore/shared-stores'; + import { linkLocalStore, linkMutations } from '@manacore/shared-links'; import { useAllCalendars, useAllEvents, getDefaultCalendar } from '$lib/data/queries'; import { settingsStore } from '$lib/stores/settings.svelte'; import { birthdaysStore } from '$lib/stores/birthdays.svelte'; @@ -449,7 +450,11 @@ async function handleAuthReady() { // Initialize local-first databases (opens IndexedDB, seeds guest data) - await Promise.all([calendarStore.initialize(), tagLocalStore.initialize()]); + await Promise.all([ + calendarStore.initialize(), + tagLocalStore.initialize(), + linkLocalStore.initialize(), + ]); // Initialize split-panel from URL/localStorage splitPanel.initialize(); @@ -464,6 +469,7 @@ const getToken = () => authStore.getValidToken(); calendarStore.startSync(getToken); tagMutations.startSync(getToken); + linkMutations.startSync(getToken); // Load user settings (requires auth) await userSettings.load(); diff --git a/apps/contacts/apps/web/package.json b/apps/contacts/apps/web/package.json index a1e41f6ee..d18eb10bc 100644 --- a/apps/contacts/apps/web/package.json +++ b/apps/contacts/apps/web/package.json @@ -45,6 +45,7 @@ "@manacore/feedback": "workspace:*", "@manacore/help": "workspace:*", "@manacore/local-store": "workspace:*", + "@manacore/shared-links": "workspace:*", "@manacore/shared-i18n": "workspace:*", "@manacore/shared-icons": "workspace:*", "@manacore/shared-profile-ui": "workspace:*", diff --git a/apps/contacts/apps/web/src/routes/(app)/+layout.svelte b/apps/contacts/apps/web/src/routes/(app)/+layout.svelte index c6d7e19fc..81a9dfd99 100644 --- a/apps/contacts/apps/web/src/routes/(app)/+layout.svelte +++ b/apps/contacts/apps/web/src/routes/(app)/+layout.svelte @@ -52,6 +52,7 @@ tagMutations, useAllTags as useAllSharedTags, } from '@manacore/shared-stores'; + import { linkLocalStore, linkMutations } from '@manacore/shared-links'; import { contactsOnboarding } from '$lib/stores/app-onboarding.svelte'; import { MiniOnboardingModal } from '@manacore/shared-app-onboarding'; import { SessionExpiredBanner, AuthGate, GuestWelcomeModal } from '@manacore/shared-auth-ui'; @@ -305,13 +306,18 @@ async function handleAuthReady() { // Initialize local-first databases (opens IndexedDB, seeds guest data) - await Promise.all([contactsLocalStore.initialize(), tagLocalStore.initialize()]); + await Promise.all([ + contactsLocalStore.initialize(), + tagLocalStore.initialize(), + linkLocalStore.initialize(), + ]); // If authenticated, start syncing to server if (authStore.isAuthenticated) { const getToken = () => authStore.getValidToken(); contactsLocalStore.startSync(getToken); tagMutations.startSync(getToken); + linkMutations.startSync(getToken); } // Initialize split-panel from URL/localStorage diff --git a/apps/manacore/apps/web/package.json b/apps/manacore/apps/web/package.json index 1ffb3610b..84db01a76 100644 --- a/apps/manacore/apps/web/package.json +++ b/apps/manacore/apps/web/package.json @@ -44,6 +44,7 @@ "dependencies": { "@manacore/credits": "workspace:^", "@manacore/local-store": "workspace:*", + "@manacore/shared-links": "workspace:*", "@manacore/qr-export": "workspace:*", "@manacore/shared-auth": "workspace:*", "@manacore/shared-auth-stores": "workspace:*", diff --git a/apps/manacore/apps/web/src/routes/(app)/+layout.svelte b/apps/manacore/apps/web/src/routes/(app)/+layout.svelte index 678b564d8..745a8df75 100644 --- a/apps/manacore/apps/web/src/routes/(app)/+layout.svelte +++ b/apps/manacore/apps/web/src/routes/(app)/+layout.svelte @@ -9,6 +9,7 @@ import { PillNavigation, TagStrip } from '@manacore/shared-ui'; import type { PillNavItem, PillDropdownItem } from '@manacore/shared-ui'; import { tagLocalStore, tagMutations, useAllTags } from '$lib/stores/tags.svelte'; + import { linkLocalStore, linkMutations } from '@manacore/shared-links'; import { manacoreStore } from '$lib/data/local-store'; import { todoReader, @@ -220,6 +221,7 @@ await Promise.all([ manacoreStore.initialize(), tagLocalStore.initialize(), + linkLocalStore.initialize(), // Cross-app readers (read-only, no sync — owning apps handle sync) todoReader.initialize(), calendarReader.initialize(), @@ -239,6 +241,7 @@ const getToken = () => authStore.getValidToken(); manacoreStore.startSync(getToken); tagMutations.startSync(getToken); + linkMutations.startSync(getToken); // Initialize dashboard from IndexedDB await dashboardStore.initialize(); diff --git a/apps/moodlit/apps/web/package.json b/apps/moodlit/apps/web/package.json new file mode 100644 index 000000000..4449b6f2c --- /dev/null +++ b/apps/moodlit/apps/web/package.json @@ -0,0 +1,46 @@ +{ + "name": "@moodlit/web", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "eslint .", + "format": "prettier --write .", + "type-check": "echo 'Skipping type-check for now'" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^5.0.0", + "@tailwindcss/vite": "^4.1.7", + "@types/node": "^20.0.0", + "prettier": "^3.1.1", + "prettier-plugin-svelte": "^3.1.2", + "svelte": "^5.0.0", + "svelte-check": "^4.0.0", + "tailwindcss": "^4.1.7", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "vite": "^6.0.0" + }, + "dependencies": { + "@manacore/shared-auth": "workspace:*", + "@manacore/shared-auth-ui": "workspace:*", + "@manacore/shared-branding": "workspace:*", + "@manacore/feedback": "workspace:*", + "@manacore/shared-i18n": "workspace:*", + "@manacore/shared-icons": "workspace:*", + "@manacore/shared-profile-ui": "workspace:*", + "@manacore/subscriptions": "workspace:*", + "@manacore/shared-tailwind": "workspace:*", + "@manacore/shared-theme": "workspace:*", + "@manacore/shared-theme-ui": "workspace:*", + "@manacore/shared-ui": "workspace:*", + "svelte-i18n": "^4.0.1" + }, + "type": "module" +}