Skip to content

refactor: move the revision listing methods into a RevisionManager mixin (ROADMAP.md #73) - #93

Merged
pablospe merged 1 commit into
mainfrom
task/f7fd3409-Decompose-track_changes-py--st
Aug 30, 2026
Merged

pablospe merged 1 commit into
mainfrom
task/f7fd3409-Decompose-track_changes-py--st

Conversation

@pablospe

Copy link
Copy Markdown
Owner

What

manager.py loses its revision-listing cluster — the _RevisionLocationContext cache plus nine methods (has_own_revisions, list_revisions, get_markup_text, _parse_revision, _revision_element_index, _is_in_document, _find_revision_element, _unhandled_elements, list_unhandled_revisions) — to a new _ListingMixin in docx_editor/track_changes/listing.py. No behavior change; the public API is untouched.

Why

Step 8 of the track_changes decomposition (ROADMAP.md #73). manager.py drops from 1135 to 745 lines, leaving only the resolution cluster and __init__ for the final step.

How

Byte-identical cut/paste. base.py gains one stub, changeset_id_of (its def line copied verbatim from registry.py), so ty resolves the mixin's one cross-cluster call. Adding _ListingMixin pushes RevisionManager's class header past the 120-char limit, so ruff format wraps it across three lines — and scripts/check_pure_move.py's check 1 allowlisted only single-line class headers. content_lines() therefore gains a narrow wrapped-header rule (opener class Name(, indented base-list entries, ): terminator); check 2's byte-for-byte AST comparison is untouched and still guards every moved method. Reviewers should look at that gate change first.

Testing

check_pure_move.py --base main: 3/3 ok. ruff check + ruff format --check: clean. ty check: only the 7 pre-existing test diagnostics. listing.py: 100% line and branch coverage from the existing suite (135 stmts, 68 branches, 0 missed). Full suite: 1846 passed, 8 skipped, 2 xfailed.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 14 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 958a071a-6c66-4c4e-a6e9-83a8ed7b6823

📥 Commits

Reviewing files that changed from the base of the PR and between 44518b3 and 95e2c25.

📒 Files selected for processing (4)
  • docx_editor/track_changes/base.py
  • docx_editor/track_changes/listing.py
  • docx_editor/track_changes/manager.py
  • scripts/check_pure_move.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.9%. Comparing base (4166c3c) to head (95e2c25).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main     #93     +/-   ##
=======================================
- Coverage   98.0%   97.9%   -0.2%     
=======================================
  Files         21      22      +1     
  Lines       5067    5132     +65     
  Branches     984     991      +7     
=======================================
+ Hits        4969    5026     +57     
- Misses        46      51      +5     
- Partials      52      55      +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pablospe
pablospe merged commit c53ce37 into main Aug 30, 2026
26 of 27 checks passed
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