davsclaus commented on code in PR #29349:
URL: https://github.com/apache/camel/pull/29349#discussion_r4494826471


##########
dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ErrorsTab.java:
##########
@@ -550,6 +550,7 @@ private void renderDetail(Frame frame, Rect area, ErrorInfo 
ei) {
                 ei.exchangeId, ei.routeId, ei.nodeId, null, ei.location,
                 ei.elapsed, ei.threadName, !ei.handled);
         addRepeatLine(lines, ei);
+        ChaosMarks.addDetailLine(lines, ctx, ctx.findSelectedIntegration(), 
ei.exchangeId, ei.properties);

Review Comment:
   Fixed in #29352: `renderDetail` takes the `IntegrationInfo` from 
`renderContent` now, the same way `ActivityTab.detailLines` does.
   
   _Claude Code on behalf of Claus Ibsen_



##########
dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosMarks.java:
##########
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.core.commands.tui;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import dev.tamboui.style.Style;
+import dev.tamboui.text.Line;
+import dev.tamboui.text.Span;
+import dev.tamboui.widgets.table.Cell;
+
+/**
+ * The exchanges a chaos rule faulted, so the Activity and Errors tabs mark 
them ({@code 🎲r1}): a failure made on
+ * purpose is then not debugged as a real one. An error has the exchange 
property {@code CamelChaosRule} that
+ * camel-chaos sets (CAMEL-26678). An activity entry has no properties, so the 
exchange ids of the recent faults of the
+ * chaos report are kept as the status comes in, every second, the last ones 
per integration.
+ */
+final class ChaosMarks {
+
+    /** The exchange property camel-chaos sets on an exchange a rule faulted, 
with the id of the rule. */
+    static final String PROPERTY = "CamelChaosRule";
+
+    // the faulted exchanges kept per integration: enough for the last minutes 
of activity
+    static final int MAX = 2000;
+
+    private final Map<String, Map<String, String>> byPid = new HashMap<>();

Review Comment:
   Fixed in #29352: `ChaosMarks.retain` drops the pids that are no longer 
running after each status refresh.
   
   _Claude Code on behalf of Claus Ibsen_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to