Full DMS: folders + ACLs, versioning, trash, bulk ops, preview, smart folders
Rebuild the dashboard as a Drive-style document management system on top of the existing CaveauAI hybrid RAG pipeline. Backend: - 5 migrations (versions, trash soft-delete, saved searches, categories, audit) - DMS helpers (folder ACL walker, disk storage, audit, version snapshot, XLSX/PPTX/HTML/CSV/MD extractors) - New APIs: folders, document-versions, trash, bulk, preview, saved-searches, categories, diagnostics - Extended APIs: documents (folder_id, soft-delete, ACL filter, sort), upload (9 file types, version-collision detection with replace/new/keep-both, disk persistence), chat-stream (folder scoping + graph related-documents) - 30-day trash purge cron with Qdrant + disk + graph cleanup Frontend: - Drive-style two-pane browser with folder tree, drag-drop, bulk-action bar, right-click context menu, multi-select - New pages: folders (tree + per-folder ACL editor), trash (restore/purge) - Extended pages: upload (folder picker, version-collision modal, 9 file type chips), document (Preview/Versions/Permissions tabs with PDF.js + mammoth.js + audio), index (DMS KPIs + activity feed), settings (live diagnostics ping MariaDB/Qdrant/LiteLLM/FalkorDB/disk), chat (folder scope chips + related-authorities chips) - New CSS (dms.css) + JS bundle (dms.js) exposing window.DBN_DMS - Sidebar nav adds Folders + Trash items All routes return HTTP 200 in local smoke test; all 32 files lint clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+32
-1
@@ -34,10 +34,20 @@ require_once __DIR__ . '/../includes/layout_dashboard.php';
|
||||
<dt style="color:rgba(22,19,15,0.55);">Search method</dt>
|
||||
<dd>Hybrid (vector + keyword), reciprocal rank fusion, private boost 1.5×</dd>
|
||||
<dt style="color:rgba(22,19,15,0.55);">Graph DB</dt>
|
||||
<dd><code>bnl_legal</code> in FalkorDB (Colin) — citation edges</dd>
|
||||
<dd><code>dbn_client_graph</code> in FalkorDB (Colin) — citation edges</dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section class="dash-card">
|
||||
<div class="dash-card__head">
|
||||
<h2>Live diagnostics</h2>
|
||||
<div class="dash-card__actions">
|
||||
<button class="dash-btn" type="button" id="diagRefresh">↻ Refresh</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="diagPanel" class="dms-diag"><div class="dms-loading"></div></div>
|
||||
</section>
|
||||
|
||||
<section class="dash-card">
|
||||
<div class="dash-card__head">
|
||||
<h2><?= htmlspecialchars(dbnToolsT('dash_section_privacy', $uiLang)) ?></h2>
|
||||
@@ -59,6 +69,27 @@ require_once __DIR__ . '/../includes/layout_dashboard.php';
|
||||
document.getElementById('setClientId').textContent = d.clientId || '—';
|
||||
document.getElementById('setCorpusId').textContent = d.corpusId || '—';
|
||||
document.getElementById('setUserId').textContent = d.clientUserId || '—';
|
||||
|
||||
const $diag = document.getElementById('diagPanel');
|
||||
async function loadDiag() {
|
||||
$diag.innerHTML = '<div class="dms-loading"></div>';
|
||||
try {
|
||||
const r = await fetch((d.apiBase || '/api/dashboard') + '/diagnostics.php', { credentials:'same-origin' });
|
||||
const data = await r.json();
|
||||
if (!data.ok) throw new Error(data.message || 'Diagnostics unavailable');
|
||||
const safe = s => String(s == null ? '' : s).replace(/[&<>"]/g, c => ({ '&':'&','<':'<','>':'>','"':'"' }[c]));
|
||||
$diag.innerHTML = data.sections.map(s =>
|
||||
'<div class="dms-diag__row" title="' + safe(s.detail || '') + '">' +
|
||||
'<div class="dms-diag__label">' + safe(s.label) + '</div>' +
|
||||
'<div class="dms-diag__value">' + safe(s.value) + '</div>' +
|
||||
'<div><span class="dms-diag__status dms-diag__status--' + safe(s.status || 'warn') + '">' + safe(s.status) + '</span></div></div>'
|
||||
).join('');
|
||||
} catch (e) {
|
||||
$diag.innerHTML = '<div class="dms-list__empty"><strong>Could not run diagnostics</strong><span>' + e.message + '</span></div>';
|
||||
}
|
||||
}
|
||||
document.getElementById('diagRefresh').addEventListener('click', loadDiag);
|
||||
loadDiag();
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user