Vyasa Extension Refactor Audit and Execution Plan

Architecture Decision FrameworkURL copied

Deepening OpportunitiesURL copied

6. Bookmark And Annotation ModulesURL copied

Files:

  • vyasa/extensions_builtin/bookmarks/**
  • vyasa/extensions_builtin/annotations/**
  • vyasa/tree_service.py
  • vyasa/tree_tables.py
  • vyasa/search_views.py
  • vyasa/content_routes.py

Problem:

  • Stores have moved, but UI/route/tree/search behavior still crosses core.
  • Bookmarks and annotations need their own DBs and route behavior.

Solution:

  • Each extension registers:
    • storage namespace
    • DB initialization lifecycle hook
    • route prefix
    • document toolbar action
    • tree row decorator
    • search result decorator if needed
    • CSS/JS bundle

Benefits:

  • Leverage: adding another per-document state feature follows one pattern.
  • Locality: DB schema, routes, UI, and assets live together.
  • Tests: temp DB proves namespace isolation and route behavior.