"""Unit: the RAG view's drill-down catalog tree (phase 97, task 04). The RAG (Knowledge base) view lists the catalog the way the agent's ``ls`` sees it (the phase-94 concept, ONE end to end): sources at the top, then per level the subfolders (recursive count + the STORED description) and the level's files (the ``#docs-table`` — phase 106, task 08, D8, added the Created column BEFORE Indexed, making it the 6-column contract). The view's catalog load is ``loadTree()``: ONE fetch of ``GET /api/docs/tree?depth=1`` (sources + one level + the server's ``totals``) plus ONE ``GET /api/docs/tree/node`` fetch per not-yet-loaded level — phase 167 (task 04, LOCKED A3 — the TODO L5 2 MB payload fix) SUPERSEDED the phase-97 "one full-tree fetch, drill purely client-side" contract; the drill UX (breadcrumb, no URL change) is unchanged. This module pins the source-level contract (the house pattern of ``tests/unit/test_sync_button.py`` — read the frontend files as text, no browser; the behavior is E2E-covered by the phase's dedicated suite, task 06): * the shell's RAG view ships the static tree skeleton (``#kb-crumb``, ``#kb-level`` + ``#kb-level-title``/``#kb-level-summary``, ``#folders-wrap`` + ``#folders-table`` — ONE table for every level, the Folder | Documents | Updated | Description head — phase 106 (task 08, D8) added the Updated column (the subtree's MAX document created_at, D9) BETWEEN Documents and Description) in order after ``#stat-cards`` and BEFORE the file table (now the 6-column Source | Path | Title | Chunks | Created | Indexed head — phase 106 (task 08, D8) added the Created column BEFORE Indexed); * the exact ``/api/docs/tree?depth=1`` load fetch + the single ``/api/docs/tree/node`` drill fetch (the flat ``/api/docs`` fetch is gone from the view module), the level cache (declared once, cleared by every load, consulted by ``needsLevelFetch``, written only after a 200), the §7.4 drill states (in-flight ``aria-busy``/``aria-disabled`` + one ``role="status"`` row, ``role="alert"`` failure with a real Retry ``