feat(table): vista tabla por tipo de entidad (issue 0004)

- entity_ops: entity_list_rows (bulk pull id/name/type_ref/status/updated_at).
- AppState::TableRow + cache + filtros (search substring + show_all toggle).
- views_table: tabs por type_ref (alfabetico) o tabla unica con todos los
  tipos. ImGui::BeginTable con sort + clipper para >10k filas. Click en
  Selectable selecciona el nodo en el viewport (clear + add via
  graph_viewport_*).
- views_table_refresh_indices: degree + node_idx por user_data hash.
- main.cpp: panel "Table" en g_panels; cache build tras load_input y
  reload_after_mutation.
This commit is contained in:
2026-05-01 01:05:03 +02:00
parent 078947a2b8
commit 84afa4ce70
6 changed files with 339 additions and 1 deletions
+15
View File
@@ -122,6 +122,21 @@ bool entity_list_by_tags(const char* db_path,
const std::vector<std::string>& tags,
std::vector<std::string>* out_ids);
// Snapshot ligero por entidad para la vista tabla (issue 0004). No incluye
// metadata ni notes — solo identidad + estado para tabular y ordenar.
struct EntityRowSnapshot {
std::string id;
std::string name;
std::string type_ref;
std::string status;
std::string updated_at;
};
// Carga todas las filas de `entities` ordenadas por type_ref, name. Tolera BD
// sin la columna `status` o `updated_at` — esos campos quedan vacios.
bool entity_list_rows(const char* db_path,
std::vector<EntityRowSnapshot>* out);
// Mapa user_data (FNV1a hash) -> sql id. Se reconstruye despues de cada
// carga del grafo (graph_sources usa FNV1a sobre id como user_data).
struct EntityIndex {