feat(maintenance): DB maintenance UI card + fix ruff I001
CI / lint (push) Failing after 2s
CI / backend-lint-and-test (push) Successful in 13s
CI / frontend-build (push) Successful in 18s
CI / intimp (push) Successful in 4m10s
CI / intapi (push) Successful in 8m26s
CI / intcore (push) Successful in 9m54s

- Settings → Maintenance gains a "Database maintenance" card: a "Run VACUUM
  ANALYZE now" button (enqueues the maintenance task) plus a per-table bloat
  readout (live/dead/dead%/last vacuum) from /api/admin/maintenance/db-stats.
- dbMaintenance store (loadStats / runVacuum) + test.
- Fix ruff I001: combine the two _sync_engine imports onto one line.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-04 00:52:36 -04:00
parent 914033db29
commit ef3ee5aceb
5 changed files with 156 additions and 4 deletions
+1 -4
View File
@@ -22,10 +22,7 @@ from ..models import (
TaskRun,
)
from ..utils.phash import compute_phash
from ._sync_engine import (
get_sync_engine,
sync_session_factory as _sync_session_factory,
)
from ._sync_engine import get_sync_engine, sync_session_factory as _sync_session_factory
log = logging.getLogger(__name__)