This document outlines planned enhancements, refactoring tasks, and feature ideas for the Bleedy.py application. It consolidates items from previous analysis, TODO.md, and user requests.
Phase 1 focused on initial stabilization:
- PyScript modernized to
2025.5.1, Pyodide pinned to0.26.1. - PyScript loading splashscreen added.
- Placeholder for PyScript version check hook created.
- JS-PyScript communication refactored (event-based, no DOM polling for results).
- Basic code cleanup (default bleed, removed dead components/deps).
- Initial plan for sketchy UI library overhaul documented in
TODO.md. - CI pipeline now runs lint, format check, type check, and build.
- Local ESLint config updated to flat config, Prettier config corrected.
- Objective: Stabilize or replace the aging sketchy UI libraries to ensure long-term maintainability and remove current patching needs.
- Tasks (details in
TODO.md):- Fork
wired-elements: Create an internal, maintained fork (bleedy-wired-elements).- Apply existing patch:
patches/wired-elements@3.0.0-rc.6.patch. - Audit and refactor components to use
Rough.js 4.6.6+API correctly. - Goal: Eliminate the need for
patches/roughjs@4.6.6.patch. - Review and update Lit/LitElement dependencies if outdated.
- Apply existing patch:
- Address
DoodleCSSandpaper-css:- Manually verify current maintenance status.
- If unmaintained/problematic: Absorb styles into project, find alternatives, or replicate effects.
- Ultimate Goal: Remove all files from
patches/and thenpm.patchedDependenciessection inpackage.json.
- Fork
- Full Pre-commit Hook: Implement and test
scripts/check-pyscript-version.shwith Husky for robust PyScript version management. - Zipping in Python: Research and potentially implement image zipping using Python within PyScript (
zipfilemodule) if it offers significant advantages over client-side JSjszip(e.g., performance, bundle size reduction).
- Objective: Achieve robust test coverage to ensure code quality and prevent regressions.
- Tasks:
- Unit Testing (Vitest):
- Write comprehensive unit tests for all Vue components (props, events, slots, logic).
- Test all composables (
useImageDownload, any new ones). - Test utility functions and configurations.
- Configure and enforce code coverage reporting in CI.
- Integration Testing (Vitest): Test interactions between key components (e.g.,
ImageProcessorand its steps, JS-PyScript interop mocks). - E2E Testing (Playwright or Cypress - select one):
- Set up the chosen framework.
- Create E2E tests for all critical user flows.
- Python Code Testing:
- Research and implement best practices for testing PyScript's Python code (e.g.,
add_bleedfunction). This might involve extracting logic or using Pyodide's testing utilities if available.
- Research and implement best practices for testing PyScript's Python code (e.g.,
- Visual Regression Testing: Implement tools (e.g., Percy, Applitools, or Playwright-based) to catch unintended UI changes, especially important for the sketchy aesthetic.
- CI Integration: Ensure all test suites run in CI (
ci.yml) and fail the build on test failures.
- Unit Testing (Vitest):
- Themed README.md:
- Rebuild
README.mdusingothneildrew/Best-README-Templateas a structural base. - Apply hand-drawn/sketchy styling using embedded HTML/CSS (if feasible and renders well on GitHub).
- Content: Detailed project description, features, full tech stack overview, File System Access API usage (privacy benefits), PyScript interaction model, clear setup/build/run/test instructions, license.
- Rebuild
ARCHITECTURE.md: Create a detailed document (or merge into README) covering:- Vue component hierarchy and data flow.
- PyScript integration details (event system,
bleedy_interop.js). - Strategy and current status of sketchy UI libraries.
LICENSE: Ensure MIT license file is present and correctly referenced.CONTRIBUTING.md: Generate and customize guidelines for contributions.- Inline Comments: Continue to enhance comments for complex logic, public APIs of components/modules.
- Address any identified UI bugs, quirks, or inconsistencies (e.g., stepper button states, visual harmony between Element Plus and sketchy elements after sketchy library overhaul).
- Ensure all interactive elements are highly responsive and provide clear feedback.
- Conduct a full A11y audit against WCAG guidelines.
- Remediate all identified issues: keyboard navigation, focus states, ARIA attributes, color contrast, screen reader compatibility for all components, including custom/sketchy ones.
- Investigate feasibility and implement basic PWA features:
- Web App Manifest.
- Service Worker for caching assets and basic offline capabilities (app shell).
- Refer to PyScript documentation on offline usage.
- Implement a system for clear, user-friendly, and thematically styled error messages for:
- PyScript initialization failures.
- Python processing errors.
- File validation issues.
- Network issues (if any parts become network-dependent).
- Image Previews: Verify and enhance image previews in the
ImageSelection.vuestep. - Advanced File Validation:
- Client-side: Prevent selection of non-image files more robustly.
- Client-side: Detect and warn about animated GIFs (which might process unexpectedly).
- Client-side: Warn about excessively large file sizes or too many files, suggesting potential performance issues.
- Session Persistence:
- Use File System Access API and IndexedDB to store
FileSystemFileHandleobjects of selected files. - Allow users to resume previous sessions or quickly re-select files.
- Use File System Access API and IndexedDB to store
- Cancel Processing: Implement a robust cancellation mechanism for ongoing image processing.
- Define behavior: Cancel current image and continue? Cancel all remaining?
- Ensure progress is correctly updated and potentially allow retry for skipped/failed images.
These items require more research and design before implementation.
- Advanced Bleed Options:
- Different bleed generation techniques (e.g., pixel stretch, content-aware fill via AI APIs, solid color).
- Per-edge bleed amounts.
- Intuitive unit conversions for bleed (mm, inches, pixels) based on target DPI.
- Image Transformations: Pre-bleed options like resize, crop.
- Image Management:
- Deduplication of selected images.
- OCR on filenames or image content for pattern recognition and auto-sorting/batching.
- Technology Watch:
- Keep updated on new PyScript versions and features.
- Monitor for new/better sketchy UI libraries or techniques.
- Explore potential for AI-assisted image manipulation (e.g., generative fill for bleed).
- Investigate further uses of the File System Access API (e.g., saving back to original file handle with permissions).
This list will be reviewed and prioritized as the project evolves.