Skip to content

Implement merge.md migration roadmap: Extract super/ to clean architecture#3

Draft
Copilot wants to merge 7 commits intomainfrom
copilot/implement-roadmap-plan
Draft

Implement merge.md migration roadmap: Extract super/ to clean architecture#3
Copilot wants to merge 7 commits intomainfrom
copilot/implement-roadmap-plan

Conversation

Copy link
Contributor

Copilot AI commented Jan 26, 2026

Implements phases 1-5 of the migration plan from merge.md to extract legacy super/ folder functionality into layered architecture (repositories, services, auth).

Changes

New Components (7 files, ~1,470 LOC)

Auth layer:

  • auth/cookie_store.py - Cookie lifecycle management (validation, 3-day TTL, cleanup)
  • auth/session_manager.py - Session caching with access tracking

Data access (repositories):

  • Extended PageRepository with get_text_html(), create_page(), purge()
  • api_repository.py - General API operations (all pages, recent changes, user contribs, existence checks)
  • category_repository.py - Category data access (members, subcategories, metadata)

Business logic (services):

  • search_service.py - Search operations (full-text, prefix, backlinks)
  • category_service.py - Category tree traversal (recursive members, depth analysis)

Migration Path

Added deprecation warnings to 8 MainPage methods directing to new repositories:

# Legacy (still works, shows warning)
page = MainPage(login_bot, "Example")
text = page.get_text()

# New architecture
from mw_api.repositories import PageRepository
repo = PageRepository(login_bot)
text = repo.get_text(Page(title="Example"))

Technical Notes

  • Standardized on formatversion: 2 across all API calls
  • Type hints compatible with Python 3.8+
  • Zero breaking changes - full backward compatibility maintained
  • All components accept dependencies via constructor for testability

Remaining Work

Integration (phase 6): Wire legacy classes to delegate to new components
Testing (phase 7): Unit/integration tests for new modules
Cleanup (phase 8): Complete deprecation warnings, remove super/ after grace period

Original prompt

On merge.md, Start working on this plan roadmap step by step as mentioned


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 6 commits January 26, 2026 09:10
…rge)

Co-authored-by: MrIbrahem <26301308+MrIbrahem@users.noreply.github.com>
…tory

Co-authored-by: MrIbrahem <26301308+MrIbrahem@users.noreply.github.com>
Co-authored-by: MrIbrahem <26301308+MrIbrahem@users.noreply.github.com>
Co-authored-by: MrIbrahem <26301308+MrIbrahem@users.noreply.github.com>
…vice

Co-authored-by: MrIbrahem <26301308+MrIbrahem@users.noreply.github.com>
Co-authored-by: MrIbrahem <26301308+MrIbrahem@users.noreply.github.com>
Copilot AI changed the title [WIP] Start working on roadmap plan step by step Implement merge.md migration roadmap: Extract super/ to clean architecture Jan 26, 2026
Copilot AI requested a review from MrIbrahem January 26, 2026 09:19
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