claude-code-kanban 2.2.0-rc.2 → 2.2.0-rc.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-kanban",
3
- "version": "2.2.0-rc.2",
3
+ "version": "2.2.0-rc.4",
4
4
  "description": "A web-based Kanban board for viewing Claude Code tasks with agent teams support",
5
5
  "main": "server.js",
6
6
  "bin": {
package/public/app.js CHANGED
@@ -1765,19 +1765,16 @@ function renderSessions() {
1765
1765
  let filteredSessions = sessions;
1766
1766
  if (sessionFilter === 'active') {
1767
1767
  const ACTIVE_PLAN_MS = 15 * 60 * 1000;
1768
- const RECENTLY_MODIFIED_MS = 5 * 60 * 1000;
1769
1768
  const now = Date.now();
1770
1769
  const activeSessionIds = new Set();
1771
1770
  filteredSessions = filteredSessions.filter((s) => {
1772
1771
  const isActive =
1773
1772
  s.hasMessages &&
1774
- (s.pending > 0 ||
1775
- s.inProgress > 0 ||
1773
+ ((!s.sharedTaskList && (s.pending > 0 || s.inProgress > 0)) ||
1776
1774
  s.hasActiveAgents ||
1777
1775
  s.hasWaitingForUser ||
1778
1776
  s.hasRecentLog ||
1779
- (s.hasPlan && !s.planImplementationSessionId && now - new Date(s.modifiedAt).getTime() <= ACTIVE_PLAN_MS) ||
1780
- now - new Date(s.modifiedAt).getTime() <= RECENTLY_MODIFIED_MS);
1777
+ (s.hasPlan && !s.planImplementationSessionId && now - new Date(s.modifiedAt).getTime() <= ACTIVE_PLAN_MS));
1781
1778
  if (isActive) activeSessionIds.add(s.id);
1782
1779
  return isActive;
1783
1780
  });
package/server.js CHANGED
@@ -561,19 +561,30 @@ app.get('/api/sessions', async (req, res) => {
561
561
  tasksDir: customTaskDir,
562
562
  sharedTaskList: taskListName,
563
563
  });
564
- if (counts.newestTaskMtime) {
565
- const taskMtime = counts.newestTaskMtime.toISOString();
566
- if (taskMtime > existing.modifiedAt) existing.modifiedAt = taskMtime;
567
- }
568
564
  } else {
569
565
  const meta = { ...(metadata[sessionId] || {}) };
570
566
  if (!meta.project && info.project) meta.project = info.project;
567
+ const logStat = getSessionLogStat(meta);
568
+ const logMtime = logStat.mtime;
569
+ const logAge = logMtime ? Date.now() - logMtime : Infinity;
570
+ const stale = logAge > AGENT_STALE_MS;
571
+ const agentDir = path.join(AGENT_ACTIVITY_DIR, sessionId);
572
+ const agentStatus = checkAgentStatus(agentDir, stale, logMtime, false);
573
+ let modifiedAt = info.updatedAt || new Date(0).toISOString();
574
+ if (logMtime) {
575
+ const jsonlMtime = new Date(logMtime).toISOString();
576
+ if (jsonlMtime > modifiedAt) modifiedAt = jsonlMtime;
577
+ }
571
578
  sessionsMap.set(sessionId, buildSessionObject(sessionId, meta, {
579
+ _logStat: logStat,
572
580
  taskCount: counts.taskCount,
573
581
  completed: counts.completed,
574
582
  inProgress: counts.inProgress,
575
583
  pending: counts.pending,
576
- modifiedAt: counts.newestTaskMtime ? counts.newestTaskMtime.toISOString() : (info.updatedAt || new Date(0).toISOString()),
584
+ modifiedAt,
585
+ hasActiveAgents: agentStatus.hasActive,
586
+ hasRunningAgents: agentStatus.hasRunning,
587
+ hasWaitingForUser: !!agentStatus.waitingForUser,
577
588
  tasksDir: customTaskDir,
578
589
  sharedTaskList: taskListName,
579
590
  }));