Edit button now opens the same "Nuova Misurazione" form pre-filled with
existing data, showing "Modifica Misurazione" title and "Aggiorna Misurazione"
button. Also adds marker_number to SubtaskUpdate schema so edits persist.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace drop-zone with action buttons (Sostituisci/Rimuovi) when image
exists, matching the task editor pattern. Add upload overlay with
spinner on the image during file upload.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Recipe image_path is now used as preview thumbnail only. Removed
auto-creation of "Technical Drawing" task from recipe upload, and
removed recipe image strip from task_execute view. Each task displays
its own file_path independently.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Canvas now sizes to match the scaled image dimensions (zero empty space)
instead of using a fixed aspect ratio, fixing coordinate mismatch between
editor and viewer
- Annotations load only after background image is ready via _pendingAnnotations
pattern, preventing placement at wrong coordinates
- Arrow endpoints (arrowX1/Y1/X2/Y2) update on object:modified using
transform delta, so moved arrows serialize at correct position
- Coordinate scaling on load: coordScale = currentImageScale / savedImageScale
handles annotations saved at different screen widths
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
In setMode('select'), explicitly set hasControls, hasBorders, and evented
on all objects. In drawing modes, disable selectable/evented to prevent
accidental interaction. Fixes controls only appearing on multi-select drag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove hasControls:false and lockScaling from markers so resize/rotate handles appear
- Add setActiveObject() after creating arrows and rectangles for immediate control visibility
- Restore angle, scaleX, scaleY when loading saved annotations (all object types)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Complete English translation catalog (44 entries fixed/added)
- Fix Fabric.js Group cache invalidation (active.dirty = true) so color,
thickness and line-dash changes are visible on selected markers/arrows
- Fix Italian .po placeholder mismatch (%(detail)s -> %(error)s)
- Bump annotation-editor.js cache buster to v8
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Browser was serving stale cached version without editor format
support (objects array). Bumped ?v=4 on all three templates:
recipe_preview, task_execute, task_editor.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add per-task file upload with image preview in task editor
- Add dedicated annotation editor page (task_drawing.html) with Fabric.js
- Add color picker, stroke width, and line dash controls to annotation toolbar
- Apply property changes to selected objects in real-time
- Disable style controls until a drawing tool or object is selected
- Remove zoom/pan from annotation toolbar (simplified UX)
- Auto-switch to select mode after placing annotation elements
- Show annotation overlay on task image previews (read-only canvas)
- Add file proxy route in measure blueprint for task file access
- Add file_path/file_type fields to TaskCreate/TaskUpdate Pydantic schemas
- Replace Tailwind CDN with compiled CSS (tailwind.config.js with full shades)
- Fix Alpine.js x-init crash: extract annotations JSON to <script> tags
(recipe_preview.html, task_execute.html) to avoid HTML attribute breakage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add file proxy route in maker blueprint (X-API-Key auth for browser requests)
- Persist file_path/annotations_json to DB via RecipeCreate/RecipeUpdate schemas
- Fix canvas sizing using grandparent container instead of Fabric.js wrapper div
- Defer canvas init with requestAnimationFrame for x-show timing
- Add PDF.js support in annotation-editor and annotation-viewer
- Fix annotations_json double-serialization (parse string to object before send)
- Handle FastAPI 422 validation error arrays in api_client and JS error display
- Update template URLs to use /maker/api/files/ proxy path
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix version badge showing [object Object] or Python dict dump in
select_recipe, task_list, and task_complete templates by accessing
current_version.version_number instead of the whole object
- Fix recipe_editor.html Internal Server Error caused by Jinja2 block
scoping: {% set %} variables from block content were invisible in
block extra_js, replaced with direct recipe.* references
- Fix task_editor.html SyntaxError from Italian apostrophe in
nell'eliminazione breaking JS string literals, switched to |tojson
- Add i18n {{ _() }} wrappers to all hardcoded navbar strings (desktop
and mobile menus) so language toggle works correctly
- Add app title text "TieMeasureFlow" next to logo in navbar
- Add missing GET /api/tasks/{task_id} endpoint on server that caused
405 Method Not Allowed when starting measurements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract JSON data to <script> tags instead of tojson_attr in x-data attributes
- Remove literal " from CSS selector in x-data (meta[name=csrf-token])
- Move Alpine.js defer script after extra_js block in base.html
- Add isinstance(resp, dict) guard before .get("error") in measure.py and maker.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add tojson_attr Jinja2 filter that escapes double quotes to "
for safe embedding in HTML attributes. The browser decodes entities
before Alpine.js evaluates, so JSON parses correctly.
Replaces |tojson with |tojson_attr in x-data attributes (select_recipe,
recipe_list, base flash messages). Script tag usages are unaffected.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>