Commit Graph
58 Commits
Author SHA1 Message Date
matthias ffd7f389b8 test(canvas): cover flow resize lock
Add hook-level regression coverage proving useCanvasFlowReconciliation preserves local node state while the shared resize lock is active. The test harness now supports driving the resize ref the same way production interactions do.
2026-04-03 22:09:17 +02:00
matthias d7b0720474 test(vitest): discover flow reconciliation hook test
Add the planned Task 4 test path to the explicit canvas test include list so normal Vitest discovery runs components/canvas/__tests__/use-canvas-flow-reconciliation.test.ts without temporary config overrides.
2026-04-03 22:03:22 +02:00
matthias 9fb850f2a4 fix(canvas): align flow reconciliation hook with task plan
Rename the hook test to the planned path, revert the persistent Vitest config tweak, and narrow the hook inputs to reconciliation data plus shared refs. Keep verification working with a temporary test config instead of expanding the repo-level include list.
2026-04-03 22:01:18 +02:00
matthias d1c14c93e5 refactor(canvas): extract flow reconciliation hook
Move Convex-to-local node and edge reconciliation into a dedicated hook so canvas.tsx has a cleaner sync boundary during modularization. Add hook-level tests for optimistic edge carry and drag-lock behavior to preserve the existing UX.
2026-04-03 21:36:02 +02:00
matthias 5223d3d8d7 fix(canvas): refresh sync engine hook dependencies 2026-04-03 21:26:24 +02:00
matthias c060c57ad8 refactor(canvas): extract sync engine hook 2026-04-03 21:11:04 +02:00
matthias f2f22b66a7 test(canvas): expand reconciliation helper coverage 2026-04-03 20:51:21 +02:00
matthias 297816c5ca test(vitest): include canvas component tests 2026-04-03 20:45:22 +02:00
matthias 928fd81904 refactor(canvas): extract flow reconciliation helpers 2026-04-03 20:42:47 +02:00
matthias 16ad9e48f4 docs(canvas): remove extraction scratch note 2026-04-03 20:32:33 +02:00
matthias 859aad4438 docs(canvas): annotate modularization seams 2026-04-03 20:30:35 +02:00
matthias cdcd819a44 docs(canvas): add modularization strategy 2026-04-03 20:26:39 +02:00
matthias 4fad69a151 fix(canvas): ensure valid source and target node IDs when creating synthetic edges 2026-04-03 20:15:23 +02:00
matthias d7d715fd03 fix(convex): rename helper modules to valid convex paths 2026-04-03 19:59:50 +02:00
matthias 081bf13e04 feat(a11y): add live region feedback for auth and billing flows 2026-04-03 19:47:56 +02:00
matthias 8ed9adf6f8 chore(lint): resolve remaining warnings and ignore generated convex artifacts 2026-04-03 19:41:34 +02:00
matthias 0173d5c604 fix(canvas): avoid server persistence for download-only renders 2026-04-03 19:39:31 +02:00
matthias d320ff47b0 refactor(canvas): extract data and storage url orchestration from canvas 2026-04-03 19:31:05 +02:00
matthias fb005f3cce refactor(billing): derive subscription product credits from shared tier map 2026-04-03 19:25:03 +02:00
matthias 8639478a11 refactor(config): unify tier credit constants across frontend and backend 2026-04-03 19:20:28 +02:00
matthias 7e87a74df9 feat(canvas): move image pipeline rendering off main thread with worker fallback 2026-04-03 19:17:42 +02:00
matthias 7e1a77c38c refactor(canvas): debounce and extract local snapshot persistence 2026-04-03 19:10:07 +02:00
matthias 234da6f7d7 refactor(app): scope heavy providers to authenticated route layouts 2026-04-03 19:01:48 +02:00
matthias df2a6c1759 refactor(app): move auth gating and metadata to server-first patterns 2026-04-03 18:55:13 +02:00
matthias 9c8cd364b4 feat(a11y): improve keyboard and semantic controls in core UI 2026-04-03 18:54:04 +02:00
matthias 8dd1d1bb7c refactor(billing): centralize tier credits and align topup UI 2026-04-03 18:53:21 +02:00
matthias 609e4fca20 fix(canvas): separate download from upload side effects 2026-04-03 18:52:54 +02:00
matthias 68416ed9de test: add vitest baseline for critical payment and auth guards 2026-04-03 18:15:18 +02:00
matthias 2542748e82 fix(canvas): align optimistic edge id typing with queue payloads 2026-04-03 18:07:59 +02:00
matthias af3cb47247 fix(canvas): resolve hook rule violations in delete and image nodes 2026-04-03 18:05:02 +02:00
matthias c33e65b0f6 fix(tool-ui): remove render-time ref mutation in controllable state 2026-04-03 18:02:44 +02:00
matthias 16f24991a4 fix(dashboard): make recent transaction time formatting pure 2026-04-03 18:01:16 +02:00
matthias 67302da6ed fix(toast): remove invalid translation hook helper 2026-04-03 17:59:44 +02:00
matthias d151fbb5b7 fix(polar): make webhook credit flows idempotent 2026-04-03 17:56:15 +02:00
matthias 923a73dafe fix(convex): enforce node-canvas match in generateImage 2026-04-03 17:46:26 +02:00
matthias d3a4c4d335 fix(convex): validate every node in batch mutations 2026-04-03 17:42:47 +02:00
matthias c094f6c80b fix(billing): block direct public credit topups 2026-04-03 17:40:22 +02:00
matthias 3474297e69 Refactor user initialization and balance retrieval logic
- Updated the `InitUser` component to handle session state more effectively by incorporating a loading state.
- Removed the unused `useAuthQuery` hook and adjusted the balance initialization logic to only proceed when the session is confirmed.
- Enhanced the `getBalance` query with improved error handling and logging for better debugging.
- Modified the `initBalance` mutation to return an object indicating whether a new balance was created, improving clarity in the initialization process.
2026-04-03 15:47:34 +02:00
matthias 6cbdfdcb79 Merge branch 'codex/canvas-anpassung' 2026-04-03 14:52:56 +02:00
matthias 1fb8fd2863 Refactor canvas storage URL handling and integrate adjustment presets
- Introduced a new `CanvasPresetsProvider` to manage adjustment presets for nodes, enhancing state management and reducing reactivity.
- Updated storage URL resolution to utilize a mutation instead of a reactive query, improving performance and reducing unnecessary re-renders.
- Refactored adjustment nodes (color-adjust, curves, detail-adjust, light-adjust) to use the new preset context for fetching user presets.
- Improved overall canvas functionality by streamlining storage ID collection and URL resolution processes.
2026-04-03 14:52:34 +02:00
matthias 5bd5a638e1 Update canvas documentation for toolbar and sidebar layout 2026-04-03 14:51:31 +02:00
matthias 3aaad38e06 Enhance canvas sidebar and toolbar with improved UI and state management
- Integrated NextImage for logo display in the canvas sidebar, enhancing visual consistency.
- Updated canvas name handling in the toolbar to ensure proper display and accessibility.
- Refactored sidebar layout for better responsiveness and user experience.
- Improved state management for category collapsibility in the sidebar, allowing for a more intuitive navigation experience.
2026-04-03 13:51:41 +02:00
matthias 8703387617 Enhance canvas functionality with storage URL resolution and debugging improvements
- Added a fallback mechanism for resolving storage URLs in `canvas-helpers.ts`, improving reliability when URLs are not directly available.
- Introduced new utility functions in `canvas.tsx` for summarizing update and resize payloads, enhancing debugging capabilities during canvas operations.
- Updated `compare-node.tsx` to improve state management and rendering logic, allowing for better handling of incoming edges and display modes.
- Refactored `render-node.tsx` to streamline the rendering process and include detailed logging for debugging render operations.
- Updated `.gitignore` to exclude `.kilo` files, ensuring cleaner repository management.
2026-04-02 16:12:56 +02:00
matthias 43e3e0544a Add storage ID handling and optimize canvas storage URL retrieval
- Introduced `hasStorageId` function to check for valid storage IDs in canvas nodes.
- Updated `batchGetUrlsForCanvas` query to utilize helper functions for improved readability and maintainability.
- Implemented `assertCanvasOwner`, `listNodesForCanvas`, `collectStorageIds`, and `resolveStorageUrls` to streamline the process of fetching storage URLs associated with a canvas.
- Enhanced query logic to skip unnecessary database calls when no valid storage IDs are present.
2026-04-01 18:41:42 +02:00
matthias 75e5535a86 Enhance Providers component with time zone support
- Updated `RootLayout` to retrieve the user's time zone using `getTimeZone` from `next-intl/server`.
- Modified the `Providers` component to accept and pass the time zone prop to `NextIntlClientProvider`, improving localization capabilities.
2026-04-01 18:21:16 +02:00
matthias 79d9092d43 Implement internationalization support across components
- Integrated `next-intl` for toast messages and locale handling in various components, including `Providers`, `CanvasUserMenu`, and `CreditOverview`.
- Replaced hardcoded strings with translation keys to enhance localization capabilities.
- Updated `RootLayout` to dynamically set the language attribute based on the user's locale.
- Ensured consistent user feedback through localized toast messages in actions such as sign-out, canvas operations, and billing notifications.
2026-04-01 18:16:52 +02:00
matthias 6ce1d4a82e Update package dependencies and documentation for LemonSpace v1.5
- Added `next-intl` dependency to `package.json` for internationalization support.
- Updated `pnpm-lock.yaml` to reflect the new dependency and its version.
- Revised LemonSpace Manifest and PRD to version 1.5, including updates to authentication methods and new features for offline sync and canvas management.
2026-04-01 14:40:27 +02:00
matthias b428f5f4df refactor: modularize canvas component by extracting low-level logic into dedicated helper modules
- Removed unused imports and functions from canvas.tsx to streamline the codebase.
- Introduced several helper modules for improved organization and maintainability, including canvas-helpers, canvas-node-change-helpers, and canvas-media-utils.
- Updated documentation in CLAUDE.md to reflect changes in the canvas architecture and the purpose of new internal modules.
2026-03-31 21:39:15 +02:00
matthias 1e99251506 docs: add Sub-Dokumentation section to AGENTS.md and CLAUDE.md for improved documentation structure
- Introduced a new section detailing the Single Source of Truth for various components, linking to their respective CLAUDE.md files.
- Enhanced clarity on documentation organization across different areas of the project.
2026-03-31 21:12:26 +02:00
matthias 4723fdca16 fix: change retryCount declaration from const to let in generateAndStoreImage function for proper reassignment 2026-03-31 20:44:35 +02:00
matthias df73c389a0 Refactor Convex image generation into queued background sub-processes 2026-03-31 20:39:44 +02:00
matthias 05f82af982 feat: improve canvas node management with enhanced deletion logic
- Added functionality to prevent node deletion based on synchronization status, providing user feedback through notifications.
- Introduced helper functions to clarify reasons for blocking deletions, enhancing user experience during interactions.
- Updated asset node styling for better visual consistency and adjusted minimum dimensions for improved layout management.
2026-03-30 09:55:06 +02:00
matthias 96ba48b5f1 feat: add lemonspaceAppOrigin to trustedOrigins in auth configuration
- Added lemonspaceAppOrigin to the trustedOrigins array, enhancing the security and integration of the authentication process.
2026-03-29 23:16:30 +02:00
matthias 6965c66e53 add trustedOrigins to auth 2026-03-29 23:11:33 +02:00
matthias 4abe123fbd delete pnpm-workspace.yaml 2026-03-29 22:40:54 +02:00
matthias db98fabcc6 feat: introduce image editing capabilities and enhance canvas component organization
- Added new image editing node types including curves, color adjustment, light adjustment, detail adjustment, and render, expanding the functionality of the canvas.
- Updated the canvas command palette and sidebar to categorize and display new image editing nodes, improving user navigation and accessibility.
- Implemented collapsible categories in the sidebar for better organization of node types, enhancing the overall user experience.
- Refactored canvas components to support the new image editing features, ensuring seamless integration with existing functionalities.
2026-03-29 22:33:59 +02:00
matthias c55fde2b64 fix: update recent transactions badge styling and localize time formatting
- Added padding to the "Rückerstattet" badge for improved visual appearance.
- Updated time formatting in the formatRelativeTime function to use German language strings for better localization.
2026-03-26 22:29:08 +01:00
matthias 8d62ee27a2 feat: enhance dashboard and canvas components with credit management features
- Integrated CreditOverview and RecentTransactions components into the dashboard for better credit visibility.
- Updated canvas toolbar to display current credit balance using CreditDisplay.
- Improved AI image and prompt nodes to show credit costs and handle credit availability checks during image generation.
- Added new queries for fetching recent transactions and monthly usage statistics to support dashboard features.
- Refactored existing code to streamline credit-related functionalities across components.
2026-03-26 22:15:03 +01:00