1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages

Group source comments in logic views

This commit is contained in:
Andraxion 2026-07-25 22:51:56 -04:00
parent 6d659ba381
commit a30f021a52
4 changed files with 67 additions and 13 deletions

View file

@ -209,6 +209,9 @@ const contributionStyles = Object.freeze({
"logic-action": {
label: "Action", section: "Actions & calls", color: "#34d399", fill: "#15372e",
},
"logic-comment": {
label: "Comment", section: "Source commentary", color: "#7dd3fc", fill: "#173447",
},
"logic-control": {
label: "Control", section: "Loops & exception handling", color: "#c084fc", fill: "#302044",
},
@ -223,7 +226,7 @@ const contributionOrder = Object.freeze([
"focus", "composition", "behavior", "dependency", "execution",
"data", "evidence", "context", "related",
"logic-entry", "logic-condition", "logic-action", "logic-control",
"logic-convergence", "logic-terminal",
"logic-comment", "logic-convergence", "logic-terminal",
]);
const compositionRelations = new Set(["contains", "defines", "defined_in"]);
const behaviorRelations = new Set(["inherits", "implemented_by"]);
@ -939,6 +942,7 @@ function nodeContributionCategory(nodeId, data, topology) {
if (kind === "entry") return "logic-entry";
if (["condition", "case"].includes(kind)) return "logic-condition";
if (["action", "call"].includes(kind)) return "logic-action";
if (kind === "comment") return "logic-comment";
if (["loop", "try", "except", "finally", "break", "continue"].includes(kind)) {
return "logic-control";
}