Commit graph

2490 commits

Author SHA1 Message Date
Till JS
f592464f61 fix(analytics): update Umami website ID after database reset
The Umami database was re-initialized with empty website table. Created
new ManaCore Web website in Umami and updated the ID in docker-compose
and .env.development. Fixes stats.mana.how 400 errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:23:09 +02:00
Till JS
6a75f3fca1 fix(workbench): make page width responsive on mobile
Pages now adapt to the available screen width on mobile (<640px) instead
of overflowing at the fixed 480px default. Resize handle remains functional.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:18:08 +02:00
Till JS
3714b3ae67 fix(mana-notify): support insecure TLS for internal SMTP (Stalwart)
Add SMTP_INSECURE_TLS env var to skip certificate verification for
internal Docker-network SMTP connections. Stalwart's self-signed cert
uses 'localhost' as CN which doesn't match the 'stalwart' hostname.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:17:57 +02:00
Till JS
d5b76bd646 feat(docker): connect mana-notify to Stalwart SMTP
Set SMTP defaults to use internal Stalwart server (stalwart:587) with
noreply@mana.how credentials. Add stalwart as dependency for mana-notify.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:08:33 +02:00
Till JS
4825aef262 feat(mana-auth): add /api/v1/settings endpoint for user settings sync
The unified web app calls auth.mana.how/api/v1/settings to sync theme,
nav, locale, and device settings — but the endpoint was missing, causing
404 errors in production. Implements all 7 CRUD routes against the
existing auth.user_settings table.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:06:11 +02:00
Till JS
f070d022c1 fix(docker): correct Stalwart port mapping and healthcheck
Map host 8443 to container 8080 (HTTP admin UI). Use wget for
healthcheck since curl is not available in the Stalwart image.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:23:16 +02:00
Till JS
ed78c345c6 fix(docker): correct Stalwart image name to stalwartlabs/stalwart
The old image name stalwartlabs/mail-server doesn't exist on Docker Hub.
The correct image is stalwartlabs/stalwart.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:21:55 +02:00
Till JS
0a6fe57a80 feat(infra): add Stalwart mail server, route mana-notify SMTP through it
Add self-hosted Stalwart mail server (Rust, ~50MB RAM) to replace Brevo
as SMTP provider. mana-notify now sends via stalwart:587 internally.

Ports exposed: 25 (SMTP), 587 (submission), 465 (SMTPS), 993 (IMAPS),
8443 (web admin). Requires DNS setup (MX, SPF, DKIM, DMARC) and router
port-forwarding to complete the migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:20:23 +02:00
Till JS
18d4f84718 fix(docker): add Brevo SMTP_USER default for mana-notify
SMTP_USER was empty because it wasn't in .env and had no default.
Add the Brevo account as default (was previously hardcoded in mana-auth).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:07:24 +02:00
Till JS
c7908e9f69 fix(infra): prevent race condition in status-page-gen script execution
Copy the volume-mounted generate.sh to /tmp before executing, so a
concurrent git pull doesn't corrupt the file mid-read.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:06:13 +02:00
Till JS
0bac7e127f fix(docker): align mana-notify service key with mana-auth
mana-notify was using NOTIFY_SERVICE_KEY (defaulting to dev-service-key)
while mana-auth sends MANA_CORE_SERVICE_KEY. Use the same env var so
mana-auth can authenticate with mana-notify.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:05:03 +02:00
Till JS
b2adaaa30e refactor(mana-auth): route emails through mana-notify instead of Nodemailer
Replace direct Brevo SMTP sending with HTTP calls to mana-notify's
notification API. This centralizes all email configuration in one
service (mana-notify) and removes the nodemailer dependency from
mana-auth. SMTP provider is now swappable via a single env var.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:01:27 +02:00
Till JS
62d9eb1f2b fix(infra): update status page, prometheus, and cloudflared for unified app
All web app subdomains (chat.mana.how, todo.mana.how, etc.) were removed
when the unified app launched, but monitoring configs still referenced them.
Update blackbox targets to use mana.how/route URLs, remove stale API backend
routes from cloudflared, clean up CORS origins, and fix status page generator
to handle route-based URLs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:59:15 +02:00
Till JS
543e7055b9 feat(manacore/web): add undo toasts to all 14 DetailViews + task completion
Extend undo toast coverage to all modules:
- Delete undo in cards, storage, presi, planta, inventar, skilltree,
  memoro, questions, uload, mukke, citycorners DetailViews
- Task completion toggle in todo ListView shows undo toast

All deletions can now be reversed within 5 seconds via "Rückgängig".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:55:30 +02:00
Till JS
81716725f2 feat(manacore/web): add undo toasts for delete and tag removal
Extend toast system with action buttons and toastStore.undo() helper.
After deleting a task/event/contact or removing a tag, a toast with
"Rückgängig" button appears for 5 seconds. Clicking it restores the
item (clears deletedAt) or re-adds the tag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:50:32 +02:00
Till JS
a673a69972 feat(manacore/web): add overlay close animation + Escape key support
- Overlay fades out + scales down on close (150ms) instead of vanishing
- Escape key closes overlay (pops cross-detail, or closes all)
- All close paths use closeAllOverlays() for consistent animation
- Overlay stays visible during closing animation via `closing` state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:42:02 +02:00
Till JS
4e5709a033 fix(docker): add shared-logger to sveltekit-base Dockerfile
shared-hono depends on @manacore/shared-logger but it was missing from
the base image COPY list, causing pnpm install to fail.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:41:17 +02:00
Till JS
3fa7073597 fix(docker): remove stale clock/packages/shared COPY from mana-web Dockerfile
Clock was archived/consolidated into Times but the Dockerfile still
referenced its shared package, breaking the Docker build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:36:11 +02:00
Till JS
8f5727fd51 feat(manacore/web): add places module with GPS location tracking
New local-first places module for the workbench: browser Geolocation API
tracking, place management (CRUD, favorites, tags, categories), OSM map
preview in detail view, and proximity-based visit detection.

Also allows geolocation in Permissions-Policy header (self only).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:33:56 +02:00
Till JS
e17d6228e4 fix(manacore/web): fix getTagsByIds missing allTags param in zitare, fix TagDragData cast
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:20:34 +02:00
Till JS
09eef96ed8 fix(manacore/web): align notes and finance ListViews with workbench design system
Match todo/calendar/contacts patterns: hardcoded colors with dark mode
overrides, consistent button styles (transparent bg, hover states),
same padding/spacing/border-radius as existing ListViews.

Buttons are now clearly recognizable: primary (purple bg), ghost
(transparent with hover), danger (red on hover), filter tabs
(active state with colored bg).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:08:01 +02:00
Till JS
b63829ae4c fix(manacore/web): redesign notes workbench — compact input, click-to-edit
Replace bulky compose area with single-line quick-create (Enter to save).
Notes are directly clickable and open as inline editors in-place with
title, content, pin/delete actions, and Escape/Fertig to close.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:04:24 +02:00
Till JS
4ec4694f8f fix(manacore/web): make notes and finance workbench panels directly usable
Notes: always-visible compose field at top (title + content), expands
on focus, Cmd+Enter to save. Note list below.

Finance: always-visible quick-add with type toggle, amount + description
inline, category chips. No hidden button — ready to use immediately.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:02:00 +02:00
Till JS
c01eccb852 refactor(manacore/web): merge entity + app registries into unified AppDescriptor
Replace the dual registry system (app-registry.ts + entities/) with a
single AppDescriptor that contains identity, views, and entity fields.

- Create $lib/app-registry/ with types.ts, registry.ts, apps.ts, index.ts
- Merge all 27 app entries + 3 entity descriptors into one registry
- Move ViewProps from nav-stack.ts into app-registry/types.ts
- Update all 39 consumer files (ListViews, DetailViews, AppPage, etc.)
- Delete old files: entities/, app-registry.ts, nav-stack.ts, entity.ts

Single source of truth: one AppDescriptor per module, one registry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:01:27 +02:00
Till JS
9abbf9c70d feat(manacore/web): add notes and finance modules
Notes: lightweight markdown notes with search, color tags, pinning,
inline create, auto-save editor, and grid/detail views.

Finance: income/expense tracking with categories, monthly overview,
category breakdown bars, quick-add form, and transaction history.

Both modules include workbench ListView, full-page routes, entity
descriptors for drag/drop, and database/sync registration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:57:37 +02:00
Till JS
a8480f6710 fix(ui): allow multiple detail views open across AppPages
Previously, clicking a detail view in one AppPage would close the
overlay in all other AppPages because the global click handler closed
on ANY click outside the overlay card.

Now the click handler only closes the overlay when the click is
inside the SAME AppPage but outside the overlay card. Clicks in
other AppPages are ignored, allowing multiple detail views to be
open simultaneously side by side.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:48:25 +02:00
Till JS
df74029423 fix(manacore/web): fix cross-module drop — sync entity registration, lazy store imports
Entity registration was async (dynamic imports) so acceptedDropTypes
was always empty when $derived first evaluated. Now entities register
synchronously at import time. Store imports (Dexie, etc.) are deferred
to createItem() call time to avoid circular dependencies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:42:31 +02:00
Till JS
66d61962b6 fix: add missing closing brace in PageShell CSS (.move-btn)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:38:12 +02:00
Till JS
18a94b9266 feat(manacore/web): clickable cross-module links with overlay stacking
Clicking a linked item in a DetailView opens the target app's DetailView
as a stacked overlay on top of the current one. Supports:
- Cross-app navigation (e.g. click linked event from todo detail)
- Back button to return to previous overlay
- Correct app color + title in overlay header
- Overlay stack with goBack() popping the top frame
- Added paramKey to EntityDescriptor for correct ID mapping

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:36:40 +02:00
Till JS
5828f60934 feat(manacore/web): add habits module with tally board, inline create, and detail view
New habit tracking module: define habits (emoji, color, daily target), tap to log with timestamp, view streaks and 7-day charts. Includes workbench ListView with inline creation, full-page detail view, and drag/drop entity integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:34:07 +02:00
Till JS
0af8c7cec6 fix(ui): make all drag bar icons always visible (not hover-only)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:30:20 +02:00
Till JS
339e3d344f feat(ui): move window controls (minimize, maximize, close) into drag bar
Window buttons now live in the drag handle bar alongside the move arrows,
appearing on hover. Header row is simplified to just icon + title.

Layout: ◀ ···drag··· [−] [□] [✕] ▶
All buttons appear on hover, close button has red hover state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:28:37 +02:00
Till JS
ad9bbec393 feat(ui): add left/right arrow buttons to PageShell drag bar
Arrow buttons appear on hover at the left/right edges of the drag bar
to quickly reorder pages without dragging. Hidden when the page is
already first (no left arrow) or last (no right arrow).

- PageShell: onMoveLeft/onMoveRight props, CaretLeft/CaretRight icons
- AppPage: pass through move callbacks
- +page.svelte: handleMoveLeft/handleMoveRight with array swap + persist

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:25:51 +02:00
Till JS
2529c91d58 feat(manacore/web): show item title + app color in drag preview
DragPreview now accepts a resolveEntity callback that maps drag type
+ data to display info (title, app color, app name). Dragging a task
shows "Meeting mit Team · Todo" instead of just "task".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:24:58 +02:00
Till JS
a60799ddff fix(ui): reduce drag handle bar height
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:21:46 +02:00
Till JS
e8a4b984f3 fix(ui): full-width draggable header bar on PageShell
- Drag handle bar spans full width (not just the icon)
- Entire bar is draggable with grab cursor
- Subtle background color differentiates it from content (border-bottom)
- Hover/active states for visual feedback
- DotsSixVertical icon rotated 90° (horizontal grip lines)
- Dark mode support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:20:53 +02:00
Till JS
d7b146a186 fix(ui): add top padding to workbench on desktop
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:17:20 +02:00
Till JS
cf03743bae fix(ui): add left scroll offset to PageCarousel
First panel no longer sticks to the left edge. Left padding set to
calc(50vw - 240px) so the carousel starts with generous breathing room.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:16:20 +02:00
Till JS
ec7c563283 fix: remove stale references to deleted packages (shared-auth-stores, shared-profile-ui, shared-app-onboarding)
- Dockerfile.sveltekit-base: remove COPY lines for 3 deleted packages
- CI workflow: remove shared-profile-ui from SHARED_WEB_PATTERN
- manavoxel package.json: remove shared-auth-stores dependency
- uload CLAUDE.md: update auth store reference to shared-auth-ui
- APP_ONBOARDING.md: update package path to shared-ui/onboarding

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:15:58 +02:00
Till JS
a15b027e96 fix(shared-ui): block click event after drag to prevent detail view opening
After a successful drag-and-drop, the browser fires a click event on
the source element. This was opening the detail view overlay instead of
completing the drop. Now a one-time click blocker is added after drag
ends to swallow the spurious click.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:15:53 +02:00
Till JS
9b8814ea37 fix(ui): make homepage PageCarousel full-width (no side padding)
Break out of the layout's max-w-7xl px-4 container using negative
margins so the workbench carousel fills the entire viewport width.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:14:08 +02:00
Till JS
1bd001ec9a fix(manacore/web): restrict page drag to handle only, allow item DnD
Page reorder drag now only starts from the drag-handle icon, not from
anywhere in the page. This allows dragSource on list items (tasks,
events, contacts) to work without being intercepted by page reorder.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:11:58 +02:00
Till JS
f819b24596 fix: revert guestMode $state() — caused effect_update_depth_exceeded
Making guestMode reactive with $state() triggered an infinite effect
cascade: guestMode.notifications being accessed in the template created
a reactive dependency that, combined with 8+ AppPages each running
$effect for module loading, exceeded Svelte's effect update depth limit.

Root cause: GuestMode object has reactive getters that return new
references on each access. Wrapping it in $state() made every template
access trigger a re-render, which triggered more effects, creating an
unbounded cascade.

Fix: Keep guestMode as plain variable (non-reactive). The warning about
non_reactive_update is acceptable — guestMode is set once during init
and its properties are accessed imperatively, not reactively.

Also:
- Remove debug console.logs from AppPage, +page, +layout
- Keep onMount for workbench state loading (replaces $effect)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:10:21 +02:00
Till JS
6ced238571 chore: delete 25 web-archived directories, remove stale stubs, clean workspace config
- Delete all 25 apps/*/apps/web-archived/ directories (superseded by unified ManaCore app)
- Remove stale +page.server.ts stubs from teams, organizations, settings (always returned empty data)
- Simplify teams and organizations pages to static empty-state (no server load dependency)
- Delete empty apps/context/apps/mobile/components/variants/index.ts
- Remove commented-out apps-archived entries from pnpm-workspace.yaml

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:03:49 +02:00
Till JS
e1077e261f fix(manacore/web): fix entity registration hang + registry type errors
- Make entity registration lazy (ensureEntitiesRegistered) to avoid
  circular imports at module load time
- Re-enable cross-module drop target in AppPage
- Fix Component type in app-registry to accept any props (AnyComponent)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 12:57:59 +02:00
Till JS
d8ce4eaf34 refactor: consolidate codebase — remove archived code, deduplicate packages, standardize middleware
- Delete 17 server-archived/ directories (consolidated into apps/api/)
- Delete apps-archived/ (clock, wisekeep) and services-archived/ (it-landing, ollama-metrics-proxy)
- Fix type safety: replace all `any` casts in cross-app-queries.ts with proper Local* types
- Remove duplicate shared-auth-stores package (identical copy of shared-auth-ui/stores/)
- Remove duplicate theme store from shared-stores (canonical version in shared-theme)
- Migrate memoro-server rate-limiter to shared-hono/rateLimitMiddleware
- Migrate uload-server JWT auth + error handler to shared-hono (authMiddleware, errorHandler)
- Migrate arcade-server error handling to shared-hono
- Merge shared-profile-ui and shared-app-onboarding into shared-ui
- Unify /clock route into /times/clock, remove redirect stubs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 12:55:58 +02:00
Till JS
7ee57b7afd feat(manacore/web): add entity descriptor system with cross-module drag-and-drop
Introduce EntityDescriptor pattern: each module declares how its items
can be displayed, dragged, dropped, and created from other modules.

- Entity types + registry with executeDrop orchestration
- Entity descriptors for todo, calendar, contacts
- List items are now draggable (dragSource) across pages
- Pages accept cross-module drops (event→todo, contact→calendar, etc.)
- Drops create new items + bidirectional manaLinks via shared-links
- LinkedItems component shows cross-module links in DetailViews
- Visual feedback: page glows purple on valid hover, green on success

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 12:42:38 +02:00
Till JS
d73591865c fix: move bottomChromeHeight after isTagStripVisible declaration
$derived cannot reference variables declared later in the script.
Moved the calculation below the isTagStripVisible $state declaration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 12:39:14 +02:00
Till JS
f0d5ba2128 fix: allow localhost in CSP connect-src during development
Dev env vars (_CLIENT suffixed) are empty, so localhost:3001 (auth),
localhost:3050 (sync), localhost:3060 (api) were blocked by CSP.

Added http://localhost:* and ws://localhost:* to connect-src when
NODE_ENV !== 'production'.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 12:37:13 +02:00
Till JS
d368bd34b5 fix: replace bind:clientHeight with calculated bottom chrome height
bind:clientHeight + $effect setting CSS variable caused infinite reflow
loop: height change → CSS var → padding change → height change.

Now using $derived calculation from state (isCollapsed, isTagStripVisible)
instead of DOM measurement. No reflow loop possible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 12:34:42 +02:00