126a4bc712
- Add get_screen_snapshot() method that doesn't mutate terminal state - Use change counter for reliable activity detection instead of dirty flag - Update screenshot handler to use non-mutating snapshot method - Refactor tests to use shared fixtures and reduce duplication - Update copilot-instructions.md with detailed Makefile usage
1.9 KiB
1.9 KiB
Copilot Development Instructions
Makefile Usage (MANDATORY)
Always use the Makefile for development tasks. Never run raw pytest, ruff, or bun commands directly.
Quick Reference
| Task | Command | Description |
|---|---|---|
| Run tests | make test |
Run pytest |
| Run linter | make lint |
Run ruff linter |
| Format code | make format |
Auto-format with ruff |
| Full check | make check |
Run lint + coverage |
| Coverage report | make coverage |
Run pytest with coverage |
| Build frontend | make build |
TypeScript typecheck + bundle |
| Quick frontend build | make build-fast |
Bundle without typecheck |
| Watch mode | make bundle-watch |
Frontend dev with auto-rebuild |
| Install dev deps | make install-dev |
Install package + dev dependencies |
| Clean build | make build-all |
Full reproducible build from scratch |
| See all targets | make help |
Show all available commands |
Development Workflow
- Before making changes: Run
make checkto establish baseline - After making changes: Run
make checkto verify no regressions - Frontend changes: Use
make buildormake build-fast - Full rebuild: Use
make build-all(cleans everything first)
Clean Targets
make clean- Remove Python cache files onlymake bundle-clean- Remove frontend build artifacts (node_modules, etc.)make clean-all- Remove everything
Version Management
make bump-patch- Bump patch version and create git tag
Testing Guidelines
- Aim for good test coverage
- Review tests periodically to consolidate/parameterize and remove redundancy
- Use fixtures from
tests/conftest.pyinstead of duplicating setup code - Prefer parameterized tests for similar test cases
Code Style
- Do not use heredocs or random shell commands
- Prefer
makeand ecosystem tools (pip, bun) over manual operations - Debug issues systematically - search for and review documentation as needed