feat(dashboard): functions explorer + top-level tabs + pie chart fit

- Pie charts (Purity, Kind) ahora reciben plot_h explicito para que respeten
  el panel contenedor y no desborden cuando la ventana se reduce.
- Nueva pestana "Explorer": split layout con lista filtrable a la izquierda
  (search por nombre/descripcion + combos lang/domain) y panel de detalle
  a la derecha con tabs Code (read-only multiline), Documentation (selectable
  text), Tests (con dropdown si la funcion tiene varios tests, muestra lang +
  file_path + codigo) y Metadata (id, version, file_path, returns,
  uses_functions, uses_types, params_schema, example, notes).
- Reorganizacion de navegacion: TabBar movido arriba, justo debajo de la
  toolbar. Tabs: Dashboard | Explorer | Projects | Apps | Analysis | Types.
  Cada tab ocupa toda la zona de contenido. Dashboard incluye KPIs + charts
  + tabla de Recent Functions.
- Cache del Explorer (lista de funciones) invalidado en trigger_reload.
- Nuevas funciones HTTP: load_function_detail_http, load_all_functions_http,
  load_unit_tests_http (todas usan /api/databases/registry/query con escape
  defensivo de comilla simple en IDs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 23:13:02 +02:00
parent 641723bdf1
commit ddf8e76ad6
5 changed files with 485 additions and 18 deletions
+17
View File
@@ -18,6 +18,23 @@ bool load_project_detail_http(const std::string& api_url,
const std::string& id,
ProjectDetail& out);
// Load detalle completo de una funcion (codigo + documentacion + metadata).
// Usado por la pestana Explorer.
bool load_function_detail_http(const std::string& api_url,
const std::string& id,
FunctionDetail& out);
// Load lista plana de funciones para el Explorer (id, name, lang, domain,
// kind, purity, description, tested) — todas las funciones, no solo recientes.
bool load_all_functions_http(const std::string& api_url,
std::vector<FunctionRow>& out);
// Load tests unitarios asociados a una funcion (tabla unit_tests con FK
// function_id). Devuelve la lista vacia si la funcion no tiene tests.
bool load_unit_tests_http(const std::string& api_url,
const std::string& function_id,
std::vector<UnitTestRow>& out);
// Operaciones de mutacion (thread-safe porque http_post ya lo es).
// Devuelven el body de respuesta en `out_body`. true si HTTP status 2xx.
bool http_post_reindex(const std::string& api_url, std::string& out_body);