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,7 +1,5 @@
|
||||
package com.cameleer3.server.core.ingestion;
|
||||
|
||||
import com.cameleer3.common.graph.RouteGraph;
|
||||
import com.cameleer3.common.model.RouteExecution;
|
||||
import com.cameleer3.server.core.storage.model.MetricsSnapshot;
|
||||
|
||||
import java.util.List;
|
||||
@@ -14,12 +12,12 @@ import java.util.List;
|
||||
*/
|
||||
public class IngestionService {
|
||||
|
||||
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;
|
||||
|
||||
public IngestionService(WriteBuffer<RouteExecution> executionBuffer,
|
||||
WriteBuffer<RouteGraph> diagramBuffer,
|
||||
public IngestionService(WriteBuffer<TaggedExecution> executionBuffer,
|
||||
WriteBuffer<TaggedDiagram> diagramBuffer,
|
||||
WriteBuffer<MetricsSnapshot> metricsBuffer) {
|
||||
this.executionBuffer = executionBuffer;
|
||||
this.diagramBuffer = diagramBuffer;
|
||||
@@ -27,39 +25,39 @@ public class IngestionService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Accept a batch of route executions into the buffer.
|
||||
* Accept a batch of tagged route executions into the buffer.
|
||||
*
|
||||
* @return true if all items were buffered, false if buffer is full (backpressure)
|
||||
*/
|
||||
public boolean acceptExecutions(List<RouteExecution> executions) {
|
||||
public boolean acceptExecutions(List<TaggedExecution> executions) {
|
||||
return executionBuffer.offerBatch(executions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Accept a single route execution into the buffer.
|
||||
* Accept a single tagged route execution into the buffer.
|
||||
*
|
||||
* @return true if the item was buffered, false if buffer is full (backpressure)
|
||||
*/
|
||||
public boolean acceptExecution(RouteExecution execution) {
|
||||
public boolean acceptExecution(TaggedExecution execution) {
|
||||
return executionBuffer.offer(execution);
|
||||
}
|
||||
|
||||
/**
|
||||
* Accept a single route diagram into the buffer.
|
||||
* Accept a single tagged route diagram into the buffer.
|
||||
*
|
||||
* @return true if the item was buffered, false if buffer is full (backpressure)
|
||||
*/
|
||||
public boolean acceptDiagram(RouteGraph graph) {
|
||||
return diagramBuffer.offer(graph);
|
||||
public boolean acceptDiagram(TaggedDiagram diagram) {
|
||||
return diagramBuffer.offer(diagram);
|
||||
}
|
||||
|
||||
/**
|
||||
* Accept a batch of route diagrams into the buffer.
|
||||
* Accept a batch of tagged route diagrams into the buffer.
|
||||
*
|
||||
* @return true if all items were buffered, false if buffer is full (backpressure)
|
||||
*/
|
||||
public boolean acceptDiagrams(List<RouteGraph> graphs) {
|
||||
return diagramBuffer.offerBatch(graphs);
|
||||
public boolean acceptDiagrams(List<TaggedDiagram> diagrams) {
|
||||
return diagramBuffer.offerBatch(diagrams);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,14 +93,14 @@ public class IngestionService {
|
||||
/**
|
||||
* @return the execution write buffer (for use by flush scheduler)
|
||||
*/
|
||||
public WriteBuffer<RouteExecution> getExecutionBuffer() {
|
||||
public WriteBuffer<TaggedExecution> getExecutionBuffer() {
|
||||
return executionBuffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the diagram write buffer (for use by flush scheduler)
|
||||
*/
|
||||
public WriteBuffer<RouteGraph> getDiagramBuffer() {
|
||||
public WriteBuffer<TaggedDiagram> getDiagramBuffer() {
|
||||
return diagramBuffer;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.cameleer3.server.core.ingestion;
|
||||
|
||||
import com.cameleer3.common.graph.RouteGraph;
|
||||
|
||||
/**
|
||||
* Pairs a {@link RouteGraph} with the authenticated agent identity.
|
||||
* <p>
|
||||
* The agent ID is extracted from the SecurityContext in the controller layer
|
||||
* and carried through the write buffer so the flush scheduler can persist it.
|
||||
*/
|
||||
public record TaggedDiagram(String agentId, RouteGraph graph) {}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.cameleer3.server.core.ingestion;
|
||||
|
||||
import com.cameleer3.common.model.RouteExecution;
|
||||
|
||||
/**
|
||||
* Pairs a {@link RouteExecution} with the authenticated agent identity.
|
||||
* <p>
|
||||
* The agent ID is extracted from the SecurityContext in the controller layer
|
||||
* and carried through the write buffer so the flush scheduler can persist it.
|
||||
*/
|
||||
public record TaggedExecution(String agentId, RouteExecution execution) {}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cameleer3.server.core.storage;
|
||||
|
||||
import com.cameleer3.common.graph.RouteGraph;
|
||||
import com.cameleer3.server.core.ingestion.TaggedDiagram;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -10,9 +11,9 @@ import java.util.Optional;
|
||||
public interface DiagramRepository {
|
||||
|
||||
/**
|
||||
* Store a route graph. Uses content-hash deduplication via ReplacingMergeTree.
|
||||
* Store a tagged route graph. Uses content-hash deduplication via ReplacingMergeTree.
|
||||
*/
|
||||
void store(RouteGraph graph);
|
||||
void store(TaggedDiagram diagram);
|
||||
|
||||
/**
|
||||
* Find a route graph by its content hash.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.cameleer3.server.core.storage;
|
||||
|
||||
import com.cameleer3.common.model.RouteExecution;
|
||||
import com.cameleer3.server.core.detail.RawExecutionRow;
|
||||
import com.cameleer3.server.core.ingestion.TaggedExecution;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@@ -12,10 +12,10 @@ import java.util.Optional;
|
||||
public interface ExecutionRepository {
|
||||
|
||||
/**
|
||||
* Insert a batch of route executions.
|
||||
* Insert a batch of tagged route executions.
|
||||
* Implementations must perform a single batch insert for efficiency.
|
||||
*/
|
||||
void insertBatch(List<RouteExecution> executions);
|
||||
void insertBatch(List<TaggedExecution> executions);
|
||||
|
||||
/**
|
||||
* Find a raw execution row by execution ID, including all parallel arrays
|
||||
|
||||
Reference in New Issue
Block a user