Skip to content

UX Feedback Loop - Visual Annotation System#130

Open
OBenner wants to merge 22 commits intodevelopfrom
auto-claude/199-integrate-ux-feedback-loop-into-prototype-developm
Open

UX Feedback Loop - Visual Annotation System#130
OBenner wants to merge 22 commits intodevelopfrom
auto-claude/199-integrate-ux-feedback-loop-into-prototype-developm

Conversation

@OBenner
Copy link
Owner

@OBenner OBenner commented Mar 5, 2026

This feature integrates a visual UX feedback loop into the Auto-Claude Electron application's development workflow. Based on the approach described in the Habr article (agentation-style visual annotation), developers will be able to annotate UI defects and gaps directly on the running prototype, with annotations automatically converted into actionable tasks/specs within the existing Auto-Claude pipeline. This eliminates friction between identifying UI issues and tracking them, accelerating the prototype-to-production workflow.

OBenner and others added 22 commits February 25, 2026 09:08
- Created apps/frontend/src/shared/types/annotation.ts with comprehensive annotation types
- Added AnnotationSeverity (low, medium, high, critical)
- Added AnnotationStatus (draft, submitted, processing, completed, failed)
- Added Annotation interface with screenshot, coordinates, description, severity
- Added AnnotationCoordinates, AnnotationViewport interfaces
- Added AnnotationFormData, AnnotationSubmissionResult types
- Added IPC-related types (AnnotationCreatePayload, AnnotationListResult, etc.)
- Added AnnotationStats for session statistics
- Updated types/index.ts to export annotation types
- Followed patterns from task.ts and other type files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add ANNOTATION_SUBMIT, ANNOTATION_GET, ANNOTATION_DELETE, and
ANNOTATION_LIST IPC channels for the UX feedback loop feature.
… clear actions

- Created annotation-store.ts following kanban-settings-store pattern
- Added state for isAnnotationMode, annotations array, and draftAnnotation
- Actions include:
  - toggleAnnotationMode/setAnnotationMode for mode control
  - createDraftAnnotation for starting new annotation
  - submitDraftAnnotation for completing annotation with form data
  - cancelDraftAnnotation for discarding draft
  - addAnnotation/updateAnnotation/deleteAnnotation for CRUD
  - clearAnnotations for resetting state
  - getAnnotation/getAnnotationsCountByStatus/getAnnotationsCountBySeverity for queries
- Includes localStorage persistence for annotation mode
- Validates coordinates (positive values, non-zero dimensions)
- Validates description (min 10 characters)
Created annotation-to-spec-service.ts with the following features:
- Converts visual UI annotations to Auto-Claude spec folder structure
- Generates spec.md with annotation details, severity, and screen context
- Generates requirements.json with annotation metadata
- Saves screenshot as PNG file from base64 data
- Validates annotation data (description length, coordinates, etc.)
- Creates folders in format: {id}-annotation-{slug}
- Follows existing patterns from project-store.ts and profile-service.ts
- Uses atomicWriteFile for safe file operations
- Handles edge cases and provides clear error messages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…e operations

- Created annotation-handlers.ts with IPC handlers for:
  - ANNOTATION_SUBMIT: Create annotation and optionally generate spec
  - ANNOTATION_GET: Get single annotation by ID
  - ANNOTATION_LIST: List annotations with optional filtering
  - ANNOTATION_DELETE: Delete annotation and optionally its generated spec

- Storage: Annotations persisted to JSON file in userData directory
- Integrated with AnnotationToSpecService for spec generation
- Added validation for annotation payloads
- Registered handlers in index.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added Zod schema for create_annotation_task with validation
- Added AnnotationTask interface
- Registered create_annotation_task tool in MCP server
- Implemented handler with rate limiting and IPC notification
- Updated tool count from 5 to 6

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Updated implementation_plan.json: subtask-4-2 status to completed
- Added detailed completion notes for create_annotation_task MCP tool
- Updated build-progress.txt with session 14 summary
- Overall progress: 7/16 subtasks completed (44%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ction

Created AnnotationOverlay component with click-drag selection functionality:
- Full-screen overlay that appears when annotation mode is active
- Click and drag to create selection rectangle with visual feedback
- Touch support for mobile/tablet devices
- Automatic screenshot capture using window.electronAPI.capture()
- Escape key cancels active selection
- Minimum selection size validation (20px)
- Crosshair cursor when active, hints for user guidance
- Creates draft annotation via store on selection complete
- Only renders in dev mode when annotation mode is enabled

Follows RateLimitModal.tsx patterns for code style, i18n usage, and error handling.
Follows ResizablePanels.tsx patterns for mouse/touch drag event handling.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… severity input

Created AnnotationForm component with:
- Dialog UI following FeedbackDialog.tsx pattern
- Screenshot preview with dimensions display
- Required description field with character count validation (min 10 chars)
- Severity selector (low, medium, high, critical) with color indicators
- Form validation with visual error feedback
- Loading state during submission
- Cancel support with isSubmitting guard
- i18n translation keys for all UI text
- Proper error handling with user-friendly messages
- Updated barrel export in annotations/index.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…annotations

Created AnnotationList.tsx following ChatHistorySidebar.tsx patterns:
- Display list of annotations grouped by status (draft/submitted/processing/completed/failed)
- Status filter dropdown with all status options
- Multi-select mode with SelectAll/Clear links and bulk delete
- Inline editing of annotation descriptions with textarea
- Screenshot thumbnail preview showing dimensions
- Severity indicator with color-coded badges (blue/yellow/orange/red)
- Delete confirmation dialogs (single and bulk with preview)
- Regenerate spec option for failed annotations
- Timestamp formatting with relative time (Just now, Xm ago, Xh ago, Xd ago)
- Proper i18n translation keys using annotationList:* namespace
- Error display for failed annotations
- Component and route metadata display
- Spec ID display for completed annotations
- Dropdown menu with Edit/Regenerate/Delete actions
- Loading state, empty state, and active annotation highlighting
- Keyboard navigation support (Enter/Space to select, Escape to cancel edit)

Exported via annotations/index.ts barrel. TypeScript compilation verified.
- Add toggle button for annotation mode
- Shows active state with visual indicator
- Uses MousePointer2 icon and tooltip
- Supports icon-only and text modes
- Only renders when wrapped in dev mode conditional
- Added 'annotation' section to en/common.json with English translations
- Added 'annotation' section to fr/common.json with French translations
- Includes keys for add, edit, delete, show/hide annotations
- Includes placeholder text and count keys with pluralization support
…dev-only rendering

- Add imports for AnnotationOverlay, AnnotationForm, AnnotationList, AnnotationToggle
- Add annotation store usage (isAnnotationMode, draftAnnotation, annotations, etc.)
- Add annotation state (annotationStatusFilter, isAnnotationListOpen)
- Add handler functions:
  - handleAnnotationSubmit - submits draft annotation with form data
  - handleAnnotationCancel - cancels draft annotation
  - handleAnnotationDelete - deletes annotation by ID
  - handleAnnotationEdit - updates annotation description
  - handleAnnotationRegenerate - re-submits failed annotation for spec regeneration
- Add dev-only annotation toolbar between project tabs and main content with:
  - "DEV TOOLS" label
  - AnnotationToggle button
  - "View Annotations" button with count
  - Active mode indicator with pulsing dot
- Add dev-only annotation components section:
  - AnnotationOverlay - visual selection when annotation mode is active
  - AnnotationForm - dialog when draft annotation exists
  - AnnotationList - dialog for viewing all annotations
- All annotation components wrapped with process.env.NODE_ENV === 'development' check
- Follows existing codebase patterns for dev-only conditional rendering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add createAnnotation and submitAnnotation methods to the preload script.
Methods integrate with existing annotation IPC handlers for UX feedback loop.
Fixes:
- Add annotation-form.test.tsx unit test for form validation, severity selection, and submission
- Add annotation-to-spec-service.test.ts unit test for spec generation and validation
- Fix lint warnings:
  - Prefix unused getMainWindow parameter with underscore in annotation-handlers.ts
  - Replace 'any' type with proper AnnotationStatus type in annotation-api.ts
  - Prefix unused getSeverityColorClass function with underscore in AnnotationForm.tsx
  - Add biome-ignore comment for intentional useEffect dependencies in AnnotationForm.tsx
  - Remove unused Input import from AnnotationList.tsx

Tests:
- annotation-form.test.tsx covers form validation, severity selection, submission flow
- annotation-to-spec-service.test.ts covers validation, spec generation, and CRUD operations

QA Fix Session: 1
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2026

Warning

Rate limit exceeded

@OBenner has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 26 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0de4cf1d-b409-4e88-8f2b-b3e991eb048f

📥 Commits

Reviewing files that changed from the base of the PR and between 426f7f6 and 362103f.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing (22)
  • apps/frontend/package.json
  • apps/frontend/src/main/__tests__/annotation-to-spec-service.test.ts
  • apps/frontend/src/main/ipc-handlers/annotation-handlers.ts
  • apps/frontend/src/main/ipc-handlers/index.ts
  • apps/frontend/src/main/mcp-server.ts
  • apps/frontend/src/main/services/annotation-to-spec-service.ts
  • apps/frontend/src/preload/api/annotation-api.ts
  • apps/frontend/src/preload/api/index.ts
  • apps/frontend/src/renderer/App.tsx
  • apps/frontend/src/renderer/components/__tests__/annotation-form.test.tsx
  • apps/frontend/src/renderer/components/annotations/AnnotationForm.tsx
  • apps/frontend/src/renderer/components/annotations/AnnotationList.tsx
  • apps/frontend/src/renderer/components/annotations/AnnotationOverlay.tsx
  • apps/frontend/src/renderer/components/annotations/AnnotationToggle.tsx
  • apps/frontend/src/renderer/components/annotations/index.ts
  • apps/frontend/src/renderer/components/annotations/types.ts
  • apps/frontend/src/renderer/stores/annotation-store.ts
  • apps/frontend/src/shared/constants/ipc.ts
  • apps/frontend/src/shared/i18n/locales/en/common.json
  • apps/frontend/src/shared/i18n/locales/fr/common.json
  • apps/frontend/src/shared/types/annotation.ts
  • apps/frontend/src/shared/types/index.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch auto-claude/199-integrate-ux-feedback-loop-into-prototype-developm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 5, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
4 Security Hotspots
5.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant