Fixed NestJS dependency injection error in ChatService by converting type-only import to regular import.
Root cause: Type-only imports are erased at compile time, causing NestJS to fail dependency injection at runtime.
Error: "Nest can't resolve dependencies of the ChatService (?, DATABASE_CONNECTION)"
This was the same issue we fixed in mana-core-auth services.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed remaining NestJS dependency injection issues by converting type-only imports to regular imports for all injectable services used in controllers and service dependencies.
Changes:
- feedback.service.ts: Fixed AiService import (was causing "argument Function at index [1]" error)
- auth.controller.ts: Fixed BetterAuthService import
- feedback.controller.ts: Fixed FeedbackService import
- credits.controller.ts: Fixed CreditsService import
- settings.controller.ts: Fixed SettingsService import
Root cause: Type-only imports (`import { type X }`) are erased at compile time, causing NestJS to fail dependency injection at runtime. All injectable classes must use regular imports.
Verified locally: All modules initialize successfully without DI errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Found and fixed type-only ConfigService imports in 6 service files that were causing "Nest can't resolve dependencies" errors:
- better-auth.service.ts (BetterAuthService)
- ai.service.ts (AiService)
- settings.service.ts
- feedback.service.ts
- credits.service.ts
- jwt-auth.guard.ts
- optional-auth.guard.ts
Type-only imports are erased at compile time, preventing NestJS from injecting the ConfigService class at runtime.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Document the type-only import issue that causes "Nest can't resolve dependencies" errors. This was the root cause of the AiService injection failure that took significant debugging to identify.
Key learnings:
- Type-only imports are erased at compile time
- NestJS needs actual class imports for DI
- Docker cache can mask source code changes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The `type` keyword on ConfigService import was causing NestJS to fail resolving the dependency at runtime, as type-only imports are erased during compilation. Changed to regular import to fix DI.
Error was: "Nest can't resolve dependencies of the AiService (?)"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixes NestJS dependency injection error where AiService couldn't
resolve ConfigService dependency.
Error:
> Nest can't resolve dependencies of the AiService (?).
> Please make sure that the argument Function at index [0] is available
Root cause: AiModule was missing ConfigModule in its imports array,
but AiService constructor requires ConfigService to read ai.geminiApiKey.
This was preventing mana-core-auth from starting in staging deployment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Reduced GitHub Secrets requirements from 21 to 12 by hardcoding
non-sensitive configuration values directly in the workflow file.
Changes:
- Hardcoded: DB/Redis host/port, STAGING_HOST, STAGING_USER, MANA_SERVICE_URL
- Keep as secrets: passwords, API keys, JWT keys, SSH private key
- Updated generate-staging-secrets.sh to reflect reduced secret list
- Added get-ssh-key.sh helper script for SSH key extraction
Benefits:
- Fewer secrets to manage in GitHub
- Configuration visible in code review
- Easier to update non-sensitive values (no UI navigation)
- Better separation of config vs secrets
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixes two critical deployment issues:
1. Postgres Container Startup Failure:
- Remove missing init.sql volume mount that caused postgres to fail
- Postgres was trying to mount ./docker/postgres/init.sql which doesn't exist
- Added REDIS_PASSWORD environment variable
2. Health Check SSH Issues:
- Consolidated health checks into single SSH session
- Increased wait time from 30s to 60s for services to fully initialize
- Improved health check output with clear status messages
- Added container status logging for debugging
3. Docker Compose Improvements:
- Remove obsolete 'version: 3.9' field (deprecated in Compose v2)
- Increase initial startup wait from 10s to 15s
Changes to docker-compose.staging.yml:
- Removed non-existent init.sql volume mount from postgres
- Removed obsolete version field
Changes to .github/workflows/cd-staging.yml:
- Added REDIS_PASSWORD to environment variables
- Consolidated health checks into single SSH session (fixes "ssh: command not found")
- Increased wait times for service initialization
- Improved logging and error messages
This should fix the "dependency failed to start: container manacore-postgres-staging is unhealthy" error.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changes to .github/workflows/cd-staging.yml:
- Add Docker login step for GitHub Container Registry (ghcr.io)
- Add permissions for packages:read
- Update service deployment options to only include services with Dockerfiles
- Update health checks to match deployed services
Changes to docker-compose.staging.yml:
- Comment out services without Dockerfiles:
- maerchenzauber-backend (no Dockerfile yet)
- nutriphi-backend (no Dockerfile yet)
- news-api (no Dockerfile yet)
- Keep only services with Docker images:
- mana-core-auth ✅
- chat-backend ✅
- manadeck-backend ✅
- Update nginx dependencies to remove disabled services
This fixes the "error from registry: denied" error that was preventing
staging deployments. The deployment was trying to pull Docker images
that were never built because those services don't have Dockerfiles.
Now only services with actual Docker images will be deployed to staging.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changes:
- Replace npm with pnpm for workspace dependency support
- Copy workspace files (pnpm-workspace.yaml, package.json, pnpm-lock.yaml)
- Copy and build shared package dependencies:
- @manacore/shared-errors
- @manacore/manadeck-database
- @mana-core/nestjs-integration
- Use pnpm install --frozen-lockfile
- Update base image to node:20-alpine
- Use dumb-init for proper signal handling
This fixes the "Unsupported URL Type 'workspace:'" error that was
preventing Docker builds. The new approach matches the pattern used
by the chat backend Dockerfile.
Fixes build error in CI/CD pipeline.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Parent workspace packages (apps/*/package.json, games/*/package.json) had
build scripts that called 'turbo run build' or 'pnpm run --recursive build',
creating infinite recursion when root turbo orchestrates builds.
When root turbo runs 'build', it finds packages with build scripts and
executes them. If those scripts also call 'turbo run build', it spawns
another turbo process → infinite loop.
Changes:
- Removed 'build' script from 7 parent packages (calendar, contacts, zitare, picture, presi, mana-games, voxel-lava)
- Also removed redundant 'clean', 'lint', 'type-check' scripts where they had recursive calls
- Root turbo.json already handles orchestration of these tasks
This follows the guideline in CLAUDE.md:
> Parent workspace packages must NEVER have scripts that call turbo run
> for tasks that turbo orchestrates from the root.
Fixes CI build timeout (was running for 10+ minutes with infinite task spawning).
- Copy packages/shared-nestjs-auth in build stage
- Build shared-nestjs-auth before backend
- Resolves TS2307 errors in Docker build CI
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed formatting in 21 files across calendar, contacts, manacore, manadeck,
picture, storage apps and shared-ui package.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- lint:root: run ESLint with root config on all files
- lint:fix: run ESLint with auto-fix
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add eslint.config.mjs at root with TypeScript/JS rules
- Configure lint-staged to run ESLint --fix on JS/TS files
- Add ESLint dependencies to root package.json
- Set "type": "module" in package.json to fix module warning
- Ignore projects with their own ESLint configs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Compact header styling with smaller buttons and reduced padding
- Add configurable hour filter display in header
- Add QuickEventOverlay component for fast event creation
- Add allDayDisplayMode to event metadata types
- Extend settings store with filter hours configuration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixes race condition in CI where stale dist/renderers.mjs causes build failures.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Install lint-staged to format staged files before commit
- Update pre-commit hook to run lint-staged then type-check
- Auto-format ts, tsx, js, jsx, json, md, svelte, astro files
Run prettier --write to fix formatting inconsistencies in 80 files
across calendar, contacts, picture, presi, storage, zitare apps
and shared packages/documentation.
- Add aliases without color- prefix (--background, --foreground, --primary, etc.)
- Fix Mana/Subscription page styling across all apps
- Remove conflicting legacy aliases from contacts app.css
- Update contacts mana page to use toast instead of alert
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add hasMoved state to prevent accidental updates on simple clicks
- Only persist changes when actual drag/resize movement occurred
- Add Escape key handler to cancel drag/resize operations
- Improve visual feedback during resize with dashed outline
- Fix click handler to properly ignore clicks after drag/resize
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add settings module to mana-core-auth with REST API endpoints
- Create user_settings table with globalSettings and appOverrides (JSONB)
- Add createUserSettingsStore() factory in shared-theme package
- Integrate user settings in all app layouts (calendar, chat, contacts, etc.)
- Support for nav position, theme, locale settings with per-app overrides
- Optimistic updates with localStorage caching for offline support
- Add comprehensive documentation in docs/USER_SETTINGS.md
API Endpoints:
- GET /api/v1/settings - Get all user settings
- PATCH /api/v1/settings/global - Update global settings
- PATCH /api/v1/settings/app/:appId - Set app override
- DELETE /api/v1/settings/app/:appId - Remove app override
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add missing tsconfig.json and source files for @storage/shared package
to fix type-check failures. Includes type definitions for StorageFile,
StorageFolder, FileVersion, Share, Tag, and FileTag interfaces.
- Add drag & drop for events in all 6 calendar views (Day, Week, Month, 5/10/14-day)
- Add resize handles for adjusting event start/end times
- Remove internal scroll containers for page-level scrolling
- Add 15-minute snap-to-grid for time adjustments
- Add view type selector in CalendarHeader
- Add sidebar collapsed state management
- Add settings store with localStorage persistence for user preferences
- Implement language selection (DE, EN, FR, ES, IT) in settings
- Add calendar view settings: default view, week start day, time format
- Add weekday-only filter and week number display options
- Add event defaults: duration and reminder settings
- Integrate settings into WeekView, MonthView, MultiDayView components
- Add profile page to calendar and contacts web apps
- Support drag & drop and resize for events in WeekView
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive accessibility support across shared packages:
- A11y store with contrast, colorblind mode, and reduce motion settings
- A11yQuickToggles and A11ySettings UI components
- PillNavigation and PillDropdown components in shared-ui
- Calendar app updates to integrate new theme/a11y features
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add feedback service and route
- Add archive page for deleted contacts
- Add favorites page for starred contacts
- Add groups page for contact organization
- Add mana integration page
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Skip automatic migrations in Docker - tables are managed via 'pnpm db:push' locally
- Simplifies startup and avoids migration conflicts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add storage app directory structure
- Add storage dev scripts to root package.json
- Add storage backend and web env generation in generate-env.mjs
- Update COMMANDS.md with calendar app reference
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Change module from ESNext to CommonJS for NestJS compatibility
- Update moduleResolution from bundler to node
- Add build script and dist exports to package.json
- Remove .js extensions from imports for better compatibility
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add calendar and storage SVG icons to app-icons.ts
- Add CalendarLogo.svelte and StorageLogo.svelte components
- Add Calendar and Storage to MANA_APPS with descriptions
- Add APP_URLS entries for calendar and storage
- Update AppId type to include 'calendar'
- Fix Picture port from 5179 to 5185
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Change userId columns from uuid to text to support Better Auth's nanoid format
- Update conversations, spaces, space_members, templates, usage_logs schemas
- Fix web API endpoint path from /api to /api/v1
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Refactor CSS from @layer to plain CSS for guaranteed inclusion
- Add Svelte 5 runes safety checks in calendars/events stores
- Integrate shared-auth-ui pages with CalendarLogo and translations
- Add AppSlider and LanguageSelector components
- Add feedback service and mana route
- Add auth route detection in layout to skip navigation on auth pages
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix CSS variable names to match shared-tailwind themes
- --primary → --color-primary
- --background → --color-background
- --card → --color-surface
- etc.
- Add new contact page with modern design
- Live avatar preview with initials
- Section-based form with icons
- Input fields with inline icons
- Add contact detail page with view/edit modes
- Quick actions (call, email, message)
- Detail cards for contact info, work, address, notes
- Favorite toggle button
- Update central test user credentials (t@t.de)
- Add port 5184 to CORS origins for contacts web app
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>