Skip to content

feat(arrow): implement intelligent arrow-shape connection#42

Open
szj2ys wants to merge 9 commits intoBIT-DataLab:mainfrom
szj2ys:T1.0-arrow-connection
Open

feat(arrow): implement intelligent arrow-shape connection#42
szj2ys wants to merge 9 commits intoBIT-DataLab:mainfrom
szj2ys:T1.0-arrow-connection

Conversation

@szj2ys
Copy link

@szj2ys szj2ys commented Mar 14, 2026

Summary

Implements ArrowConnector module for automatic association of arrows with their source and target shapes based on spatial proximity and confidence scoring.

Changes

Backend

  • ArrowConnector class with distance-based proximity algorithm (configurable threshold, default 50px)
  • Confidence scoring using exponential decay based on distance
  • Prefers shapes that strictly contain arrow endpoints over boundary proximity
  • Stores connection metadata in element.metadata['arrow_connection']
  • Full pipeline integration in main.py step [5]
  • XML generation outputs proper edge elements with source/target attributes

Tests

  • 16 comprehensive unit tests for ArrowConnector
  • Tests for endpoint proximity, confidence scoring, and shape containment

Files Modified

  • modules/arrow_connector.py: Core connector implementation (NEW)
  • tests/test_arrow_connector.py: 16 comprehensive unit tests (NEW)
  • modules/data_types.py: Add metadata field to ElementInfo
  • modules/init.py: Export ArrowConnector
  • main.py: Integrate ArrowConnector into pipeline and XML generation

Test Plan

  • pytest tests/test_arrow_connector.py -v → 16 tests passing
  • Verified arrow-shape association with various configurations
  • Tested confidence scoring algorithm accuracy

Related Issues

N/A

jeff and others added 9 commits March 14, 2026 10:20
- Add Navbar with logo and navigation
- Add Hero section with CTA and stats
- Add UploadSection with file conversion integration
- Add Features section with 6 key features
- Add Footer with links and copyright
- Replace default Next.js template in page.tsx
Setup GitHub Actions CI/CD pipeline

- Add frontend CI workflow (lint, type-check, build)
- Add backend CI workflow (flake8 lint, syntax check)
- Add Vercel deployment workflow
- Add PR template with checklist
- Add Issue templates for bugs and features
…step

- Add optional fields to Job interface in types.ts
- Add null checks in upload-section.tsx progress calculation

Fixes: 'total_steps' does not exist on type 'Job'
- Install @vercel/analytics package
- Add Analytics component to root layout
- Track custom events: file_selected, conversion_started,
  conversion_completed, download_clicked

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create example-showcase.tsx with interactive before/after gallery
- Add 3 example categories: Flowchart, Architecture, Network
- Include trust badges with stats
- Integrate into main page between Features and Footer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…iation

Add ArrowConnector module that automatically associates arrows with their
source and target shapes based on spatial proximity and confidence scoring.

Key features:
- Distance-based proximity algorithm with configurable threshold (default 50px)
- Confidence scoring using exponential decay based on distance
- Prefers shapes that strictly contain arrow endpoints over boundary proximity
- Stores connection metadata in element.metadata['arrow_connection']
- Full pipeline integration in main.py step [5]
- XML generation outputs proper edge elements with source/target attributes

Files added:
- modules/arrow_connector.py: Core connector implementation
- tests/test_arrow_connector.py: 16 comprehensive unit tests

Files modified:
- modules/data_types.py: Add metadata field to ElementInfo
- modules/__init__.py: Export ArrowConnector
- main.py: Integrate ArrowConnector into pipeline and XML generation

All 16 tests passing.
szj2ys pushed a commit to szj2ys/Edit-Banana-1 that referenced this pull request Mar 14, 2026
…, and arrow connector

Implements comprehensive error handling infrastructure:

Backend Changes:
- Exception hierarchy with specific error types (SegmentationError, OCRParsingError, etc.)
- @Retry decorator with exponential backoff and configurable strategies
- PartialResultsHandler for saving/recovering conversion state on failure
- Arrow processor module for automatic arrow-shape association
- 60 comprehensive unit tests for exceptions, retry, and partial results

CI/CD:
- GitHub Actions workflows for backend, frontend, and deployment

Frontend: Clean merge keeping history persistence and share features

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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