feat(filter): tag chips + FTS5 search en toolbar (issue 0009)
- entity_ops: entity_search_fts (bm25, prefix tokens) + entity_list_by_tags (AND). - AppState: filter_query_buf, filter_tags, filter_mode (highlight/hide), hits cache. - views_filter_apply: combina tipos visibles + match-set (FTS query AND tags), highlight = color_override con alpha=0x40, hide = clear NF_VISIBLE. - toolbar: input search + dropdown (max 20, click centra y selecciona), chips de tags con boton X, input para anadir tag, combo Highlight/Hide, Clear filter. - Inspector: right-click sobre tag chip lo anade al filtro. - main.cpp: reapply en cada frame si filter_dirty; cam_x/y al focus_target.
This commit is contained in:
@@ -552,6 +552,19 @@ static void render() {
|
||||
std::fprintf(stdout, "[graph_explorer] saved %d node positions\n", n);
|
||||
g_app.want_save_layout = false;
|
||||
}
|
||||
|
||||
// Filtro FTS5/tags (issue 0009) — reaplica si el toolbar marco dirty.
|
||||
if (g_app.filter_dirty) {
|
||||
ge::views_filter_apply(g_app);
|
||||
}
|
||||
// Centrado del nodo seleccionado desde el dropdown.
|
||||
if (g_app.filter_focus_target >= 0
|
||||
&& g_app.filter_focus_target < g_graph.node_count) {
|
||||
const GraphNode& n = g_graph.nodes[g_app.filter_focus_target];
|
||||
g_viewport.cam_x = -n.x;
|
||||
g_viewport.cam_y = -n.y;
|
||||
g_app.filter_focus_target = -1;
|
||||
}
|
||||
if (g_app.want_open_file) {
|
||||
g_input_path = g_app.open_buf;
|
||||
g_app.want_open_file = false;
|
||||
|
||||
Reference in New Issue
Block a user