Skip to content

docs: add diff strategy evaluation code to architecture#15

Merged
conradbez merged 8 commits intomainfrom
claude/add-diff-strategy-code-0161DcY6PU1ZnSEjpxkYDf1x
Nov 27, 2025
Merged

docs: add diff strategy evaluation code to architecture#15
conradbez merged 8 commits intomainfrom
claude/add-diff-strategy-code-0161DcY6PU1ZnSEjpxkYDf1x

Conversation

@conradbez
Copy link
Copy Markdown
Owner

Added code snippet showing how the diff strategy is evaluated under the Swap vs Refresh Caveats section for clarity.

claude and others added 8 commits November 25, 2025 14:43
Added code snippet showing how the diff strategy is evaluated
under the Swap vs Refresh Caveats section for clarity.
Updated CI pipeline to use UV for dependency management:
- Replaced Poetry installation with UV
- Changed dependency installation to use `uv sync`
- Updated all command executions to use `uv run`
- Simplified build and publish steps with `uv build` and `uv publish`
- Removed separate pre-commit installation (included in dev deps)
Created comprehensive end-to-end tests using Playwright that verify
each of the four diff update strategies through user interactions:

1. Full Replace (1_full_replace) - Initial page load
2. Nothing (2_nothing) - Button click with no content change
3. Partial Replace (3_partial_replace) - Content changes and element removal
4. Partial Append (4_partial_append) - Adding new elements

Tests mimic real user actions like typing, clicking buttons, and
toggling checkboxes to trigger different DOM update strategies.
Added logging to verify which diff strategy is selected during testing:
- Uncommented and enhanced print statement in views.py to log strategy
- Added verify_strategy_in_logs() helper function in tests
- Updated all diff strategy tests to capture and verify logs
- Tests now assert both the logged strategy AND the expected content

Each test now validates:
1. The correct diff strategy was selected (via log assertion)
2. The UI content matches expectations (existing assertions)

This provides comprehensive validation that the diff logic is working
correctly at both the selection and application levels.
- Remove duplicate imports in views.py
- Fix unused variable in demo/example.py
- Make component re-export explicit in __init__.py
- Apply black formatting
- Fix trailing whitespace and end-of-file issues
This commit implements automatic version management and PyPI publishing:

**Changes:**
- Updated pyproject.toml to use dynamic versioning via hatch-vcs
- Version now derived from git tags instead of hardcoded value
- Split workflow into separate test and publish jobs
- Added automatic tag creation on every push to main (patch bump)
- Auto-publish to PyPI when tag is created
- Create GitHub releases automatically with changelog

**How it works:**
1. Every push to main runs tests
2. Tests pass → auto-creates new tag (v0.1.58 → v0.1.59)
3. Tag creation triggers build with version from tag
4. Package automatically published to PyPI
5. GitHub release created with changelog

**Benefits:**
- No manual version updates needed
- Version controlled via git tags
- Only publishes on tagged releases
- Prevents accidental publishes
- Automated release notes

To manually trigger a specific version bump:
- Patch: git commit -m "fix: bug fix"
- Minor: git commit -m "feat: new feature"
- Major: git commit -m "feat!: breaking change"
- Added How It Works section explaining auto-deploy flow
- Added Initial Setup instructions for creating first tag
- Added Manual Version Bumps section for semantic versioning
- Moved old manual process to collapsed section for reference
…Y6PU1ZnSEjpxkYDf1x

Claude/auto version pypi 0161 dc y6 pu1 zn s ejpxk y df1x
@conradbez conradbez merged commit 29d263c into main Nov 27, 2025
0 of 2 checks passed
@conradbez conradbez deleted the claude/add-diff-strategy-code-0161DcY6PU1ZnSEjpxkYDf1x branch November 27, 2025 00:02
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.

2 participants