Fix command palette: agent ID propagation, result selection, and scope tabs
- Propagate authenticated agent identity through write buffers via TaggedExecution/TaggedDiagram wrappers so ClickHouse rows get real agent IDs instead of empty strings - Add execution_id to text search LIKE clause so selecting an execution by ID in the palette actually finds it - Clear status filter to all three statuses on palette selection so the chosen execution/agent isn't filtered out - Add disabled Routes and Exchanges scope tabs with "coming soon" state Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package com.cameleer3.server.app.ingestion;
|
||||
|
||||
import com.cameleer3.common.graph.RouteGraph;
|
||||
import com.cameleer3.common.model.RouteExecution;
|
||||
import com.cameleer3.server.app.config.IngestionConfig;
|
||||
import com.cameleer3.server.core.ingestion.TaggedDiagram;
|
||||
import com.cameleer3.server.core.ingestion.TaggedExecution;
|
||||
import com.cameleer3.server.core.ingestion.WriteBuffer;
|
||||
import com.cameleer3.server.core.storage.DiagramRepository;
|
||||
import com.cameleer3.server.core.storage.ExecutionRepository;
|
||||
@@ -27,8 +27,8 @@ public class ClickHouseFlushScheduler implements SmartLifecycle {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ClickHouseFlushScheduler.class);
|
||||
|
||||
private final WriteBuffer<RouteExecution> executionBuffer;
|
||||
private final WriteBuffer<RouteGraph> diagramBuffer;
|
||||
private final WriteBuffer<TaggedExecution> executionBuffer;
|
||||
private final WriteBuffer<TaggedDiagram> diagramBuffer;
|
||||
private final WriteBuffer<MetricsSnapshot> metricsBuffer;
|
||||
private final ExecutionRepository executionRepository;
|
||||
private final DiagramRepository diagramRepository;
|
||||
@@ -37,8 +37,8 @@ public class ClickHouseFlushScheduler implements SmartLifecycle {
|
||||
|
||||
private volatile boolean running = false;
|
||||
|
||||
public ClickHouseFlushScheduler(WriteBuffer<RouteExecution> executionBuffer,
|
||||
WriteBuffer<RouteGraph> diagramBuffer,
|
||||
public ClickHouseFlushScheduler(WriteBuffer<TaggedExecution> executionBuffer,
|
||||
WriteBuffer<TaggedDiagram> diagramBuffer,
|
||||
WriteBuffer<MetricsSnapshot> metricsBuffer,
|
||||
ExecutionRepository executionRepository,
|
||||
DiagramRepository diagramRepository,
|
||||
@@ -62,7 +62,7 @@ public class ClickHouseFlushScheduler implements SmartLifecycle {
|
||||
|
||||
private void flushExecutions() {
|
||||
try {
|
||||
List<RouteExecution> batch = executionBuffer.drain(batchSize);
|
||||
List<TaggedExecution> batch = executionBuffer.drain(batchSize);
|
||||
if (!batch.isEmpty()) {
|
||||
executionRepository.insertBatch(batch);
|
||||
log.debug("Flushed {} executions to ClickHouse", batch.size());
|
||||
@@ -74,9 +74,9 @@ public class ClickHouseFlushScheduler implements SmartLifecycle {
|
||||
|
||||
private void flushDiagrams() {
|
||||
try {
|
||||
List<RouteGraph> batch = diagramBuffer.drain(batchSize);
|
||||
for (RouteGraph graph : batch) {
|
||||
diagramRepository.store(graph);
|
||||
List<TaggedDiagram> batch = diagramBuffer.drain(batchSize);
|
||||
for (TaggedDiagram diagram : batch) {
|
||||
diagramRepository.store(diagram);
|
||||
}
|
||||
if (!batch.isEmpty()) {
|
||||
log.debug("Flushed {} diagrams to ClickHouse", batch.size());
|
||||
@@ -130,8 +130,8 @@ public class ClickHouseFlushScheduler implements SmartLifecycle {
|
||||
private void drainAll() {
|
||||
drainBufferCompletely("executions", executionBuffer, batch -> executionRepository.insertBatch(batch));
|
||||
drainBufferCompletely("diagrams", diagramBuffer, batch -> {
|
||||
for (RouteGraph g : batch) {
|
||||
diagramRepository.store(g);
|
||||
for (TaggedDiagram d : batch) {
|
||||
diagramRepository.store(d);
|
||||
}
|
||||
});
|
||||
drainBufferCompletely("metrics", metricsBuffer, batch -> metricsRepository.insertBatch(batch));
|
||||
|
||||
Reference in New Issue
Block a user