Skip to content

refactor(files): split 945-line routes/files.py into a submodule #101

@AbstractNucleus

Description

@AbstractNucleus

What: routes/files.py is 945 lines (~19% of src/) and covers tree, view, save, upload, delete, mkdir, rename, move, download, search, bulk_delete, bulk_move — plus an in-process search-index cache.

Why: Cognitive load when touching any one concern. The matching test file is 2k+ lines.

Approach: Convert routes/files.py into a package: routes/files/{tree,view,write,mutate,search,_safety}.py. Lift the search index into mcontrol/file_search.py. Re-export the router from routes/files/__init__.py so existing imports stay green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions