claude-code-kanban 7.38.0 → 7.39.0
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/hub-app.json +11 -0
- package/lib/terminal.js +22 -3
- package/package.json +1 -1
- package/public/app.js +17 -7
- package/public/index.html +1 -5
- package/public/style.css +120 -5
package/hub-app.json
CHANGED
|
@@ -33,6 +33,17 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"settings": [
|
|
36
|
+
{
|
|
37
|
+
"key": "sidebarSide",
|
|
38
|
+
"type": "choice",
|
|
39
|
+
"label": "Sidebar side",
|
|
40
|
+
"help": "Puts the sessions sidebar on the left or the right of the board.",
|
|
41
|
+
"options": [
|
|
42
|
+
{ "value": "left", "label": "Left" },
|
|
43
|
+
{ "value": "right", "label": "Right" }
|
|
44
|
+
],
|
|
45
|
+
"default": "left"
|
|
46
|
+
},
|
|
36
47
|
{
|
|
37
48
|
"key": "zenCentered",
|
|
38
49
|
"type": "boolean",
|
package/lib/terminal.js
CHANGED
|
@@ -394,6 +394,12 @@ function createTerminalService(o) {
|
|
|
394
394
|
const savedState = config.restore ? o.load?.() : null;
|
|
395
395
|
const saved = savedState?.sessions;
|
|
396
396
|
const restoreQueue = Array.isArray(saved) ? saved.filter((id) => typeof id === 'string' && UUID_RE.test(id)) : [];
|
|
397
|
+
// The hub's log has no timestamps, and a terminal that leaves the saved list is not restored
|
|
398
|
+
// on the next start, so each one is logged with the time and the reason.
|
|
399
|
+
let savedIds = new Set(restoreQueue);
|
|
400
|
+
const dropReasons = new Map();
|
|
401
|
+
const writeLog = o.log || console.log;
|
|
402
|
+
const log = (msg) => writeLog(`${new Date().toISOString()} ${msg}`);
|
|
397
403
|
// A resumed claude gets back the shared task list it was started with.
|
|
398
404
|
const savedTaskLists = {};
|
|
399
405
|
for (const [id, list] of Object.entries(savedState?.taskLists || {})) {
|
|
@@ -457,6 +463,11 @@ function createTerminalService(o) {
|
|
|
457
463
|
if (s.taskList) taskLists[s.id] = s.taskList;
|
|
458
464
|
terminalIds[s.id] = s.terminalId;
|
|
459
465
|
}
|
|
466
|
+
for (const id of savedIds) {
|
|
467
|
+
if (!ids.has(id)) log(`Terminal ${id} left the restore list: ${dropReasons.get(id) || 'reason not recorded'}`);
|
|
468
|
+
}
|
|
469
|
+
savedIds = ids;
|
|
470
|
+
dropReasons.clear();
|
|
460
471
|
const data = {
|
|
461
472
|
sessions: [...ids],
|
|
462
473
|
...(Object.keys(taskLists).length && { taskLists }),
|
|
@@ -472,14 +483,19 @@ function createTerminalService(o) {
|
|
|
472
483
|
// startNew. A session that runs elsewhere or lost its transcript is dropped.
|
|
473
484
|
function restore() {
|
|
474
485
|
if (!restoreQueue.length || unavailableReason()) return;
|
|
475
|
-
|
|
486
|
+
log(`Restoring ${restoreQueue.length} terminal(s): ${restoreQueue.join(', ')}`);
|
|
476
487
|
const next = async () => {
|
|
477
488
|
while (restoreQueue.length && !shuttingDown) {
|
|
478
489
|
const id = restoreQueue.shift();
|
|
479
|
-
if (sessions.has(id)
|
|
490
|
+
if (sessions.has(id)) continue;
|
|
491
|
+
if (o.isLiveElsewhere(id)) {
|
|
492
|
+
dropReasons.set(id, 'not restored, claude runs it outside this board');
|
|
493
|
+
continue;
|
|
494
|
+
}
|
|
480
495
|
const r = await start(id, 'resume', {}, HEADLESS_COLS, HEADLESS_ROWS);
|
|
481
496
|
if (!r.error) break;
|
|
482
|
-
|
|
497
|
+
dropReasons.set(id, `not restored, ${r.error}`);
|
|
498
|
+
log(`Could not restore terminal ${id}: ${r.error}`);
|
|
483
499
|
}
|
|
484
500
|
scheduleSave();
|
|
485
501
|
if (restoreQueue.length && !shuttingDown) setTimeout(next, restoreGapMs).unref();
|
|
@@ -621,6 +637,7 @@ function createTerminalService(o) {
|
|
|
621
637
|
}
|
|
622
638
|
s.claudeExitedAt = Date.now();
|
|
623
639
|
s.claudePid = null;
|
|
640
|
+
dropReasons.set(s.id, `claude exited (pid ${pid}), its shell still runs`);
|
|
624
641
|
s.status.dropTransient();
|
|
625
642
|
moved = true;
|
|
626
643
|
}
|
|
@@ -709,6 +726,7 @@ function createTerminalService(o) {
|
|
|
709
726
|
});
|
|
710
727
|
proc.onExit(({ exitCode }) => {
|
|
711
728
|
s.exited = true;
|
|
729
|
+
if (!s.ended) dropReasons.set(s.id, `terminal process exited (code ${exitCode})`);
|
|
712
730
|
clearInterval(s.pickTimer);
|
|
713
731
|
clearInterval(s.boostTimer);
|
|
714
732
|
clearInterval(s.submitTimer);
|
|
@@ -974,6 +992,7 @@ function createTerminalService(o) {
|
|
|
974
992
|
// kill() returns before the process is gone, so an ended session leaves list() at once.
|
|
975
993
|
function kill(s) {
|
|
976
994
|
s.ended = true;
|
|
995
|
+
dropReasons.set(s.id, 'ended from the board');
|
|
977
996
|
s.pty.kill();
|
|
978
997
|
changed();
|
|
979
998
|
}
|
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -1052,9 +1052,8 @@ function initMessagePanelFull() {
|
|
|
1052
1052
|
const panel = document.getElementById('message-panel');
|
|
1053
1053
|
const sidebar = document.querySelector('.sidebar');
|
|
1054
1054
|
if (sidebar) {
|
|
1055
|
-
const sync = () => panel.style.setProperty('--sidebar-
|
|
1055
|
+
const sync = ([e]) => panel.style.setProperty('--sidebar-w', `${e.borderBoxSize[0].inlineSize}px`);
|
|
1056
1056
|
new ResizeObserver(sync).observe(sidebar);
|
|
1057
|
-
sync();
|
|
1058
1057
|
}
|
|
1059
1058
|
applyMessagePanelFull(store.getItem(MESSAGE_PANEL_FULL_KEY) === 'true');
|
|
1060
1059
|
}
|
|
@@ -12765,6 +12764,7 @@ let terminalHost = null;
|
|
|
12765
12764
|
let sentTerminalHost = null;
|
|
12766
12765
|
|
|
12767
12766
|
function applyHubSettings(s) {
|
|
12767
|
+
document.documentElement.classList.toggle('sidebar-right', s.sidebarSide === 'right');
|
|
12768
12768
|
sessionsList.classList.toggle('zen-centered', s.zenCentered === true);
|
|
12769
12769
|
if (s.zenPattern) sessionsList.dataset.zenPattern = s.zenPattern;
|
|
12770
12770
|
else delete sessionsList.dataset.zenPattern;
|
|
@@ -13175,15 +13175,16 @@ function _initDragResize(handle, { onStart, onMove, onEnd }) {
|
|
|
13175
13175
|
function initSidebarResize() {
|
|
13176
13176
|
const sidebar = document.querySelector('.sidebar');
|
|
13177
13177
|
const handle = document.getElementById('sidebar-resize');
|
|
13178
|
-
let startWidth;
|
|
13178
|
+
let startWidth, sign;
|
|
13179
13179
|
|
|
13180
13180
|
_initDragResize(handle, {
|
|
13181
13181
|
onStart() {
|
|
13182
13182
|
if (sidebar.classList.contains('collapsed')) return false;
|
|
13183
13183
|
startWidth = sidebar.offsetWidth;
|
|
13184
|
+
sign = growSign(handle, sidebar);
|
|
13184
13185
|
},
|
|
13185
13186
|
onMove(dx) {
|
|
13186
|
-
const w = Math.min(600, Math.max(200, startWidth + dx));
|
|
13187
|
+
const w = Math.min(600, Math.max(200, startWidth + sign * dx));
|
|
13187
13188
|
sidebar.style.setProperty('--sidebar-width', `${w}px`);
|
|
13188
13189
|
sidebar.style.width = `${w}px`;
|
|
13189
13190
|
},
|
|
@@ -13197,15 +13198,23 @@ function initPanelResize(panelId, handleId, cssVar) {
|
|
|
13197
13198
|
initResize(document.getElementById(panelId), document.getElementById(handleId), cssVar, panelWidthKey(panelId), 200);
|
|
13198
13199
|
}
|
|
13199
13200
|
|
|
13201
|
+
// The sidebar side setting moves grips between edges, so the drag direction comes from where the grip is.
|
|
13202
|
+
function growSign(handle, el) {
|
|
13203
|
+
const h = handle.getBoundingClientRect();
|
|
13204
|
+
const r = el.getBoundingClientRect();
|
|
13205
|
+
return h.left + h.width / 2 > r.left + r.width / 2 ? 1 : -1;
|
|
13206
|
+
}
|
|
13207
|
+
|
|
13200
13208
|
function initResize(panel, handle, cssVar, key, min) {
|
|
13201
|
-
let startWidth;
|
|
13209
|
+
let startWidth, sign;
|
|
13202
13210
|
_initDragResize(handle, {
|
|
13203
13211
|
onStart() {
|
|
13204
13212
|
startWidth = panel.offsetWidth;
|
|
13213
|
+
sign = growSign(handle, panel);
|
|
13205
13214
|
panel.classList.add('resizing');
|
|
13206
13215
|
},
|
|
13207
13216
|
onMove(dx) {
|
|
13208
|
-
panel.style.setProperty(cssVar, `${Math.max(min, startWidth
|
|
13217
|
+
panel.style.setProperty(cssVar, `${Math.max(min, startWidth + sign * dx)}px`);
|
|
13209
13218
|
},
|
|
13210
13219
|
onEnd() {
|
|
13211
13220
|
panel.classList.remove('resizing');
|
|
@@ -19364,11 +19373,12 @@ function startDockDrag(e, panel) {
|
|
|
19364
19373
|
edge.setPointerCapture(e.pointerId);
|
|
19365
19374
|
const hostW = dockHostWidth();
|
|
19366
19375
|
const start = { x: e.clientX, w: panel.offsetWidth };
|
|
19376
|
+
const sign = growSign(edge, panel);
|
|
19367
19377
|
let w = start.w;
|
|
19368
19378
|
let raf = 0;
|
|
19369
19379
|
document.body.classList.add('show-resizing');
|
|
19370
19380
|
const move = (ev) => {
|
|
19371
|
-
w = showDockWidth(Math.round(start.w +
|
|
19381
|
+
w = showDockWidth(Math.round(start.w + sign * (ev.clientX - start.x)), hostW);
|
|
19372
19382
|
raf ||= requestAnimationFrame(() => {
|
|
19373
19383
|
raf = 0;
|
|
19374
19384
|
panel.style.setProperty('--show-dock-drag', `${w}px`);
|
package/public/index.html
CHANGED
|
@@ -299,11 +299,6 @@
|
|
|
299
299
|
<circle cx="12" cy="17" r="0.5" fill="currentColor"/>
|
|
300
300
|
</svg>
|
|
301
301
|
</button>
|
|
302
|
-
<a href="https://github.com/NikiforovAll/claude-code-kanban" target="_blank" class="icon-btn" title="View on GitHub" aria-label="View on GitHub">
|
|
303
|
-
<svg viewBox="0 0 24 24" fill="currentColor" width="16" height="16">
|
|
304
|
-
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/>
|
|
305
|
-
</svg>
|
|
306
|
-
</a>
|
|
307
302
|
</div>
|
|
308
303
|
</header>
|
|
309
304
|
|
|
@@ -557,6 +552,7 @@
|
|
|
557
552
|
<div class="modal-header">
|
|
558
553
|
<h3 class="modal-title">Keyboard Shortcuts</h3>
|
|
559
554
|
<a class="help-docs" id="help-docs" href="https://nikiforovall.blog/claude-code-kanban/" target="_blank" rel="noopener">Docs ↗</a>
|
|
555
|
+
<a class="help-docs" href="https://github.com/NikiforovAll/claude-code-kanban" target="_blank" rel="noopener">GitHub ↗</a>
|
|
560
556
|
<button class="modal-close" aria-label="Close dialog" onclick="closeHelpModal()">
|
|
561
557
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
562
558
|
<path d="M18 6L6 18M6 6l12 12"/>
|
package/public/style.css
CHANGED
|
@@ -150,6 +150,10 @@ body::before {
|
|
|
150
150
|
height: 100vh;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
.sidebar-right .app {
|
|
154
|
+
flex-direction: row-reverse;
|
|
155
|
+
}
|
|
156
|
+
|
|
153
157
|
/* #endregion */
|
|
154
158
|
|
|
155
159
|
/* #region SIDEBAR */
|
|
@@ -366,6 +370,70 @@ body::before {
|
|
|
366
370
|
display: none;
|
|
367
371
|
}
|
|
368
372
|
|
|
373
|
+
.sidebar-right .sidebar {
|
|
374
|
+
border-right: none;
|
|
375
|
+
border-left: 1px solid color-mix(in srgb, var(--border) 35%, transparent);
|
|
376
|
+
box-shadow: -1px 0 12px rgba(0, 0, 0, 0.04);
|
|
377
|
+
}
|
|
378
|
+
.sidebar-right .sidebar-resize-handle {
|
|
379
|
+
right: auto;
|
|
380
|
+
left: 0;
|
|
381
|
+
}
|
|
382
|
+
.sidebar-right .sessions-list {
|
|
383
|
+
padding-left: 10px;
|
|
384
|
+
}
|
|
385
|
+
.sidebar-right
|
|
386
|
+
:is(
|
|
387
|
+
.sg-section-label,
|
|
388
|
+
.session-group-header,
|
|
389
|
+
.project-group-header,
|
|
390
|
+
.project-group-breadcrumb,
|
|
391
|
+
.pinned-sub-header,
|
|
392
|
+
.sg-sub-label
|
|
393
|
+
) {
|
|
394
|
+
margin-left: -2px;
|
|
395
|
+
}
|
|
396
|
+
.sidebar-right :is(.sg-section-label, .session-group-header, .project-group-header) {
|
|
397
|
+
padding-left: 6px;
|
|
398
|
+
}
|
|
399
|
+
.sidebar-right .project-group-breadcrumb {
|
|
400
|
+
padding-left: 24px;
|
|
401
|
+
}
|
|
402
|
+
.sidebar-right .pinned-sub-header {
|
|
403
|
+
padding-left: 14px;
|
|
404
|
+
}
|
|
405
|
+
.sidebar-right .sg-sub-label {
|
|
406
|
+
padding-left: 4px;
|
|
407
|
+
}
|
|
408
|
+
.sidebar-right .sidebar-toggle-btn svg {
|
|
409
|
+
scale: -1 1;
|
|
410
|
+
}
|
|
411
|
+
.sidebar-right .app > .detail-panel:not(.expanded),
|
|
412
|
+
.sidebar-right .app > .message-panel {
|
|
413
|
+
left: 0;
|
|
414
|
+
right: auto;
|
|
415
|
+
border-left: none;
|
|
416
|
+
border-right: 1px solid color-mix(in srgb, var(--border) 35%, transparent);
|
|
417
|
+
box-shadow: 1px 0 12px rgba(0, 0, 0, 0.04);
|
|
418
|
+
}
|
|
419
|
+
.sidebar-right .app > .message-panel.full-width {
|
|
420
|
+
right: var(--sidebar-w, 0);
|
|
421
|
+
}
|
|
422
|
+
.sidebar-right .app > :is(.detail-panel, .message-panel) > .panel-resize-handle,
|
|
423
|
+
.sidebar-right .kanbot-popover.docked .kanbot-resize {
|
|
424
|
+
left: auto;
|
|
425
|
+
right: 0;
|
|
426
|
+
}
|
|
427
|
+
.sidebar-right .kanbot-popover:not(.expanded, .docked) {
|
|
428
|
+
left: auto;
|
|
429
|
+
right: 12px;
|
|
430
|
+
}
|
|
431
|
+
.sidebar-right .kanbot-popover.docked:not(.expanded) {
|
|
432
|
+
left: 0;
|
|
433
|
+
right: auto;
|
|
434
|
+
border-width: 0 1px 0 0;
|
|
435
|
+
}
|
|
436
|
+
|
|
369
437
|
.panel-resize-handle {
|
|
370
438
|
position: absolute;
|
|
371
439
|
top: 0;
|
|
@@ -4137,6 +4205,8 @@ code.ct .ct-has[aria-expanded='false'] .ct-name::after {
|
|
|
4137
4205
|
.terminal-pane {
|
|
4138
4206
|
--dock-rail-w: 0px;
|
|
4139
4207
|
--dock-panel-w: 0px;
|
|
4208
|
+
--dock-start: 0px;
|
|
4209
|
+
--dock-end: calc(var(--dock-panel-w) + var(--dock-rail-w));
|
|
4140
4210
|
}
|
|
4141
4211
|
|
|
4142
4212
|
.terminal-pane.dock-rail-on {
|
|
@@ -4156,13 +4226,14 @@ code.ct .ct-has[aria-expanded='false'] .ct-name::after {
|
|
|
4156
4226
|
|
|
4157
4227
|
.terminal-pane.dock-rail-on .terminal-frame,
|
|
4158
4228
|
.terminal-pane.show-docked .terminal-frame {
|
|
4159
|
-
|
|
4229
|
+
margin-left: var(--dock-start);
|
|
4230
|
+
width: calc(100% - var(--dock-start) - var(--dock-end));
|
|
4160
4231
|
}
|
|
4161
4232
|
|
|
4162
4233
|
.terminal-pane.dock-rail-on .terminal-bar,
|
|
4163
4234
|
.terminal-pane.show-docked .terminal-bar {
|
|
4164
4235
|
top: 8px;
|
|
4165
|
-
right: calc(8px + var(--dock-
|
|
4236
|
+
right: calc(8px + var(--dock-end));
|
|
4166
4237
|
}
|
|
4167
4238
|
|
|
4168
4239
|
.dock-rail {
|
|
@@ -4236,8 +4307,8 @@ code.ct .ct-has[aria-expanded='false'] .ct-name::after {
|
|
|
4236
4307
|
box-sizing: border-box;
|
|
4237
4308
|
display: flex;
|
|
4238
4309
|
flex-direction: column;
|
|
4239
|
-
border
|
|
4240
|
-
border-
|
|
4310
|
+
border: solid var(--border);
|
|
4311
|
+
border-width: 0 0 1px 1px;
|
|
4241
4312
|
background: var(--bg-surface);
|
|
4242
4313
|
color: var(--text-secondary);
|
|
4243
4314
|
font-family: var(--font-mono);
|
|
@@ -4806,6 +4877,46 @@ body.show-resizing iframe {
|
|
|
4806
4877
|
pointer-events: none;
|
|
4807
4878
|
}
|
|
4808
4879
|
|
|
4880
|
+
.sidebar-right .terminal-pane.dock-rail-on,
|
|
4881
|
+
.sidebar-right .terminal-pane.show-docked {
|
|
4882
|
+
padding-left: 0;
|
|
4883
|
+
--dock-start: calc(var(--dock-panel-w) + var(--dock-rail-w));
|
|
4884
|
+
--dock-end: 0px;
|
|
4885
|
+
}
|
|
4886
|
+
/* The gap sits in the frame's border, not the host, so the host's focus ring stays hidden there. */
|
|
4887
|
+
.sidebar-right .terminal-pane.dock-rail-on .terminal-frame,
|
|
4888
|
+
.sidebar-right .terminal-pane.show-docked .terminal-frame {
|
|
4889
|
+
box-sizing: border-box;
|
|
4890
|
+
border-left: 12px solid var(--bg-deep);
|
|
4891
|
+
}
|
|
4892
|
+
.sidebar-right .dock-rail {
|
|
4893
|
+
right: auto;
|
|
4894
|
+
left: 0;
|
|
4895
|
+
border-left: 0;
|
|
4896
|
+
border-right: 1px solid var(--border);
|
|
4897
|
+
}
|
|
4898
|
+
.sidebar-right .dock-addon,
|
|
4899
|
+
.sidebar-right .show-card.docked {
|
|
4900
|
+
right: auto;
|
|
4901
|
+
left: var(--dock-rail-w);
|
|
4902
|
+
border-style: solid;
|
|
4903
|
+
border-width: 0 1px 1px 0;
|
|
4904
|
+
}
|
|
4905
|
+
.sidebar-right .dock-addon.expanded,
|
|
4906
|
+
.sidebar-right .show-card.docked.expanded {
|
|
4907
|
+
right: 0;
|
|
4908
|
+
}
|
|
4909
|
+
.sidebar-right .show-card:not(.docked) {
|
|
4910
|
+
right: var(--show-inset);
|
|
4911
|
+
}
|
|
4912
|
+
.sidebar-right .show-card.expanded:not(.docked) {
|
|
4913
|
+
left: calc(var(--show-inset) + var(--dock-rail-w));
|
|
4914
|
+
}
|
|
4915
|
+
.sidebar-right .show-dock-edge {
|
|
4916
|
+
left: auto;
|
|
4917
|
+
right: 0;
|
|
4918
|
+
}
|
|
4919
|
+
|
|
4809
4920
|
.show-reopen {
|
|
4810
4921
|
display: inline-flex;
|
|
4811
4922
|
align-items: center;
|
|
@@ -5832,7 +5943,7 @@ body.show-resizing iframe {
|
|
|
5832
5943
|
width: 60vw;
|
|
5833
5944
|
}
|
|
5834
5945
|
.message-panel.full-width {
|
|
5835
|
-
left: var(--sidebar-
|
|
5946
|
+
left: var(--sidebar-w, 0);
|
|
5836
5947
|
width: auto;
|
|
5837
5948
|
}
|
|
5838
5949
|
.message-panel.full-width .panel-resize-handle {
|
|
@@ -9287,6 +9398,10 @@ body.light .msg-assistant .msg-text {
|
|
|
9287
9398
|
border-color 0.15s ease;
|
|
9288
9399
|
}
|
|
9289
9400
|
|
|
9401
|
+
.help-docs + .help-docs {
|
|
9402
|
+
margin-left: -6px;
|
|
9403
|
+
}
|
|
9404
|
+
|
|
9290
9405
|
.help-docs:hover {
|
|
9291
9406
|
color: var(--accent);
|
|
9292
9407
|
border-color: var(--accent);
|