claude-code-kanban 7.6.0 → 7.6.1
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 +1 -1
- package/public/app.js +18 -2
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -14695,8 +14695,11 @@ function syncShowFocus() {
|
|
|
14695
14695
|
setTimeout(() => showCardEl()?.classList.toggle('focused', isShowCardFocused()));
|
|
14696
14696
|
}
|
|
14697
14697
|
|
|
14698
|
+
// An HTML card's own keys and scroll keys reach it only inside its frame.
|
|
14698
14699
|
function focusShowBody() {
|
|
14699
|
-
|
|
14700
|
+
const frame = showState.frame;
|
|
14701
|
+
if (frame?.isConnected) frame.focus();
|
|
14702
|
+
else showCardEl()?.querySelector('.show-body')?.focus();
|
|
14700
14703
|
}
|
|
14701
14704
|
|
|
14702
14705
|
const SHOW_KEY_COMMANDS = { 'alt+Enter': 'expand', 'alt+w': 'close' };
|
|
@@ -14749,6 +14752,13 @@ function rememberTerminalIds(list) {
|
|
|
14749
14752
|
store.writeJson(SHOW_VIEW_KEY, showViews);
|
|
14750
14753
|
}
|
|
14751
14754
|
|
|
14755
|
+
// A session resumed after its terminal ended runs under the same PTY id in a new terminal, with a
|
|
14756
|
+
// new terminal id, so the next view change looks it up again.
|
|
14757
|
+
function forgetEndedTerminals() {
|
|
14758
|
+
for (const pty of terminalIds.keys()) if (!runningTerminals.has(pty)) terminalIds.delete(pty);
|
|
14759
|
+
if (!runningTerminals.has(showState.lookup)) showState.lookup = null;
|
|
14760
|
+
}
|
|
14761
|
+
|
|
14752
14762
|
function setShowView(tid, view) {
|
|
14753
14763
|
const set = SHOW_VIEW_FLAGS.filter((f) => view[f]);
|
|
14754
14764
|
const old = showViews[tid] || {};
|
|
@@ -14923,7 +14933,7 @@ async function renderShowBody(p, samePost) {
|
|
|
14923
14933
|
showState.path = data && !data.waiting ? data.path : null;
|
|
14924
14934
|
const html = data?.kind === 'html' && !data.waiting;
|
|
14925
14935
|
// A new frame or document drops focus to the page, and Ctrl +/- then zooms the terminal.
|
|
14926
|
-
const refocus = isShowCardFocused() ?
|
|
14936
|
+
const refocus = isShowCardFocused() ? focusShowBody : () => {};
|
|
14927
14937
|
card.classList.toggle('html', html);
|
|
14928
14938
|
if (html) {
|
|
14929
14939
|
const restoreY = samePost && showState.frame ? showState.frameY : 0;
|
|
@@ -14987,6 +14997,10 @@ function setShowReview(opts) {
|
|
|
14987
14997
|
function createShowFrame(title, srcdoc) {
|
|
14988
14998
|
const frame = createPreviewFrame('show-frame', srcdoc, 'allow-scripts');
|
|
14989
14999
|
frame.title = title;
|
|
15000
|
+
// Focus given before a document loads stays on the frame element, out of the document's keys.
|
|
15001
|
+
frame.addEventListener('load', () => {
|
|
15002
|
+
if (frame === document.activeElement) frame.contentWindow?.focus();
|
|
15003
|
+
});
|
|
14990
15004
|
showState.frame = frame;
|
|
14991
15005
|
showState.frameFocused = false;
|
|
14992
15006
|
return frame;
|
|
@@ -15417,6 +15431,8 @@ async function loadTerminals() {
|
|
|
15417
15431
|
|
|
15418
15432
|
function setRunningTerminals(ids) {
|
|
15419
15433
|
runningTerminals = new Set(ids);
|
|
15434
|
+
forgetEndedTerminals();
|
|
15435
|
+
syncShowCard();
|
|
15420
15436
|
pushTerminalClaims();
|
|
15421
15437
|
if (ids.some((id) => !sessions.some((s) => s.id === id))) fetchSessions(false).catch(() => {});
|
|
15422
15438
|
else renderSessionViews();
|