{"id":46069343,"url":"https://github.com/chidcgithub/pyvizast","last_synced_at":"2026-03-14T15:52:48.775Z","repository":{"id":341308894,"uuid":"1169289732","full_name":"ChidcGithub/PyVizAST","owner":"ChidcGithub","description":"A Python AST visualizer \u0026 static analyzer.","archived":false,"fork":false,"pushed_at":"2026-03-01T04:09:36.000Z","size":269,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-01T05:54:03.724Z","etag":null,"topics":["ast","ci-cd","code-analysis","code-smells","d3js","debugging","developer-tools","devops","fastapi","hacktoberfest","parser","python","refactoring","syntax-tree","syntax-tree-visualizer","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChidcGithub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-28T13:12:24.000Z","updated_at":"2026-03-01T05:21:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ChidcGithub/PyVizAST","commit_stats":null,"previous_names":["chidcgithub/pyvizast"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ChidcGithub/PyVizAST","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChidcGithub%2FPyVizAST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChidcGithub%2FPyVizAST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChidcGithub%2FPyVizAST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChidcGithub%2FPyVizAST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChidcGithub","download_url":"https://codeload.github.com/ChidcGithub/PyVizAST/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChidcGithub%2FPyVizAST/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29969700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T12:56:10.327Z","status":"ssl_error","status_checked_at":"2026-03-01T12:55:24.744Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","ci-cd","code-analysis","code-smells","d3js","debugging","developer-tools","devops","fastapi","hacktoberfest","parser","python","refactoring","syntax-tree","syntax-tree-visualizer","visualization"],"created_at":"2026-03-01T13:00:58.528Z","updated_at":"2026-03-14T15:52:48.764Z","avatar_url":"https://github.com/ChidcGithub.png","language":"Python","readme":"```\n\n ________  ___    ___ ___      ___ ___  ________  ________  ________  _________   \n|\\   __  \\|\\  \\  /  /|\\  \\    /  /|\\  \\|\\_____  \\|\\   __  \\|\\   ____\\|\\___   ___\\ \n\\ \\  \\|\\  \\ \\  \\/  / | \\  \\  /  / | \\  \\\\|___/  /\\ \\  \\|\\  \\ \\  \\___|\\|___ \\  \\_| \n \\ \\   ____\\ \\    / / \\ \\  \\/  / / \\ \\  \\   /  / /\\ \\   __  \\ \\_____  \\   \\ \\  \\  \n  \\ \\  \\___|\\/  /  /   \\ \\    / /   \\ \\  \\ /  /_/__\\ \\  \\ \\  \\|____|\\  \\   \\ \\  \\ \n   \\ \\__\\ __/  / /      \\ \\__/ /     \\ \\__\\\\________\\ \\__\\ \\__\\____\\_\\  \\   \\ \\__\\\n    \\|__||\\___/ /        \\|__|/       \\|__|\\|_______|\\|__|\\|__|\\_________\\   \\|__|\n         \\|___|/                                              \\|_________|        \n\n```\n\n# PyVizAST\n\n[![Version](https://img.shields.io/badge/Version-0.7.1-blue.svg)](https://github.com/ChidcGithub/PyVizAST)\n[![Python](https://img.shields.io/badge/Python-3.8%2B-brightgreen.svg)](https://www.python.org/)\n[![License](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](LICENSE)\n[![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg)](https://github.com/ChidcGithub/PyVizAST)\n[![Status](https://img.shields.io/badge/Status-stable-brightgreen.svg)](https://github.com/ChidcGithub/PyVizAST)\n![CI Build Status](https://github.com/ChidcGithub/PyVizAST/actions/workflows/ci.yml/badge.svg)\n\nA Python AST Visualizer \u0026 Static Analyzer that transforms code into interactive graphs. Detect complexity, performance bottlenecks, and code smells with actionable refactoring suggestions.\n\n## Features\n\n### Code Parsing \u0026 Visualization Engine\n- Parse Python source code into Abstract Syntax Tree (AST) using Python's `ast` module\n- Map AST nodes to interactive visual elements with distinct colors and shapes\n- Multiple layout algorithms: hierarchical (dagre), force-directed (fcose), breadth-first\n- Detail level control: overview, normal, and detail modes for large codebases\n- Auto-simplification for files with many nodes to prevent performance issues\n- Zoom, pan, and click-to-inspect node details\n\n### Intelligent Analysis Layer\n- **Complexity Analysis**: Cyclomatic complexity, cognitive complexity, maintainability index, Halstead metrics\n- **Performance Hotspot Detection**: Nested loops, recursion depth, inefficient dictionary/list operations\n- **Code Smell Detection**: Long functions, god classes, duplicate code blocks, deep nesting\n- **Security Scanning**: SQL injection risks, unsafe deserialization, hardcoded secrets, dangerous function calls\n\n### Optimization Suggestion Engine\n- Rule-based refactoring suggestions with specific recommendations\n- Auto-fix capability for certain issues (generates unified diff patches)\n- Before/after code comparison with estimated performance improvement\n\n### Interactive Learning Mode\n- **Code Anatomy**: Highlight execution flow of specific algorithms\n- **Beginner Mode**: Display Python documentation when hovering over AST nodes\n- **Challenge Mode**: Identify performance issues in provided code samples\n\n### Easter Egg\n- Just explore the project and you'll find it :)\n\n## Architecture\n\n```\nPyVizAST/\n├── backend/                 # FastAPI backend\n│   ├── ast_parser/         # AST parsing and visualization mapping\n│   ├── analyzers/          # Complexity, performance, security analyzers\n│   ├── optimizers/         # Suggestion engine and patch generator\n│   └── models/             # Pydantic data models\n├── frontend/               # React frontend\n│   └── src/\n│       ├── components/     # UI components\n│       └── api.js          # API client\n└── requirements.txt        # Python dependencies\n```\n\n## Technology Stack\n\n**Backend:**\n- FastAPI\n- Python `ast` module\n- radon (complexity analysis)\n\n**Frontend:**\n- React 18\n- Cytoscape.js (graph visualization)\n- Monaco Editor (code editor)\n\n## Installation\n\n### Prerequisites\n- Python 3.8+\n- Node.js 18+ (optional, for frontend)\n\n### Quick Start\n\n**Windows:**\n```batch\nstart.bat\n```\n\n**Linux/macOS:**\n```bash\nchmod +x start.sh\n./start.sh\n```\n\n**PowerShell:**\n```powershell\n.\\start.ps1\n```\n\n**Manual Installation:**\n```bash\n# Install backend dependencies\npip install -r requirements.txt\n\n# Install frontend dependencies (optional)\ncd frontend \u0026\u0026 npm install\n\n# Start backend\npython -m uvicorn backend.main:app --host 0.0.0.0 --port 8000\n\n# Start frontend (in another terminal)\ncd frontend \u0026\u0026 npm start\n```\n\n## Usage\n\n1. Open `http://localhost:3000` in your browser\n2. Enter or paste Python code in the editor\n3. Click \"Analyze\" to parse and visualize\n4. Explore the AST graph and analysis results\n\n## API Documentation\n\nAccess the interactive API documentation at `http://localhost:8000/docs`\n\n### Key Endpoints\n\n| Endpoint                    | Method | Description                      |\n|-----------------------------|--------|----------------------------------|\n| `/api/analyze`              | POST   | Full code analysis               |\n| `/api/ast`                  | POST   | Get AST graph structure          |\n| `/api/complexity`           | POST   | Complexity metrics               |\n| `/api/performance`          | POST   | Performance hotspots             |\n| `/api/security`             | POST   | Security vulnerabilities         |\n| `/api/suggestions`          | POST   | Optimization suggestions         |\n| `/api/patches`              | POST   | Generate auto-fix patches        |\n| `/api/apply-patch`          | POST   | Apply a patch to code            |\n| `/api/health`               | GET    | Server health check              |\n| `/api/project/analyze`      | POST   | Full project analysis (ZIP)      |\n| `/api/progress/{task_id}`   | GET    | Get task progress                |\n| `/api/progress/{task_id}/stream` | GET | SSE progress stream           |\n| `/api/challenges`           | GET    | List code challenges             |\n| `/api/challenges/categories`| GET    | Get challenge categories         |\n| `/api/challenges/{id}`      | GET    | Get challenge details            |\n| `/api/challenges/submit`    | POST   | Submit challenge answer          |\n| `/api/learn/node/{node_id}` | POST   | Get AST node explanation         |\n\n## Example Analysis\n\n```python\n# Sample code with performance issues\ndef find_duplicates(arr):\n    duplicates = []\n    for i in range(len(arr)):\n        for j in range(len(arr)):\n            if i != j and arr[i] == arr[j]:\n                if arr[i] not in duplicates:  # O(n) lookup\n                    duplicates.append(arr[i])\n    return duplicates\n```\n\n**Detected Issues:**\n- Nested loops: O(n^2) complexity\n- List membership check in loop: O(n) per check\n\n**Suggested Fix:**\n```python\ndef find_duplicates(arr):\n    seen = set()\n    duplicates = set()\n    for item in arr:\n        if item in seen:\n            duplicates.add(item)\n        seen.add(item)\n    return list(duplicates)  # O(n) total complexity\n```\n\n## Configuration\n\nAnalysis thresholds can be configured in `backend/analyzers/`:\n\n- `complexity.py`: Complexity thresholds\n- `code_smells.py`: Code smell detection thresholds\n- `security.py`: Security check patterns\n\n## Development\n\n```bash\n# Run backend in development mode\nuvicorn backend.main:app --reload\n\n# Run frontend in development mode\ncd frontend \u0026\u0026 npm start\n```\n\n## License\n\nGNU General Public License v3.0\n\n## Contributing\n\nContributions are welcome. Please submit pull requests to the main repository.\n\n---\n\n\u003cdetails\u003e\n\n\u003csummary\u003eVersion History\u003c/summary\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.7.1 (2026-03-14)\u003c/summary\u003e\n\n**Social Card Generator \u0026 UI Improvements**\n\n**New Features:**\n- **Social Card Generator**: Generate shareable image cards from the Share dropdown\n  - Brand card with AST visualization, logo, and feature highlights\n  - 2D Preview card with captured AST visualization\n  - 3D Preview card with captured 3D AST visualization\n  - Black/white theme adaptation\n  - PNG download (1200x630px standard social share size)\n\n**Toast System Improvements:**\n- Toast position moved to top-right of screen\n- Simplified vertical stacking (removed complex stacking logic)\n- Increased maximum toast limit from 5 to 15\n- Increased border-radius from 16px to 24px for rounder corners\n\n**UI Enhancements:**\n- Share button now shows dropdown menu with \"Share Code\" and \"Social Card\" options\n- Visualizer components expose `captureScreenshot` method for card generation\n- Improved card preview modal with style selector\n\n**Known Issues:**\n- Social Card export may be unstable in certain browsers/conditions\n- 3D visualization capture requires the 3D view to be fully rendered\n\n**Files Modified:**\n- `frontend/src/components/SocialCardGenerator.js` - New social card generator component\n- `frontend/src/components/Header.js` - Share dropdown menu\n- `frontend/src/components/Toast.js` - Simplified toast system\n- `frontend/src/components/ToastContext.js` - Increased toast limit\n- `frontend/src/App.js` - Screenshot capture handlers\n- `frontend/src/App.css` - Social card styles, toast improvements\n- `frontend/src/components/ASTVisualizer.js` - Screenshot capture method\n- `frontend/src/components/ASTVisualizer3D.js` - Screenshot capture method\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.7.0 (2026-03-14)\u003c/summary\u003e\n\n**Major Release - Dependencies Upgrade \u0026 3D Gesture Control**\n\n**Dependencies Upgrade:**\n- React 18 → React 19.2.4\n- @react-three/fiber 8 → 9.5.0\n- @react-three/drei 9 → 10.7.7\n- framer-motion 11 → 12.36.0\n- three 0.160 → 0.183.2\n- cytoscape-react 3 → 4.0.0\n- All other dependencies updated to latest versions\n\n**3D Gesture Control:**\n- Implemented pointing gesture for 3D AST visualization\n- Virtual cursor with dot, ring, progress ring, and snap indicator\n- 3D-to-screen coordinate projection using Three.js camera\n- Node snapping with smooth animation\n- Hover progress for auto-selection (800ms dwell time)\n- Camera focus on selected nodes\n\n**Virtual Cursor System:**\n- Unified state management with `cursorStateRef`\n- Smooth position interpolation (0.25 factor for cursor, 0.35 for snap)\n- GPU-accelerated transforms for better performance\n- Theme-aware CSS variables for cursor colors\n- Separate CSS classes for 2D (`cursor-snap`) and 3D (`cursor-snap-3d`)\n\n**Light Mode Fixes:**\n- Fixed `.detail-tag.scope` and `.detail-tag.callable` using white transparency\n- Fixed `.relationship-tag.inheritance/derived/method` theme compatibility\n- Fixed `.highlighted-line` background color\n- Fixed `.warning-dismiss:hover` background\n- Fixed `@keyframes searchPulse` with theme-aware `--pulse-color` variable\n\n**Bug Fixes:**\n- Fixed cursor dot/ring centering (offset calculations: 10px→-5, 44px→-22)\n- Fixed CSS animation conflicting with JS transform positioning\n- Fixed 3D node projection coordinate system issues\n- Fixed container reference binding for correct cursor positioning\n\n**Files Modified:**\n- `frontend/package.json` - Dependencies upgrade\n- `frontend/src/components/ASTVisualizer3D.js` - 3D gesture control implementation\n- `frontend/src/components/components.css` - Cursor styles, light mode fixes\n- `frontend/src/App.js` - Gesture handling\n- `backend/main.py` - Version bump\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.7.0-rc3 (2026-03-13)\u003c/summary\u003e\n\n**Bug Fixes \u0026 Performance Optimizations**\n\n**Backend Fixes:**\n- Fixed async sync blocking in `projects.py`: Added `run_in_executor` for file I/O and AST parsing operations\n- Fixed incomplete exception handling in `parser.py`: Added `MemoryError` catch with smart truncation\n- Fixed redundant AST traversal in `node_builder.py`: Combined 3 separate `ast.walk` calls into single pass for 3x performance improvement\n- Fixed lint errors (F541, F821, F401) across multiple files\n\n**Frontend Improvements:**\n- Enhanced `CodeEditor.js` for large file performance:\n  - Disabled minimap for files \u003e 3000 lines\n  - Disabled folding for files \u003e 5000 lines\n  - Added performance warning banner for large files\n  - Improved memory management for very large files\n- Confirmed proper cleanup in `useResizeObserver.js`, `GestureService.js`, and `ASTVisualizer3D.js`\n\n**Performance:**\n- `node_builder.py`: `_count_code_elements()` now does single traversal instead of 3\n- Reduced memory usage for large file editing\n- Better error handling for edge cases\n\n**Files Modified:**\n- `backend/routers/projects.py` - Async file operations\n- `backend/ast_parser/parser.py` - MemoryError handling\n- `backend/ast_parser/node_builder.py` - Performance optimization\n- `frontend/src/components/CodeEditor.js` - Large file handling\n- `frontend/src/components/components.css` - Performance warning styles\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.7.0-rc2 (2026-03-13)\u003c/summary\u003e\n\n**Virtual Cursor System Rewrite**\n\n**Complete Refactor:**\n- Unified state management: Single `cursorStateRef` object instead of multiple states\n- Smooth position interpolation with `CURSOR_SMOOTH` and `SNAP_SMOOTH` factors\n- CSS variables for theme support (`--cursor-bg`, `--cursor-border`, etc.)\n- Cleaner class naming: `cursor-dot`, `cursor-ring`, `cursor-progress`, `cursor-snap`\n\n**Snap Animation:**\n- Smooth snap indicator following with separate smooth factor (0.2)\n- First snap initializes position immediately to avoid delay\n- Snap indicator now correctly follows node center position\n\n**Performance Optimizations:**\n- CSS `transform` instead of `left/top` for GPU acceleration\n- Use `node.renderedPosition()` for accurate screen coordinates\n- `opacity` transitions instead of `display` for smoother animations\n- CSS `will-change` for optimized rendering\n\n**Bug Fixes:**\n- Fixed CSS animation conflicting with JS position (use margin centering)\n- Fixed snap position using `renderedPosition()` instead of manual calculation\n- Fixed snap selecting wrong node (distance squared comparison bug)\n- Added validation for `renderedPosition()` return values\n\n**Files Modified:**\n- `frontend/src/components/ASTVisualizer.js` - Complete cursor system rewrite\n- `frontend/src/components/components.css` - CSS variables, simplified animations\n- `frontend/src/App.js` - Removed unused GestureType import\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.7.0-rc1 (2026-03-13)\u003c/summary\u003e\n\n**Code Quality \u0026 Bug Fixes**\n\n**Logging Improvements:**\n- Upgraded debug logs to warning level for error conditions in project analyzer\n- `scanner.py`: File read failures now logged at warning level\n- `unused_exports.py`: Module analysis failures now logged at warning level\n- `cycle_detector.py`: Improved SCC cycle extraction with better error handling\n\n**Frontend Improvements:**\n- `ASTVisualizer.js`: Added `removeAllListeners()` before destroy to prevent memory leaks\n- Changed debug logs to warning logs for Cytoscape cleanup errors\n- `useResizeObserver.js`: Changed console.debug to console.warn for better error visibility\n\n**Files Modified:**\n- `backend/project_analyzer/cycle_detector.py` - Improved cycle detection logging\n- `backend/project_analyzer/scanner.py` - Upgraded log levels\n- `backend/project_analyzer/unused_exports.py` - Upgraded log levels\n- `frontend/src/components/ASTVisualizer.js` - Memory leak prevention\n- `frontend/src/hooks/useResizeObserver.js` - Improved error handling\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.7.0-beta2 (2026-03-12)\u003c/summary\u003e\n\n**Gesture Control Improvements**\n\n**Stability Enhancements:**\n- Added gesture stability filter: requires 5 consecutive frames with same gesture\n- Raised confidence threshold from 0.5 to 0.7\n- Added 300ms cooldown period between gesture changes\n- Fast reset when hand leaves frame (immediate instead of waiting 5 frames)\n- Position tracking continues during cooldown for smooth UX\n\n**Simplified Gesture Set (4 core gestures + pinch):**\n- **Thumb Up**: Zoom in\n- **Thumb Down**: Zoom out\n- **Closed Fist**: Pan mode\n- **Open Palm**: Reset view\n- **Victory (V sign)**: Select node\n- **Pointing Up**: Point-to-select with hover progress\n- **Two Hands Pinch**: Pinch to zoom\n\n**Point-to-Select Feature:**\n- Virtual cursor appears on AST graph when pointing\n- Hover over a node for 2 seconds to auto-select\n- Progress ring animation shows selection countdown\n- X-axis mirrored to match video preview\n\n**Bug Fixes:**\n- Fixed undefined GestureType references (POINTING_UP, VICTORY)\n- Fixed callback cleanup on component unmount\n- Fixed cooldown visual feedback timing\n\n**Files Modified:**\n- `frontend/src/utils/GestureService.js` - Stability filtering, cooldown, pointing direction\n- `frontend/src/components/GestureControl.js` - Removed unused icons, added pointing callback\n- `frontend/src/components/GestureControl.css` - Cooldown styling\n- `frontend/src/utils/logger.js` - Browser safety checks\n- `frontend/src/components/ASTVisualizer.js` - Pointing cursor, hover detection, progress ring\n- `frontend/src/components/components.css` - Pointing cursor styling\n- `frontend/src/App.js` - Pointing direction handling\n- `backend/analyzers/security.py` - Expanded secret detection (25+ patterns)\n- `backend/project_analyzer/scanner.py` - ZIP path validation\n- `frontend/public/index.html` - Title updated to \"PyVisAST\"\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.7.0-beta (2026-03-11)\u003c/summary\u003e\n\n**New Feature: Webcam Gesture Control**\n\nHand gesture recognition for 2D/3D AST visualization control using MediaPipe.\n\n**Supported Gestures:**\n- **Thumb Up**: Zoom in\n- **Thumb Down**: Zoom out\n- **Closed Fist**: Pan mode (grab and drag)\n- **Open Palm**: Quick tap = select, Hold = reset view\n- **Pointing Up**: Select node\n- **Victory (V sign)**: Rotate mode\n- **Two Hands Pinch**: Pinch to zoom, move both hands to pan\n\n**Components:**\n- `GestureService.js`: Core gesture recognition service using MediaPipe GestureRecognizer\n- `GestureControl.js`: UI component with camera preview, status indicator, gesture guide\n- `GestureControl.css`: Styling for gesture control overlay\n\n**Features:**\n- Toggle button in header (default OFF)\n- Real-time camera preview with gesture overlay\n- Status indicator (loading/ready/running/error/stopped)\n- Visual gesture guide with action mappings\n- Support for both 2D (Cytoscape) and 3D (Three.js) visualizations\n\n**Dependencies:**\n- Added `@mediapipe/tasks-vision` for gesture recognition\n\n**Known Issues:**\n- Gesture recognition may be unstable in certain lighting conditions\n- Future improvements planned: stability filtering, confidence threshold adjustment, gesture cooldown\n\n**Files Added:**\n- `frontend/src/utils/GestureService.js`\n- `frontend/src/components/GestureControl.js`\n- `frontend/src/components/GestureControl.css`\n\n**Files Modified:**\n- `frontend/src/components/Header.js` - Added gesture toggle button\n- `frontend/src/App.js` - Added gesture state management\n- `frontend/src/components/ASTVisualizer.js` - Added gesture handling for 2D\n- `frontend/src/components/ASTVisualizer3D.js` - Added gesture handling for 3D\n- `frontend/package.json` - Added MediaPipe dependency\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003ev0.6.3 (2026-03-10)\u003c/summary\u003e\n\n**Bug Fixes \u0026 Security Improvements**\n\n**Bug Fixes:**\n- Fixed CI installation failure in GitHub Actions workflow\n  - Changed from `pip install git+https://...` to local `pip install -r requirements.txt`\n  - Project doesn't have setup.py, so git install was failing\n\n**Security Improvements:**\n- Enhanced path traversal detection in security analyzer\n  - Added detection for path construction with format strings\n  - Added detection for str.join() with path separators\n  - Added detection for f-string path construction\n  - Improved os.path.join user input validation warnings\n\n**Documentation:**\n- Updated Node.js requirement to 18+ (matching CI configuration)\n\n**Files Modified:**\n- `.github/workflows/analyze.yml` - Fixed CI installation\n- `backend/analyzers/security.py` - Enhanced path traversal checks\n- `backend/main.py` - Version bump to 0.6.3\n- `frontend/package.json` - Version bump to 0.6.3\n- `README.md` - Version badge and changelog update\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003ev0.6.2 (2026-03-10)\u003c/summary\u003e\n\n**UX Improvements \u0026 Bug Fixes**\n\n**New Features:**\n- **Toast Notification System**: Added toast notifications for user feedback\n  - Success/error states with appropriate icons\n  - Auto-dismiss after 3 seconds\n  - Smooth slide-in/fade-out animations\n- **Search Loading Indicator**: Added loading spinner during AST node search\n  - Debounced search with 200ms delay\n  - Visual feedback while searching\n- **Format Code Button**: Added code formatting functionality in Monaco Editor\n  - One-click code formatting using Monaco's built-in formatter\n\n**Bug Fixes:**\n- Fixed API version inconsistency (root endpoint now returns correct version)\n- Fixed copy link failure with no user feedback\n- Added proper error handling for clipboard operations\n\n**Code Quality:**\n- Enhanced user feedback for all operations\n- Improved error states and loading indicators\n\n**Files Modified:**\n- `backend/main.py` - API version fix\n- `frontend/src/App.js` - Toast notification system\n- `frontend/src/App.css` - Toast styles\n- `frontend/src/components/ASTVisualizer.js` - Search loading state\n- `frontend/src/components/components.css` - Search loading styles\n- `frontend/src/components/CodeEditor.js` - Format Code functionality\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003ev0.6.1 (2026-03-09)\u003c/summary\u003e\n\n\n\n**Bug Fixes \u0026 Code Quality Improvements**\n\n\n\n**Backend Fixes:**\n\n- Fixed custom exception classes: Added `__init__`, `__str__` methods, error codes, and default messages for `AnalysisError`, `CodeParsingError`, `CodeTooLargeError`, `ResourceNotFoundError`\n\n- Fixed `_parse_patch_hunks` line index counter initialization issue in `patches.py`\n\n- Enhanced `_notify_listeners` error handling in `progress.py` - replaced `pass` with proper error logging\n\n- Improved exception handling in `performance.py` - added logging for caught exceptions\n\n\n\n**Frontend Fixes:**\n\n- Fixed `CodeEditor` not supporting `readOnly` prop - Monaco Editor now properly receives the `readOnly` option\n\n- Unified logging system: Replaced all `console.log/error/warn` with structured `logger` utility\n\n- Files updated: `api.js`, `PatchPanel.js`, `ChallengeView.js`, `LearnView.js`, `AnalysisPanel.js`, `ProjectAnalysisView.js`, `ProjectVisualization.js`, `ASTVisualizer.js`, `ASTVisualizer3D.js`, `ErrorBoundary.js`, `App.js`\n\n\n\n**Code Quality:**\n\n- 36 console statements replaced with structured logging\n\n- Frontend errors now batch-sent to backend for persistence\n\n- Better error filtering (ignoring ResizeObserver benign errors)\n\n- Development/production environment logging support\n\n\n\n**Files Modified:**\n\n- `backend/main.py` - Exception class implementations\n\n- `backend/optimizers/patches.py` - Line index counter fix\n\n- `backend/utils/progress.py` - Error logging\n\n- `backend/analyzers/performance.py` - Exception logging\n\n- `frontend/src/components/CodeEditor.js` - readOnly prop support\n\n- `frontend/src/components/*.js` - Logger integration\n\n\n\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\n\u003csummary\u003ev0.6.0 (2026-03-09)\u003c/summary\u003e\n\n**Enhanced Backend Code Relationship Analysis \u0026 Frontend Sync**\n\n**Backend Enhancements:**\n- Add class inheritance analysis (`base_classes`, `derived_classes`, `inheritance_depth`)\n- Add method relationship tracking (`methods`, `inherited_methods`, `overridden_methods`)\n- Add decorator relationships (`decorators`, `decorated_by`, `decorates`)\n- Enhance function call relationships (`calls_to`, `called_by`)\n- Add scope nesting tracking (`nested_scopes`, `enclosing_scope_id`, `scope_level`)\n- Add variable definition/use tracking (`variables_defined`, `variables_used`)\n- Add code pattern statistics (`branch_count`, `loop_count`, `exception_handlers`)\n- Add code relationship types (`CodeRelationship`)\n\n**Frontend Synchronization:**\n- `ASTVisualizer.js` displays new relationship information\n- `components.css` adds relationship label styles (inheritance, decorator, call, pattern, etc.)\n- Supports displaying inheritance relationships, decorators, call relationships, code patterns, etc.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.5.1 (2026-03-08)\u003c/summary\u003e\n\n**UI/UX Improvements:**\n- Premium card design with micro-texture effects:\n  - Subtle radial gradients and top light strips\n  - KPI cards with large primary values (32px/700 weight)\n  - Secondary info dimmed with `text-muted` color\n  - Status color borders (success/warning/error indicators)\n- Enhanced table styling with zebra striping\n- Refined button system with gradient backgrounds and hover effects\n- Improved shadow and border consistency across all components\n\n**Error Handling Overhaul:**\n- Backend returns detailed, user-friendly error messages:\n  - Error type classification (TypeError, AttributeError, etc.)\n  - Specific suggestions for common issues\n  - Recursion/Memory error handling with clear guidance\n- Frontend displays structured error panels:\n  - Error icon, title, and detailed message\n  - Helpful tips for resolution\n- AST parser robustness:\n  - Graceful handling of unexpected node types\n  - Fallback nodes for unparseable structures\n  - None value filtering in all `.join()` operations\n\n**Bug Fixes:**\n- Fixed `TypeError: sequence item 0: expected str instance, NoneType found`\n- Fixed all `.join()` operations to filter None values\n- Fixed node creation errors causing analysis crashes\n- Fixed ESLint warnings in frontend components\n\n**Files Updated:**\n- `AnalysisPanel.css`, `components.css`, `App.css` - UI polish\n- `ProjectAnalysisView.css`, `LearnChallenge.css` - Layout refinements\n- `parser.py` - Error handling and None filtering\n- `main.py` - Enhanced exception handlers\n- `api.js`, `App.js` - Frontend error display\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.5.0 (2026-03-07)\u003c/summary\u003e\n\n**Enhanced Node Details:**\n- Backend extracts comprehensive node information:\n  - Code metrics: line count, character count, indent level\n  - Structure info: child count, total descendants, depth, scope name\n  - Type annotations: return type, parameter types, default values\n  - Function details: local variable count, call count, async/generator flags\n  - Class details: method count, attribute count, inheritance info\n  - Code patterns: try/except, loop, recursion detection\n- Frontend displays all new information in organized sections\n\n**Detail Panel Improvements:**\n- Expandable panel with enlarge/collapse buttons\n- Close button to dismiss panel\n- Expanded mode shows more comfortable spacing and larger fonts\n- Clickable tags for navigation:\n  - \"children\" tag navigates to first child node\n  - \"in [scope]\" tag navigates to parent scope\n  - Function calls in \"Calls\" section navigate to corresponding nodes\n\n**3D Layout Options:**\n- **Tree Layout**: Clean hierarchical tree structure (default)\n- **Grouped Layout**: Nodes grouped by scope in circular arrangements\n- **Force Layout**: Optimized force-directed algorithm with level constraints\n- New \"Minimal\" detail level: shows only functions and classes\n\n**Bug Fixes:**\n- Fixed detail panel not un-dimming when clicking search result\n- Fixed search result hover state not cleared on search close\n\n**Backend Optimizations:**\n- Improved AST parsing with more attribute extraction\n- Enhanced node mapper to include all new fields\n- Added helper functions for type annotations and code patterns\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.5.0-pre.2 (2026-03-07)\u003c/summary\u003e\n\n**3D Visualization Improvements:**\n- Signal particle theme adaptation: white in dark mode, black in light mode\n- Node detail panel icon theme adaptation\n- Signal edge colors adapt to theme\n- Search result hover now dims the node detail panel\n\n**Search Panel UX:**\n- When hovering search results, the panel background becomes transparent\n- Non-hovered results fade to 20% opacity\n- Node detail panel also fades when search result is hovered (JavaScript-based)\n\n**Bug Fixes:**\n- Fixed CSS `:has()` selector not working for cross-element opacity control\n- Fixed animation `opacity` override issue with `!important`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.5.0-pre (2026-03-07)\u003c/summary\u003e\n\n**New Features:**\n- **Easter Egg**: Hidden surprise!\n- **Progress Tracking**: Real-time progress display for large project analysis\n  - SSE-based progress streaming with percentage and current stage\n  - Shows current file being analyzed and file count progress\n  - Loading overlay with animated progress bar\n- **Code Sharing**: Share code snippets via URL\n  - Base64 encoded code in URL hash parameter\n  - One-click copy share link\n  - Auto-restore code from URL on page load\n- **Theme Switching**: Enhanced dark/light theme toggle\n  - Prominent toggle switch in header\n  - Theme preference saved to localStorage\n  - Moon icon turns black in light mode for visibility\n- **Export Reports**: Export analysis results\n  - HTML report with styled analysis summary\n  - JSON export for raw analysis data\n\n**Backend Improvements:**\n- New progress tracking module (`backend/utils/progress.py`)\n- SSE endpoint for real-time progress updates (`/api/progress/{task_id}/stream`)\n- Enhanced CORS configuration for SSE support\n- Thread-safe progress notification system\n\n**Frontend Improvements:**\n- Updated `LoadingOverlay` with progress percentage and stage display\n- New `shareUrl` state and share dialog in `Header`\n- Export dialog with HTML/JSON options\n- Enhanced theme toggle with visual feedback\n\n**Bug Fixes:**\n- Fixed loading overlay CSS conflicts (removed duplicate pseudo-elements)\n- Fixed `eventSource` variable scope in `ProjectAnalysisView`\n- Fixed thread safety in progress notification system\n- Fixed progress generator waiting for task creation\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.4.4 (2026-03-06)\u003c/summary\u003e\n\n**Frontend UI Redesign:**\n- Premium black \u0026 white theme with refined color palette\n- Updated 6 CSS files with cohesive design system\n- Consistent CSS variables for maintainability\n- Smooth transitions and subtle animations\n\n**Search Panel Improvements:**\n- Transparent hover effect: When hovering a search result, the panel background and other results become transparent (20% opacity)\n- The hovered result remains fully visible for clarity\n- Users can now see AST nodes behind the search panel\n\n**Backend Bug Fixes:**\n- Fixed unused `_cognitive_visitor` method in `complexity.py` (removed duplicate code)\n- Fixed nested loop detection in `patches.py` (loop indent stack tracking)\n- Improved hardcoded secret detection in `security.py` (reduced false positives/negatives)\n- Added smart truncation for large files in `main.py` (statement boundary detection)\n- Added generator expression warning in `suggestions.py` (one-time iteration caution)\n- Simplified cycle detection algorithm in `cycle_detector.py` (leveraging Tarjan SCC)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.4.2 (2026-03-05)\u003c/summary\u003e\n\n**Security Fixes:**\n- Fixed ZIP path traversal vulnerability in project scanner - malicious ZIP files can no longer overwrite system files\n- Added path validation before extracting ZIP entries\n\n**Bug Fixes:**\n- Fixed silent exception handling in `main.py` - MemoryError now properly logged\n- Fixed bare `except:` statements in `performance.py` - now uses specific exception types\n- Fixed exception handling in `unused_exports.py` - added debug logging\n- Fixed exception handling in `patches.py` - added debug logging for f-string conversion\n- Fixed exception handling in `scanner.py` - file read errors now logged\n\n**Improvements:**\n- Enhanced JSON parse error logging with line and column numbers\n- Expanded AST attribute key mapping (12 → 50+ mappings) for better visualization labels\n- Improved error messages throughout the codebase\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.4.1 (2026-03-04)\u003c/summary\u003e\n\n**Fixed issues:**\n- Fixed the issue where the front-end web page could not start correctly\n- Updated translations.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.4.0 (2026-03-04)\u003c/summary\u003e\n\n**Major Release - Project Analysis \u0026 Interactive Learning**\n\nThis release includes all features and fixes from alpha, beta, and pre releases.\n\n**New Features:**\n- **Project-Level Analysis**: Analyze entire Python projects with dependency tracking\n  - Multi-file analysis with dependency graph visualization\n  - Circular dependency detection (Tarjan's algorithm)\n  - Unused export detection (functions, classes, variables)\n  - Project metrics (LOC, file count, average complexity)\n- **Learn Mode**: Interactive AST learning with node explanations\n  - Write code and visualize AST in real-time\n  - Click on nodes to see detailed explanations\n  - Python documentation and code examples for each node type\n- **Challenges Mode**: Interactive coding challenges\n  - 12 professional challenges across 5 categories\n  - Difficulty levels: Easy, Medium, Hard\n  - Learning objectives and hints\n- **Python 3.10+ Support**: `match-case` statement support (NodeType.MATCH)\n\n**Bug Fixes:**\n- Fixed temporary directory cleanup timing (data loss issue)\n- Fixed boolean detection in performance analyzer (nested ternary)\n- Fixed string concatenation patch generator (loop tracking)\n- Fixed memory leak in AST visualizer (animation frame cleanup)\n- Fixed retry logic overriding user cancellation\n- Fixed hardcoded secret false positives\n- Fixed type inconsistency in CodeIssue construction\n- Fixed dead code detection for raise statements and async functions\n- Fixed relative import resolution edge cases\n- Fixed particle ID generation conflicts\n- Fixed indent stack management in patch generator\n\n**Improvements:**\n- Relaxed CodeIssue.type validation with logging\n- Removed setup.py from default ignore patterns\n- Improved hardcoded secret detection patterns\n- Better error messages for validation errors\n- Comprehensive logging system (frontend/backend)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.4.0-beta3 (2026-03-04)\u003c/summary\u003e\n\n**New Features:**\n- **Learn Mode**: Interactive AST learning with node explanations\n  - Write code and visualize AST in real-time\n  - Click on nodes to see detailed explanations\n  - Python documentation and code examples for each node type\n  - Related concepts for deeper learning\n- **Challenges Mode**: Interactive coding challenges\n  - 12 professional challenges across 5 categories (Performance, Security, Complexity, Code Smell, Best Practice)\n  - Difficulty levels: Easy, Medium, Hard\n  - Learning objectives and hints for each challenge\n  - Score system with immediate feedback\n\n**Backend Improvements:**\n- Enhanced node explanation system with 20+ AST node types\n- New `/api/challenges/categories` endpoint for challenge categories\n- Auto-reload challenge data when JSON file changes\n- Improved challenge scoring and feedback system\n\n**Frontend Improvements:**\n- New `LearnView` component with two-panel layout (Code Editor + AST/Explanation)\n- New `ChallengeView` component with challenge list, detail, and result views\n- Monochrome black/white theme for Learn and Challenges modes\n- Responsive layout for different screen sizes\n- Integrated Learn/Challenges into Sidebar tabs\n\n**Content:**\n- All content translated to English for consistency\n- Professional challenge descriptions and learning objectives\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.4.0-beta2 (2026-03-04)\u003c/summary\u003e\n\n**Bug Fixes:**\n- Fixed `PerformanceAnalyzer` missing `hotspots` attribute causing validation errors\n- Fixed `main.py` incorrectly assigning `issues` to `performance_hotspots` in single-file analysis\n- Fixed duplicate imports in `main.py` (removed redundant `pydantic`, `datetime`, `typing` imports)\n- Fixed project analysis performance hotspots not displaying in frontend\n- Restored `ASTVisualizer3D.js` from git to fix encoding issues\n\n**Code Quality Improvements:**\n- Completed empty `pass` implementations in `performance.py`:\n  - `_check_loop_contents()`: Now detects repeated `len()` calls and `range(len())` patterns\n  - `_detect_inefficient_data_structures()`: Detects list membership checks and `count()` in loops\n  - `_detect_redundant_calculations()`: Detects duplicate function calls and operations in loops\n  - `_detect_memory_issues()`: Detects potentially large list comprehensions\n  - `_detect_unoptimized_comprehensions()`: Context-aware generator expression suggestions\n- Completed recursive call detection in `complexity.py` cognitive complexity calculation\n- Fixed `patches.py` f-string conversion for complex expressions with attribute access\n- Added `PerformanceHotspot` model support with proper `hotspots` list in analyzer\n\n**Performance Detection Enhancements:**\n- Nested loop detection now generates both issues and hotspots\n- String concatenation in loops now generates performance hotspots\n- Big O complexity estimation for detected issues\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.4.0-beta (2026-03-03)\u003c/summary\u003e\n\n**Project-Level Analysis:**\n- **Multi-file Analysis**: Analyze entire Python projects with dependency tracking\n- **Dependency Graph**: Visualize module imports and relationships\n- **Circular Dependency Detection**: Identify and highlight circular imports\n- **Unused Export Detection**: Find unused functions and classes\n- **Project Metrics**: Lines of code, file count, average complexity\n\n**New Backend Module:**\n- `backend/project_analyzer/` - Complete project analysis system\n  - `scanner.py` - File discovery and parsing\n  - `dependency.py` - Import dependency graph construction\n  - `cycle_detector.py` - Circular dependency detection (Tarjan's algorithm)\n  - `symbol_extractor.py` - Function/class definition extraction\n  - `unused_exports.py` - Unused export detection\n  - `metrics.py` - Project-level metrics calculation\n  - `models.py` - Data models for project analysis\n\n**Frontend Improvements:**\n- New `ProjectAnalysisView` component for file list and project overview\n- Enhanced `ProjectVisualization` with dependency graph rendering\n- Improved graph visual design with black/white/gray color scheme\n- Different node shapes (rectangles, diamonds) and line styles (solid, dashed)\n- File double-click to enter edit mode with exit button\n- Editor now loads actual file content in project mode\n- Auto-open browser on backend startup\n\n**Bug Fixes:**\n- Fixed project analysis data format mismatch (module names vs file paths)\n- Fixed missing CSS styles for dependency graph visualization\n- Fixed AnalysisPanel data aggregation for project mode\n- Fixed editor showing sample code instead of actual file content\n\n**API Additions:**\n- `POST /api/project/analyze` - Analyze entire project\n- `POST /api/project/file` - Analyze single file in project context\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.4.0-alpha3 (2026-03-03)\u003c/summary\u003e\n\n**Bug Fixes:**\n- Fixed infinite loop in `main.py` when encountering SyntaxError during memory optimization\n- Fixed CSRF detection logic in `security.py` (condition was always true)\n- Fixed default value issue in `node_mapper.py` for missing edge nodes\n- Fixed global variable leak in `ASTVisualizer.js` (replaced `window.__particleCleanup` with `useRef`)\n- Fixed memory leak in particle animation (particle ID collision causing accumulation)\n- Fixed Monaco Editor not loading on first page visit\n- Fixed ResizeObserver loop errors causing page stretch\n\n**New Features:**\n- **Logging System**: Comprehensive frontend and backend logging\n  - Backend logs saved to `logs/pyvizast-YYYY-MM-DD.log`\n  - Frontend errors captured and sent to backend (`logs/frontend-YYYY-MM-DD.log`)\n  - Batched log sending with beacon API for reliability\n- **useResizeObserver Hook**: Safe ResizeObserver wrapper\n  - Automatic debounce and requestAnimationFrame\n  - Proper cleanup on unmount\n  - Error suppression for ResizeObserver loop issues\n\n**Optimizations:**\n- Disabled Monaco Editor's internal ResizeObserver (uses custom hook instead)\n- Added Chinese CDN mirrors for font loading (fonts.font.im, fonts.loli.net)\n- Unified ResizeObserver management across all components\n- Global ResizeObserver error suppression for development environment\n\n**Code Quality:**\n- Removed duplicate `import json` in main.py\n- Improved error handling in security scanner\n- Added CSS variables for font system\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.3.4 (2026-03-02)\u003c/summary\u003e\n\n**Bug Fixes:**\n- Fixed 422 validation error showing `[object Object]` instead of readable message\n  - Added `extractErrorMessage` function to properly parse Pydantic validation errors\n  - Correctly extracts error details from arrays/objects to display meaningful messages\n- Fixed large file support:\n  - Increased `MAX_CODE_LENGTH` from 100,000 to 5,000,000 characters\n  - Now supports analyzing large project files\n\n**Backend Bug Fixes:**\n- Fixed potential infinite recursion in `performance.py` (removed duplicate `generic_visit`)\n- Fixed incomplete dead code detection in `code_smells.py` (removed premature `break`)\n- Fixed patch parsing logic in `patches.py` (line number tracking)\n- Fixed regex false positives in `security.py` (excluded comments and placeholders)\n- Added progressive simplification strategy for large files in `main.py`\n- Added deduplication in `suggestions.py` to prevent duplicate suggestions\n\n**Frontend Bug Fixes:**\n- Fixed memory leak in `ASTVisualizer.js` (animation cancellation flags)\n- Fixed useFrame state updates in `ASTVisualizer3D.js` (throttling + ref-based vectors)\n- Fixed retry logic in `api.js` (only retry idempotent methods like GET)\n- Fixed patch application in `PatchPanel.js` (API-first with fallback)\n\n**Performance Notes:**\n- Very large files (millions of characters) may cause:\n  - Increased memory usage during AST parsing\n  - Performance slowdown in visualization with many nodes\n  - Consider splitting large projects into separate files for analysis\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.3.3 (2026-03-02)\u003c/summary\u003e\n\n**New Features:**\n- **Search Functionality**: Search nodes in 2D/3D AST view\n  - Search by function name, variable name, or node type\n  - Keyboard navigation (↑↓ to navigate, Enter to jump, Esc to close)\n  - Click search result to focus node and jump to editor line\n- **Resizable Panels**: Drag the divider between editor and visualization panels\n  - Adjust panel sizes by dragging the center divider\n  - Position saved during session (20%-80% range)\n  - Responsive design: auto-stacks on smaller screens\n\n**Backend Code Quality:**\n- Added input validation in `schemas.py` (code length, line number ranges, type whitelists)\n- Added custom exception classes for better error handling\n- Refactored exception handling in `main.py` with specific exception types\n- Improved production error messages (no stack trace exposure)\n\n**Frontend Bug Fixes:**\n- Fixed AST visualizer initialization issue (first analyze not showing graph)\n- Fixed 2D/3D switch requiring re-analyze\n- Fixed particle key generation strategy to prevent conflicts\n- Fixed `useFrame` state update causing potential infinite loops\n- Fixed keyboard navigation conflict with search input\n- Added `withRetry` wrapper to all API calls for better reliability\n- Improved optional chaining consistency in `AnalysisPanel.js`\n- Enhanced diff parsing in `PatchPanel.js` with better edge case handling\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.3.2 (2026-03-01)\u003c/summary\u003e\n\n**Animation Redesign:**\n- Redesigned particle animations with clean white theme\n- Simplified particle rendering for better performance\n- Unified animation loop for camera movements\n\n**Performance Optimizations:**\n- Reduced sphere geometry segments (16→8) for 75% fewer vertices\n- Removed redundant Line component from SignalParticle\n- Single glow mesh instead of multiple layers\n- Removed unnecessary useFrame rotation animation\n- Simplified SVG particle: single circle instead of two\n- Reduced blur filter intensity for faster rendering\n\n**Code Quality:**\n- Unified camera animations into single `useFrame` loop\n- Removed duplicate `requestAnimationFrame` loop in resetCamera\n- Cleaner code with 49 fewer lines\n\n**Bug Fixes:**\n- Fixed signal propagation animation not playing (removed `isMountedRef` checks)\n- Fixed animation conflicts between reset and keyboard/focus animations\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.3.1 (2026-03-01)\u003c/summary\u003e\n\n**Bug Fixes:**\n- Fixed mutable default arguments in Pydantic models (`schemas.py`)\n  - Changed `= {}` and `= []` to `Field(default_factory=dict/list)`\n  - Prevents shared state between model instances\n- Fixed potential `AttributeError` in security scanner (`security.py`)\n  - Added `isinstance(node.func, ast.Attribute)` check before accessing `.attr`\n- Fixed cyclomatic complexity calculation for elif branches (`complexity.py`)\n  - Removed duplicate counting of nested If nodes\n\n**Frontend Memory Leak Fixes:**\n- Fixed `requestAnimationFrame` not being canceled on unmount (`ASTVisualizer.js`)\n- Fixed `setTimeout` not being cleared on unmount (`ASTVisualizer.js`, `ASTVisualizer3D.js`)\n- Added proper cleanup for event listeners and timers\n- Added `isMountedRef` to prevent state updates after unmount\n\n**Performance Optimizations:**\n- Added `React.memo` to panel components (`AnalysisPanel.js`)\n  - `ComplexityPanel`, `PerformancePanel`, `SecurityPanel`, `SuggestionsPanel`\n  - `MetricCard`, `DetailItem`, `IssueList`, `SuggestionCard`\n- Implemented code splitting with `React.lazy` (`App.js`)\n  - Lazy loading for `ASTVisualizer`, `ASTVisualizer3D`, `AnalysisPanel`\n  - Added loading fallback component\n\n**Error Handling Improvements:**\n- Enhanced `ErrorBoundary` component with error type classification\n  - Network errors, syntax errors, runtime errors, chunk load errors\n  - Different recovery suggestions based on error type\n- Added `LazyLoadErrorBoundary` for lazy-loaded components\n- Improved development mode error logging\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.3.0 (2026-03-01)\u003c/summary\u003e\n\n**3D Visualization:**\n- Added 3D AST view with Three.js and React Three Fiber\n- Custom 3D force-directed layout algorithm for automatic node positioning\n- Different 3D shapes for node types (boxes for structures, diamonds for control flow, spheres for expressions)\n- OrbitControls for camera manipulation (drag to rotate, scroll to zoom)\n- Reset camera button to return to initial view\n\n**Signal Propagation Animation:**\n- Long press on a node to focus and display detailed information\n- Release to trigger electric-like signal propagation animation\n- Particles travel along edges at constant speed (duration based on edge length)\n- Target nodes glow with fade-in/fade-out animation when particles approach\n- Smooth BFS-based wave propagation (up to 5 levels deep)\n\n**Keyboard Navigation:**\n- WASD / Arrow keys for smooth horizontal camera movement\n- Space bar to move camera up\n- Shift key to move camera down\n- Continuous movement while keys are held\n\n**UI Improvements:**\n- Server connection status indicator with helpful error messages\n- Better error handling and display\n- Improved startup error reporting in run.py\n- Removed emoji from detail panel labels\n\n**Bug Fixes:**\n- Fixed `PatchApplyRequest` undefined error (moved class definition before usage)\n- Fixed `__builtins__` type check reliability in performance analyzer\n- Fixed particle duplication issue (added edge-level visited tracking)\n- Fixed particle position offset issue (positions now fetched at animation time)\n- Fixed 3D particle reference issue (positions now copied, not referenced)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.2.2 (2026-03-01)\u003c/summary\u003e\n\n**New Features:**\n- **Patch Application UI**: Interactive interface to preview and apply auto-fix patches\n  - Unified diff preview with syntax highlighting\n  - One-click patch application to code editor\n  - Visual status tracking for applied patches\n- **Enhanced AST Node Details**: Richer information for learning\n  - Descriptive icons for each node type (ƒ for functions, C for classes, etc.)\n  - Detailed labels showing full signatures (e.g., `def func(arg1, arg2)`)\n  - Educational explanations for each node type\n  - Attribute display (parameters, decorators, base classes, etc.)\n- **Patch Context Validation**: Improved safety for auto-fix\n  - Validates context lines before applying patches\n  - Prevents incorrect modifications to code\n\n**Bug Fixes:**\n- Fixed f-string syntax error in parser.py (escape `{}` to `{{}}`)\n- Fixed dictionary syntax error in suggestions.py\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.2.1 (2026-03-01)\u003c/summary\u003e\n\n**Bug Fixes:**\n- Fixed CORS security configuration - now uses environment variable `ALLOWED_ORIGINS`\n- Fixed analyzer state pollution between requests - each request now creates fresh instances\n- Fixed `_detect_magic_numbers` crash due to missing parent node tracking\n- Fixed `_generate_node_explanation` crash when node.name is None\n- Fixed duplicate state clearing in code_smells.py\n\n**Frontend Improvements:**\n- Added 30-second request timeout with friendly error messages\n- Added request cancellation on component unmount (AbortController)\n- Improved error handling for network issues and server errors\n\n**Performance Detection:**\n- Completed string concatenation detection in loops\n- Completed global variable lookup detection in loops\n- Fixed state accumulation in performance analyzer\n\n**Maintainability Index:**\n- Rewrote algorithm with multidimensional weighted scoring\n- Now handles large codebases correctly (minimum score 20 instead of 0)\n- Considers complexity (35%), scale (25%), function quality (25%), Halstead (15%)\n\n**Patch Generator:**\n- Added syntax validation before and after patch generation\n- Improved string concatenation fix (auto-adds init and join)\n- Improved range(len()) fix (replaces arr[i] with item)\n- Improved list membership fix (auto-adds set conversion)\n- Added automatic `import ast` insertion for eval→literal_eval fix\n- Added error tracking with `get_errors()` method\n\n**Suggestion Engine:**\n- Smart detection of list comprehension contexts\n- Only suggests generator expression when appropriate:\n  - As argument to single-pass functions (sum, any, all, max, min, etc.)\n  - Direct iteration in for loop\n  - NOT for variable assignment (may need multiple access)\n  - NOT for return statements\n\n**Code Quality:**\n- Added comprehensive logging throughout backend\n- Extracted challenge data to JSON file (`backend/data/challenges.json`)\n- Added `AnalyzerFactory` for clean instance creation\n- Removed hardcoded data from main.py\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.2.0 (2026-03-01)\u003c/summary\u003e\n\n- Redesigned UI with monochrome minimalist theme\n- Optimized AST visualization for large codebases:\n  - Node filtering by priority types\n  - Depth limiting for deep trees\n  - Auto-simplification for files with \u003e800 nodes\n- Fixed Cytoscape rendering issues (style expressions, ResizeObserver errors)\n- Fixed Monaco Editor web worker loading\n- Added layout algorithm selection (hierarchical, force-directed, breadth-first)\n- Added detail level control (overview, normal, detail)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ev0.1.0 (2026-02-28)\u003c/summary\u003e\n\n- Initial release\n- AST parsing and visualization\n- Complexity analysis\n- Performance hotspot detection\n- Security scanning\n- Optimization suggestions\n- Interactive learning mode\n\n\u003c/details\u003e\n\n\u003c/details\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchidcgithub%2Fpyvizast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchidcgithub%2Fpyvizast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchidcgithub%2Fpyvizast/lists"}