@industry-theme/backlogmd-kanban-panel 1.2.5 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/panels.bundle.js +62 -50
- package/dist/panels.bundle.js.map +1 -1
- package/dist/src/hooks/useBacklogCore.d.ts +3 -0
- package/dist/src/hooks/useBacklogCore.d.ts.map +1 -1
- package/dist/src/panels/KanbanPanel.d.ts.map +1 -1
- package/dist/src/panels/kanban/hooks/useKanbanData.d.ts +3 -0
- package/dist/src/panels/kanban/hooks/useKanbanData.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/panels.bundle.js
CHANGED
|
@@ -8483,7 +8483,7 @@ class Core {
|
|
|
8483
8483
|
throw new Error("Core not initialized. Call initialize() or initializeLazy() first.");
|
|
8484
8484
|
}
|
|
8485
8485
|
}
|
|
8486
|
-
const version = "1.2.
|
|
8486
|
+
const version = "1.2.6";
|
|
8487
8487
|
const packageJson = {
|
|
8488
8488
|
version
|
|
8489
8489
|
};
|
|
@@ -8505,7 +8505,8 @@ function useKanbanData(options) {
|
|
|
8505
8505
|
const {
|
|
8506
8506
|
core: core2,
|
|
8507
8507
|
tasksLimit = DEFAULT_TASKS_LIMIT,
|
|
8508
|
-
events: events2
|
|
8508
|
+
events: events2,
|
|
8509
|
+
parentSpan
|
|
8509
8510
|
} = options;
|
|
8510
8511
|
const [tasks, setTasks] = useState([]);
|
|
8511
8512
|
const [isLoading, setIsLoading] = useState(true);
|
|
@@ -8543,7 +8544,8 @@ function useKanbanData(options) {
|
|
|
8543
8544
|
return;
|
|
8544
8545
|
}
|
|
8545
8546
|
const tracer = getTracer();
|
|
8546
|
-
|
|
8547
|
+
const parentContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : context.active();
|
|
8548
|
+
return context.with(parentContext, () => tracer.startActiveSpan("kanban.load", async (span) => {
|
|
8547
8549
|
const startTime = Date.now();
|
|
8548
8550
|
span.addEvent("kanban.loading");
|
|
8549
8551
|
setIsLoading(true);
|
|
@@ -8599,8 +8601,8 @@ function useKanbanData(options) {
|
|
|
8599
8601
|
setIsLoading(false);
|
|
8600
8602
|
span.end();
|
|
8601
8603
|
}
|
|
8602
|
-
});
|
|
8603
|
-
}, [core2, tasksLimit, buildColumnStates]);
|
|
8604
|
+
}));
|
|
8605
|
+
}, [core2, tasksLimit, buildColumnStates, parentSpan]);
|
|
8604
8606
|
useEffect(() => {
|
|
8605
8607
|
loadTasks();
|
|
8606
8608
|
}, [loadTasks]);
|
|
@@ -10393,8 +10395,9 @@ class PanelFileSystemAdapter {
|
|
|
10393
10395
|
}
|
|
10394
10396
|
function useBacklogCore(options) {
|
|
10395
10397
|
const {
|
|
10396
|
-
context:
|
|
10397
|
-
actions
|
|
10398
|
+
context: context$1,
|
|
10399
|
+
actions,
|
|
10400
|
+
parentSpan
|
|
10398
10401
|
} = options || {};
|
|
10399
10402
|
const [core2, setCore] = useState(null);
|
|
10400
10403
|
const [isInitializing, setIsInitializing] = useState(true);
|
|
@@ -10403,12 +10406,12 @@ function useBacklogCore(options) {
|
|
|
10403
10406
|
const [canWrite, setCanWrite] = useState(false);
|
|
10404
10407
|
const [filePaths, setFilePaths] = useState([]);
|
|
10405
10408
|
const fileTreeVersionRef = useRef(null);
|
|
10406
|
-
const contextRef = useRef(
|
|
10409
|
+
const contextRef = useRef(context$1);
|
|
10407
10410
|
const actionsRef = useRef(actions);
|
|
10408
10411
|
useEffect(() => {
|
|
10409
|
-
contextRef.current =
|
|
10412
|
+
contextRef.current = context$1;
|
|
10410
10413
|
actionsRef.current = actions;
|
|
10411
|
-
}, [
|
|
10414
|
+
}, [context$1, actions]);
|
|
10412
10415
|
const fetchFileContent = useCallback(async (path2) => {
|
|
10413
10416
|
const currentActions = actionsRef.current;
|
|
10414
10417
|
if (!(currentActions == null ? void 0 : currentActions.readFile)) {
|
|
@@ -10418,35 +10421,34 @@ function useBacklogCore(options) {
|
|
|
10418
10421
|
}, []);
|
|
10419
10422
|
const initializeCore = useCallback(async () => {
|
|
10420
10423
|
const tracer = getTracer();
|
|
10421
|
-
|
|
10424
|
+
const parentContext = parentSpan ? trace.setSpan(context.active(), parentSpan) : context.active();
|
|
10425
|
+
return context.with(parentContext, () => tracer.startActiveSpan("backlog.core.init", async (span) => {
|
|
10422
10426
|
var _a, _b;
|
|
10423
10427
|
const startTime = Date.now();
|
|
10424
10428
|
try {
|
|
10425
10429
|
span.addEvent("backlog.core.init.started");
|
|
10426
|
-
if (!
|
|
10430
|
+
if (!context$1 || !actions) {
|
|
10427
10431
|
console.log("[useBacklogCore] No context provided");
|
|
10428
10432
|
setIsBacklogProject(false);
|
|
10429
10433
|
setCore(null);
|
|
10430
10434
|
setIsInitializing(false);
|
|
10431
10435
|
setFilePaths([]);
|
|
10432
|
-
span.
|
|
10433
|
-
"
|
|
10434
|
-
"output.reason": "no_context"
|
|
10436
|
+
span.addEvent("backlog.core.init.skipped", {
|
|
10437
|
+
reason: "no_context"
|
|
10435
10438
|
});
|
|
10436
10439
|
span.setStatus({
|
|
10437
10440
|
code: SpanStatusCode.OK
|
|
10438
10441
|
});
|
|
10439
10442
|
return;
|
|
10440
10443
|
}
|
|
10441
|
-
const fileTreeSlice =
|
|
10444
|
+
const fileTreeSlice = context$1.fileTree;
|
|
10442
10445
|
if (!((_a = fileTreeSlice == null ? void 0 : fileTreeSlice.data) == null ? void 0 : _a.allFiles)) {
|
|
10443
10446
|
console.log("[useBacklogCore] FileTree not available");
|
|
10444
10447
|
setIsBacklogProject(false);
|
|
10445
10448
|
setCore(null);
|
|
10446
10449
|
setFilePaths([]);
|
|
10447
|
-
span.
|
|
10448
|
-
"
|
|
10449
|
-
"output.reason": "no_filetree"
|
|
10450
|
+
span.addEvent("backlog.core.init.skipped", {
|
|
10451
|
+
reason: "no_filetree"
|
|
10450
10452
|
});
|
|
10451
10453
|
span.setStatus({
|
|
10452
10454
|
code: SpanStatusCode.OK
|
|
@@ -10457,9 +10459,8 @@ function useBacklogCore(options) {
|
|
|
10457
10459
|
if (core2 && fileTreeVersionRef.current === currentVersion) {
|
|
10458
10460
|
console.log("[useBacklogCore] Already initialized for this version");
|
|
10459
10461
|
setIsInitializing(false);
|
|
10460
|
-
span.
|
|
10461
|
-
"
|
|
10462
|
-
"output.reason": "already_initialized"
|
|
10462
|
+
span.addEvent("backlog.core.init.skipped", {
|
|
10463
|
+
reason: "already_initialized"
|
|
10463
10464
|
});
|
|
10464
10465
|
span.setStatus({
|
|
10465
10466
|
code: SpanStatusCode.OK
|
|
@@ -10491,8 +10492,8 @@ function useBacklogCore(options) {
|
|
|
10491
10492
|
console.log("[useBacklogCore] Not a Backlog.md project");
|
|
10492
10493
|
setIsBacklogProject(false);
|
|
10493
10494
|
setCore(null);
|
|
10494
|
-
span.
|
|
10495
|
-
"
|
|
10495
|
+
span.addEvent("backlog.core.init.skipped", {
|
|
10496
|
+
reason: "not_backlog_project"
|
|
10496
10497
|
});
|
|
10497
10498
|
span.setStatus({
|
|
10498
10499
|
code: SpanStatusCode.OK
|
|
@@ -10538,8 +10539,8 @@ function useBacklogCore(options) {
|
|
|
10538
10539
|
setIsInitializing(false);
|
|
10539
10540
|
span.end();
|
|
10540
10541
|
}
|
|
10541
|
-
});
|
|
10542
|
-
}, [
|
|
10542
|
+
}));
|
|
10543
|
+
}, [context$1, actions, core2, fetchFileContent, parentSpan]);
|
|
10543
10544
|
useEffect(() => {
|
|
10544
10545
|
initializeCore();
|
|
10545
10546
|
}, [initializeCore]);
|
|
@@ -10838,6 +10839,18 @@ const KanbanPanel = ({
|
|
|
10838
10839
|
const [searchQuery, setSearchQuery] = useState("");
|
|
10839
10840
|
const [isSearchVisible, setIsSearchVisible] = useState(false);
|
|
10840
10841
|
const searchDebounceRef = useRef(null);
|
|
10842
|
+
const boardSessionSpanRef = useRef(null);
|
|
10843
|
+
const boardSessionStartedRef = useRef(false);
|
|
10844
|
+
if (!boardSessionStartedRef.current) {
|
|
10845
|
+
boardSessionStartedRef.current = true;
|
|
10846
|
+
const tracer = getTracer();
|
|
10847
|
+
boardSessionSpanRef.current = tracer.startSpan("board.session", {
|
|
10848
|
+
attributes: {
|
|
10849
|
+
"panel.id": "kanban-panel"
|
|
10850
|
+
}
|
|
10851
|
+
});
|
|
10852
|
+
boardSessionSpanRef.current.addEvent("board.session.started");
|
|
10853
|
+
}
|
|
10841
10854
|
useEffect(() => {
|
|
10842
10855
|
var _a2;
|
|
10843
10856
|
const tracer = getTracer();
|
|
@@ -10941,7 +10954,8 @@ const KanbanPanel = ({
|
|
|
10941
10954
|
canWrite
|
|
10942
10955
|
} = useBacklogCore({
|
|
10943
10956
|
context: context2,
|
|
10944
|
-
actions
|
|
10957
|
+
actions,
|
|
10958
|
+
parentSpan: boardSessionSpanRef.current ?? void 0
|
|
10945
10959
|
});
|
|
10946
10960
|
const {
|
|
10947
10961
|
statusColumns,
|
|
@@ -10956,9 +10970,25 @@ const KanbanPanel = ({
|
|
|
10956
10970
|
} = useKanbanData({
|
|
10957
10971
|
core: core2,
|
|
10958
10972
|
events: events2,
|
|
10959
|
-
tasksLimit: 20
|
|
10973
|
+
tasksLimit: 20,
|
|
10974
|
+
parentSpan: boardSessionSpanRef.current ?? void 0
|
|
10960
10975
|
});
|
|
10961
10976
|
const isLoading = isCoreInitializing || isKanbanLoading;
|
|
10977
|
+
const boardSessionEndedRef = useRef(false);
|
|
10978
|
+
useEffect(() => {
|
|
10979
|
+
if (!isLoading && boardSessionSpanRef.current && !boardSessionEndedRef.current) {
|
|
10980
|
+
boardSessionEndedRef.current = true;
|
|
10981
|
+
const span = boardSessionSpanRef.current;
|
|
10982
|
+
span.addEvent("board.session.complete", {
|
|
10983
|
+
"is.backlog.project": isBacklogProject,
|
|
10984
|
+
"has.error": Boolean(error)
|
|
10985
|
+
});
|
|
10986
|
+
span.setStatus({
|
|
10987
|
+
code: error ? SpanStatusCode.ERROR : SpanStatusCode.OK
|
|
10988
|
+
});
|
|
10989
|
+
span.end();
|
|
10990
|
+
}
|
|
10991
|
+
}, [isLoading, isBacklogProject, error]);
|
|
10962
10992
|
const {
|
|
10963
10993
|
milestones,
|
|
10964
10994
|
isLoading: isMilestonesLoading,
|
|
@@ -10967,28 +10997,6 @@ const KanbanPanel = ({
|
|
|
10967
10997
|
} = useMilestoneData({
|
|
10968
10998
|
core: core2
|
|
10969
10999
|
});
|
|
10970
|
-
const hasEmittedSkipped = useRef(false);
|
|
10971
|
-
useEffect(() => {
|
|
10972
|
-
if (!isLoading && !isBacklogProject && !hasEmittedSkipped.current) {
|
|
10973
|
-
hasEmittedSkipped.current = true;
|
|
10974
|
-
const tracer = getTracer();
|
|
10975
|
-
const span = tracer.startSpan("board.interaction", {
|
|
10976
|
-
attributes: {
|
|
10977
|
-
"is.backlog.project": false
|
|
10978
|
-
}
|
|
10979
|
-
});
|
|
10980
|
-
span.addEvent("kanban.skipped", {
|
|
10981
|
-
"reason": "not_backlog_project"
|
|
10982
|
-
});
|
|
10983
|
-
span.setStatus({
|
|
10984
|
-
code: SpanStatusCode.OK
|
|
10985
|
-
});
|
|
10986
|
-
span.end();
|
|
10987
|
-
}
|
|
10988
|
-
if (isBacklogProject) {
|
|
10989
|
-
hasEmittedSkipped.current = false;
|
|
10990
|
-
}
|
|
10991
|
-
}, [isLoading, isBacklogProject]);
|
|
10992
11000
|
const filteredTasksByStatus = useMemo(() => {
|
|
10993
11001
|
if (!searchQuery.trim()) {
|
|
10994
11002
|
return tasksByStatus;
|
|
@@ -11135,12 +11143,16 @@ const KanbanPanel = ({
|
|
|
11135
11143
|
if (!events2) return;
|
|
11136
11144
|
const unsubscribeSelected = events2.on("task:selected", (event) => {
|
|
11137
11145
|
if (event.source === "kanban-panel") return;
|
|
11146
|
+
console.log("[KanbanPanel] Received task:selected event:", event.source, event.payload);
|
|
11138
11147
|
const payload = event.payload;
|
|
11139
11148
|
if (payload == null ? void 0 : payload.taskId) {
|
|
11140
11149
|
const task = getTaskById(payload.taskId);
|
|
11150
|
+
console.log("[KanbanPanel] getTaskById result:", payload.taskId, "->", task ? `found: ${task.title}` : "NOT FOUND");
|
|
11141
11151
|
if (task) {
|
|
11152
|
+
console.log("[KanbanPanel] Calling handleTaskClick (same as user click)");
|
|
11142
11153
|
handleTaskClick(task);
|
|
11143
11154
|
} else {
|
|
11155
|
+
console.log("[KanbanPanel] Task not found, only setting selectedTaskId (NO navigation)");
|
|
11144
11156
|
setSelectedTaskId(payload.taskId);
|
|
11145
11157
|
}
|
|
11146
11158
|
}
|