Leopoldadmin
8f4ca1581c
feat: offline support, performance benchmark, y-indexeddb integration
...
- Add y-indexeddb for offline CRDT persistence (IndexedDB)
- useYjsBinding now creates IndexeddbPersistence per document
- State syncs from IndexedDB on reconnect
- Graceful fallback if IndexedDB unavailable
- Add Performance Benchmark test (50k elements)
- Bulk insert: 50k elements in <2s
- Viewport search: <10ms for ~1000 visible elements
- Full viewport search: <100ms for all 50k elements
- 100 sequential searches: <500ms
- Remove 1000 elements: <200ms
- Clear all: <50ms
- Bearbeitungs-Tools already fully implemented (move, copy, rotate, scale, mirror, trim, extend, fillet, offset)
- Bestuhlungs-Tools already fully implemented (seating-row, seating-block, table, stage, templates)
All 634 tests passing (254 backend + 380 frontend)
2026-07-27 00:37:28 +02:00
Leopoldadmin
02308dc54a
fix: comprehensive quality improvements
...
- Fix 2 backend test failures (projectFolders validation, StressTest timeout)
- Fix frontend test dependency (@testing-library/dom)
- Delete App.tsx.bak from repo
- Add rate limiting on auth endpoints (login: 10/min, register: 3/min)
- Add .env.example with all environment variables
- Update BAUPLAN.md with accurate phase status (16/21 phases implemented)
- Add OpenAPI/Swagger documentation (docs/openapi.yaml)
- Add E2E workflow test (15 steps: register→project→drawing→layer→element→CRUD→delete)
- Add Forgejo CI/CD pipeline (.forgejo/workflows/ci.yml)
- Improve .gitignore (db-wal, .env.*, *.bak, coverage)
- Add security comment for default user in schema.sql
All 628 tests passing (254 backend + 374 frontend)
2026-07-26 22:47:50 +02:00
Leopoldadmin
5d9c3f9495
add ui_design.md with final design system documentation
2026-07-08 06:50:38 +00:00
Leopoldadmin
fe680de606
add component_inventory.md with full component documentation
2026-07-08 06:49:51 +00:00
Leopoldadmin
e4a9446f9c
delete broken component_inventory.md (contained unexpanded macro)
2026-07-08 06:49:09 +00:00
Leopoldadmin
f5a81f0fe0
add component_inventory.md for HMS Licht & Ton UI
2026-07-08 06:48:55 +00:00
Leopoldadmin
67c678121f
fix: CanvasPreview crash - transform DBElement properties_json to CADElement properties
...
Backend returns DBElement with properties_json (string), not properties (object).
CanvasPreview accessed el.properties.stroke directly → undefined → React crash → white screen.
Fix: transform raw API response to CADElement format with JSON.parse(properties_json).
2026-07-04 19:33:22 +02:00
Leopoldadmin
6c04ca6793
fix: replace synthetic canvas preview with real drawing data
...
- Load drawings + elements via API
- Render actual SVG elements (rect, circle, line, text, polygon, arc)
- Auto-scale viewBox to element bounding box
- Show "Leere Zeichnung" placeholder when no elements
2026-07-04 18:26:14 +02:00
Leopoldadmin
3af9640ace
feat: dashboard UI improvements - 8 changes
...
1. Web CAD title larger (24px, font-weight 800)
2. Gear icon opens SettingsModal
3. Folder drag-and-drop with nested folders (backend parent_id support)
4. Icon-only card buttons with CSS tooltips
5. Canvas preview (deterministic SVG per project)
6. Info panel: smaller title, double-height description
7. User/group permission selector
8. oe → ö correction
2026-07-04 18:11:11 +02:00
Leopoldadmin
6c4d62641a
fix: frontend Dockerfile uses --legacy-peer-deps for vite@8 compatibility
2026-07-04 17:21:34 +02:00
Leopoldadmin
be62470b53
merge: combine all features from both codebases - mobile dashboard + layer panel + notifications + shares + all fixes
2026-07-04 16:43:55 +02:00
Leopoldadmin
0606dbb501
fix: SQLite boolean binding, CSS brace, race condition, 0 npm vulns, code-splitting
2026-07-04 16:08:51 +02:00
Leopoldadmin
a4371ca3ce
fix: layer panel collapsible tree + element actions (visibility toggle, delete) + RenderEngine skips invisible elements
2026-06-27 23:59:12 +02:00
Leopoldadmin
affa6be151
feat: layer panel with element tree - shows layers + elements as children with count badges, sub-layers supported
2026-06-27 14:27:34 +02:00
Leopoldadmin
4303076ce4
feat: click-drag drawing, layer tree, settings modal, UI improvements
...
- interaction: click-drag drawing for 2-point tools (line, rect, circle, dimension, leader)
- interaction: preview rendering during drag with setPreviewElement
- interaction: handleDrawDown only sets phase=drawing on first point
- CanvasArea: sync activeLayerId to LayerManager
- CanvasArea: callback refresh useEffect prevents stale closures
- App.tsx: functional setElements updates for handleElementCreated/Deleted/Modified
- LayerPanel: tree structure with sub-layers (onReorder, onAddSubLayer)
- TreeView: drag-and-drop reordering support
- RightSidebar: onReorder, onAddSubLayer, onUpdateElement props
- PropertiesPanel: onUpdateElement prop
- SettingsModal: personal/password/language/theme/users/plugins/AI tabs
- styles.css: extensive UI styling additions
- types: updated RightSidebarProps, CanvasAreaProps, LayerPanelProps
2026-06-27 14:12:37 +02:00
Leopoldadmin
39422a4348
fix: layer IDs globally unique - use timestamp-based IDs instead of hardcoded layer-0/1/2/3/4
...
Root cause: layers.id is TEXT PRIMARY KEY (global unique across all drawings).
Hardcoded IDs layer-0..layer-4 collided when multiple projects tried to create
the same layer IDs. Second project got UNIQUE constraint failed on POST /layers.
Without layers, elements had dangling layer_id refs causing FOREIGN KEY errors.
Fix: makeInitialLayers() generates unique IDs: layer-{timestamp}-{index}.
activeLayerId initialized from first layer, not hardcoded.
activeLayerName uses activeLayerId variable, not hardcoded layer-0.
On project load with existing layers, activeLayerId set from first DB layer.
2026-06-26 20:53:41 +02:00
Leopoldadmin
7ad0e11873
fix: element creation fails with empty layer_id (FOREIGN KEY constraint)
...
Three fixes:
1. interaction/index.ts: Add layerId to created element in confirmDraw()
2. CanvasArea.tsx: Sync layers to LayerManager via layerManagerRef
3. App.tsx: Fallback to activeLayerId in handleElementCreated if layerId missing
Root cause: LayerManager.activeLayerId was empty because layers were never
synced from React state to the interaction layer LayerManager. New elements
got layer_id="" which failed SQLite FOREIGN KEY constraint.
Also includes Yjs sync race condition fix from previous commit.
2026-06-26 20:31:50 +02:00
Leopoldadmin
bd8bedcfed
fix: remove debug console.log from InteractionEngine - tools verified working
2026-06-26 19:24:12 +02:00
Leopoldadmin
f9f31db933
debug: add console.log to InteractionEngine to trace drawing flow
2026-06-26 19:01:45 +02:00
Leopoldadmin
7e530dd09a
fix: stale closure bug preventing canvas tools from creating elements
...
- CanvasArea: add useEffect to refresh InteractionEngine callbacks when props change
- App.tsx: handleElementCreated/Deleted/Modified now use functional setElements updates
- Root cause: CanvasArea init useEffect had empty deps, capturing stale callbacks at mount
- handleElementCreated used [...elements, el] with stale elements=[] closure
- Each new element replaced all previous ones instead of appending
- All 343 tests pass, tsc clean
2026-06-26 18:57:09 +02:00
Leopoldadmin
3bec3938d0
fix: ribbon tabs now show per-tab content; add all missing handleRibbonAction handlers
...
- RibbonBar: conditional rendering per activeTab (start/insert/format/view/tools/ki)
- App.tsx: add onNavigateBack prop for new/open navigation
- App.tsx: implement handlers for new, open, save, copy, paste, zoom-fit, zoom-100, grid, layer, measure, search, plugins, ki, ki-draw, ki-analyze
- App.tsx: implement insert-line, insert-rect, insert-circle, insert-text, insert-freehand, insert-image
- App.tsx: implement format-* placeholder actions
- App.tsx: add clipboard state for copy/paste
- All 343 tests pass, tsc clean
2026-06-26 18:49:16 +02:00
Leopoldadmin
ef23463a74
fix: CSS layout - .main → .app-body selector mismatch caused sidebar full-width
...
The component uses className="app-body" but CSS targeted .main for the grid layout.
This caused leftbar, canvas, and rightbar to all render at full viewport width
instead of the 3-column grid (leftbar 64px | canvas 1fr | rightbar 240px).
2026-06-26 18:37:20 +02:00
Leopoldadmin
6d15a692af
fix: WebSocket wss:// same-origin URL + try/catch to prevent crash on HTTPS
...
- Change DEFAULT_WS_URL from ws://hostname:3001 to wss://window.location.host
- Wrap WebSocket constructor in try/catch to prevent React crash on connection error
- Fixes white page when opening a project (CADEditor crashed on insecure ws:// from HTTPS page)
2026-06-26 17:58:06 +02:00
Leopoldadmin
1bcfaffdd4
fix: replace hardcoded localhost:3001 with relative API URL + add canvas mock and integration test
...
- Fix frontend Network error: API_BASE now defaults to empty string (same-origin)
- Fix 3 files: api.ts, AuthContext.tsx, Dashboard.tsx
- Add Canvas 2D context mock in tests/setup.ts for jsdom
- Fix -0 vs +0 in ZoomPanController.getViewport()
- Add IntegrationWorkflow.test.ts (35 tests, full CAD workflow)
2026-06-26 17:48:24 +02:00
Leopoldadmin
89b91a1050
test: T29-T31 component tests (20) + frontend stresstest (7) + backend DB stresstest (6) with 50k elements
2026-06-26 16:20:09 +02:00
Leopoldadmin
1d6c2cb30e
feat: T27 AuthService DB session persistence - replace in-memory Map with SQLite sessions table
2026-06-26 14:55:38 +02:00
Leopoldadmin
04271d4cbd
ci: test webhook v4
2026-06-26 14:34:05 +02:00
Leopoldadmin
85c26b7826
ci: test webhook v3
2026-06-26 14:32:10 +02:00
Leopoldadmin
3876a22dd6
ci: test webhook pipeline v2
2026-06-26 14:28:02 +02:00
Leopoldadmin
b195858b12
ci: test webhook pipeline
2026-06-26 14:26:50 +02:00
Leopoldadmin
f853372c90
test: add Vitest setup with 115 tests (backend + frontend)
2026-06-26 14:19:50 +02:00
Leopoldadmin
19884b7b5d
fix: use Docker resolver for backend DNS in nginx.conf
2026-06-26 11:01:03 +02:00
Leopoldadmin
4ec76fe406
feat: initial commit web-cad-neu with docker-compose, frontend and backend
2026-06-26 10:50:24 +02:00