shellpuppet 0.4.1 → 0.5.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/README.md +26 -4
- package/dist/agents/agy/index.js +1 -1
- package/dist/agents/agy/index.js.map +1 -1
- package/dist/agents/claude/index.js +1 -1
- package/dist/agents/claude/index.js.map +1 -1
- package/dist/agents/codex/draft.js +13 -6
- package/dist/agents/codex/draft.js.map +1 -1
- package/dist/agents/codex/index.js +1 -1
- package/dist/agents/codex/index.js.map +1 -1
- package/dist/agents/codex/nudge.js +7 -1
- package/dist/agents/codex/nudge.js.map +1 -1
- package/dist/agents/grok/index.js +1 -1
- package/dist/agents/grok/index.js.map +1 -1
- package/dist/agents/grok/nudge.js +13 -5
- package/dist/agents/grok/nudge.js.map +1 -1
- package/dist/agents/hermes/frame.js +4 -4
- package/dist/agents/hermes/frame.js.map +1 -1
- package/dist/agents/hermes/index.js +1 -1
- package/dist/agents/hermes/index.js.map +1 -1
- package/dist/agents/mimo/index.js +1 -1
- package/dist/agents/mimo/index.js.map +1 -1
- package/dist/agents/muse/index.js +1 -1
- package/dist/agents/muse/index.js.map +1 -1
- package/dist/agents/muse/nudge.js +8 -3
- package/dist/agents/muse/nudge.js.map +1 -1
- package/dist/agents/nudgeReading.d.ts +2 -0
- package/dist/agents/nudgeReading.js +3 -3
- package/dist/agents/nudgeReading.js.map +1 -1
- package/dist/agents/opencode/index.js +1 -1
- package/dist/agents/opencode/index.js.map +1 -1
- package/dist/agents/qoder/index.js +1 -1
- package/dist/agents/qoder/index.js.map +1 -1
- package/dist/agents/types.d.ts +4 -0
- package/dist/cli/index.js +275 -16
- package/dist/cli/index.js.map +1 -1
- package/dist/client/http.d.ts +8 -0
- package/dist/client/http.js +15 -1
- package/dist/client/http.js.map +1 -1
- package/dist/client/input.d.ts +24 -0
- package/dist/client/input.js +29 -0
- package/dist/client/input.js.map +1 -0
- package/dist/core/mailbox.d.ts +18 -6
- package/dist/core/mailbox.js +35 -10
- package/dist/core/mailbox.js.map +1 -1
- package/dist/core/manager.d.ts +1 -2
- package/dist/core/manager.js +35 -16
- package/dist/core/manager.js.map +1 -1
- package/dist/core/session.d.ts +29 -0
- package/dist/core/session.js +65 -11
- package/dist/core/session.js.map +1 -1
- package/dist/core/types.d.ts +2 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -1
- package/dist/core/windowsPtyStart.d.ts +2 -0
- package/dist/core/windowsPtyStart.js +6 -0
- package/dist/core/windowsPtyStart.js.map +1 -1
- package/dist/daemon/audit.d.ts +7 -7
- package/dist/daemon/audit.js +19 -17
- package/dist/daemon/audit.js.map +1 -1
- package/dist/daemon/config.d.ts +1 -1
- package/dist/daemon/config.js +1 -1
- package/dist/daemon/index.js +1 -0
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/launchProfiles.d.ts +6 -0
- package/dist/daemon/launchProfiles.js +21 -4
- package/dist/daemon/launchProfiles.js.map +1 -1
- package/dist/daemon/liveness.d.ts +11 -0
- package/dist/daemon/liveness.js +39 -0
- package/dist/daemon/liveness.js.map +1 -1
- package/dist/daemon/schedules.d.ts +1 -1
- package/dist/daemon/schedules.js +8 -3
- package/dist/daemon/schedules.js.map +1 -1
- package/dist/daemon/server.d.ts +17 -0
- package/dist/daemon/server.js +411 -143
- package/dist/daemon/server.js.map +1 -1
- package/dist/daemon/sessionFeed.d.ts +1 -1
- package/dist/daemon/sessionFeed.js +3 -1
- package/dist/daemon/sessionFeed.js.map +1 -1
- package/dist/mcp/tools.js +55 -35
- package/dist/mcp/tools.js.map +1 -1
- package/dist/viewer/dashboard.css +21 -8
- package/dist/viewer/dashboard.js +129 -34
- package/dist/viewer/index.html +1 -0
- package/dist/viewer/pane.js +267 -20
- package/dist/viewer/viewer.css +1 -1
- package/dist/viewer/viewer.js +1 -0
- package/package.json +1 -1
package/dist/viewer/dashboard.js
CHANGED
|
@@ -119,9 +119,26 @@
|
|
|
119
119
|
}
|
|
120
120
|
function updateMessageBadge(item) {
|
|
121
121
|
const count = unreadCount(item.id);
|
|
122
|
-
|
|
123
|
-
item.messageCount.
|
|
124
|
-
|
|
122
|
+
const text = count ? `${count} ${count === 1 ? 'message' : 'messages'}` : '';
|
|
123
|
+
for (const button of [item.messageCount, item.menuMessageCount]) {
|
|
124
|
+
button.hidden = count === 0;
|
|
125
|
+
button.textContent = text;
|
|
126
|
+
button.title = text;
|
|
127
|
+
button.setAttribute('aria-label', `${count} unread messages for ${item.label.textContent}`);
|
|
128
|
+
}
|
|
129
|
+
updateMenuStatus(item);
|
|
130
|
+
}
|
|
131
|
+
function updateMenuStatus(item) {
|
|
132
|
+
const floor = item.floor.hidden ? '' : item.floor.textContent;
|
|
133
|
+
const full = [item.role.textContent, item.badge.textContent, item.messageCount.textContent,
|
|
134
|
+
item.state.textContent, item.size.textContent, floor].filter(Boolean).join(' · ');
|
|
135
|
+
item.menuStatus.textContent = full;
|
|
136
|
+
item.menuStatus.title = full;
|
|
137
|
+
item.menuStatus.hidden = !full;
|
|
138
|
+
const urgent = [item.badge.textContent, floor].filter(Boolean).join(' · ');
|
|
139
|
+
item.menuButton.classList.toggle('has-status', Boolean(urgent));
|
|
140
|
+
item.menuButton.title = urgent || 'More pane controls';
|
|
141
|
+
item.menuButton.setAttribute('aria-description', item.menuButton.title);
|
|
125
142
|
}
|
|
126
143
|
async function loadMessages() {
|
|
127
144
|
messageTimer = null;
|
|
@@ -199,6 +216,7 @@
|
|
|
199
216
|
? saved.fontSize : saved.fontSize === null ? null
|
|
200
217
|
: Number.isInteger(configuredFont) && configuredFont >= 8 && configuredFont <= 32 ? configuredFont : null;
|
|
201
218
|
let autoFitTimer = null;
|
|
219
|
+
const pendingAutoFits = new Set();
|
|
202
220
|
let fontFitFrame = null;
|
|
203
221
|
let assignmentSettleUntil = 0;
|
|
204
222
|
let assignmentSettleStartedAt = 0;
|
|
@@ -210,7 +228,6 @@
|
|
|
210
228
|
} catch { /* Track sizes are optional. */ }
|
|
211
229
|
let activeDivider = null;
|
|
212
230
|
let endActiveDivider = null;
|
|
213
|
-
const focusOpenFits = new Set();
|
|
214
231
|
const incomingFits = new Set();
|
|
215
232
|
let prefix = typeof saved.prefix === 'string' && /^[a-z]$/.test(saved.prefix) ? saved.prefix : 'a';
|
|
216
233
|
let choosingPrefix = false;
|
|
@@ -398,32 +415,63 @@
|
|
|
398
415
|
document.getElementById('text-auto').textContent = fontSize === null ? 'Auto text' : `${fontSize} px`;
|
|
399
416
|
document.getElementById('text-auto').classList.toggle('active', fontSize === null);
|
|
400
417
|
}
|
|
401
|
-
function
|
|
418
|
+
function paneFitSignature(item) {
|
|
419
|
+
if (!item.client || !visible(item)) return null;
|
|
420
|
+
return JSON.stringify([item.id, item.term.clientWidth, item.term.clientHeight,
|
|
421
|
+
fontSize, window.devicePixelRatio, item.metricsRevision || 0]);
|
|
422
|
+
}
|
|
423
|
+
function scheduleAutoFit(items = shown(), reason = 'layout') {
|
|
402
424
|
scheduleFontFit();
|
|
425
|
+
for (const item of items) {
|
|
426
|
+
const signature = paneFitSignature(item);
|
|
427
|
+
const changed = signature !== item.fitSignature;
|
|
428
|
+
if (changed) {
|
|
429
|
+
item.fitSignature = signature;
|
|
430
|
+
item.client?.registerLayout(autoFit && signature !== null);
|
|
431
|
+
} else if (reason === 'connect') item.client?.registerLayout(autoFit && signature !== null, false);
|
|
432
|
+
if (signature !== null && (changed || reason !== 'layout')) pendingAutoFits.add(item);
|
|
433
|
+
if (signature === null) pendingAutoFits.delete(item);
|
|
434
|
+
}
|
|
403
435
|
clearTimeout(autoFitTimer);
|
|
404
436
|
if (activeDivider) return;
|
|
405
|
-
if (!autoFit) {
|
|
437
|
+
if (!autoFit) { pendingAutoFits.clear(); return; }
|
|
438
|
+
if (pendingAutoFits.size === 0) return;
|
|
406
439
|
autoFitTimer = setTimeout(() => {
|
|
407
440
|
autoFitTimer = null;
|
|
408
|
-
if (window.performance.now() < assignmentSettleUntil) {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
for (const item of shown()) {
|
|
412
|
-
if (!visible(item) || item.client?.isTemporaryGeometry()) continue;
|
|
413
|
-
item.client?.autoFitGrid(80, 24, focusOpenFits.has(item.id) || incomingFits.has(item.id));
|
|
441
|
+
if (window.performance.now() < assignmentSettleUntil) {
|
|
442
|
+
autoFitTimer = setTimeout(() => flushAutoFits(), assignmentSettleUntil - window.performance.now());
|
|
443
|
+
return;
|
|
414
444
|
}
|
|
445
|
+
flushAutoFits();
|
|
415
446
|
}, assignmentSettleUntil ? Math.max(0, assignmentSettleUntil - window.performance.now()) : 250);
|
|
416
447
|
}
|
|
448
|
+
function flushAutoFits() {
|
|
449
|
+
autoFitTimer = null;
|
|
450
|
+
if (window.performance.now() < assignmentSettleUntil) {
|
|
451
|
+
autoFitTimer = setTimeout(flushAutoFits, assignmentSettleUntil - window.performance.now());
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
assignmentSettleStartedAt = 0;
|
|
455
|
+
assignmentSettleUntil = 0;
|
|
456
|
+
for (const item of pendingAutoFits) {
|
|
457
|
+
if (!visible(item) || item.client?.isTemporaryGeometry()) continue;
|
|
458
|
+
item.client?.autoFitGrid(80, 24,
|
|
459
|
+
incomingFits.has(item.id) && item.client?.hasTransferOffer());
|
|
460
|
+
}
|
|
461
|
+
pendingAutoFits.clear();
|
|
462
|
+
}
|
|
417
463
|
function fitFonts() {
|
|
418
464
|
const visiblePanes = shown().filter((item) => item.client && visible(item));
|
|
419
465
|
const below = new Set();
|
|
420
466
|
let shared = Infinity;
|
|
421
467
|
for (const item of visiblePanes) {
|
|
422
|
-
//
|
|
423
|
-
// remaining terminal space with the note in place.
|
|
468
|
+
// Update the notice after measuring the terminal area.
|
|
424
469
|
item.card.classList.remove('below-floor');
|
|
470
|
+
item.floor.hidden = true;
|
|
425
471
|
const isBelow = item.client.belowDashboardFloor();
|
|
426
472
|
item.card.classList.toggle('below-floor', isBelow);
|
|
473
|
+
item.floor.hidden = !isBelow;
|
|
474
|
+
updateMenuStatus(item);
|
|
427
475
|
if (isBelow) {
|
|
428
476
|
below.add(item);
|
|
429
477
|
const font = item.client.floorFontSize();
|
|
@@ -553,11 +601,17 @@
|
|
|
553
601
|
space.className = 'spacer';
|
|
554
602
|
const size = document.createElement('span');
|
|
555
603
|
size.className = 'pane-size';
|
|
604
|
+
const floor = document.createElement('span');
|
|
605
|
+
floor.className = 'pane-floor';
|
|
606
|
+
floor.textContent = 'Below 80×24 floor';
|
|
607
|
+
floor.title = floor.textContent;
|
|
608
|
+
floor.hidden = true;
|
|
556
609
|
const overflowNote = document.createElement('div');
|
|
557
610
|
overflowNote.className = 'pane-overflow-note';
|
|
558
611
|
overflowNote.textContent = 'Shift+wheel or drag the scrollbars to see the rest. Enlarge or Fit to show it whole.';
|
|
559
612
|
overflowNote.hidden = true;
|
|
560
|
-
const item = { id: summary.id, summary, card, label, purpose, role, badge, messageCount, state, size,
|
|
613
|
+
const item = { id: summary.id, summary, card, label, purpose, role, badge, messageCount, state, size, floor,
|
|
614
|
+
overflowNote, client: null, previousGrid: null, fitRevision: 0 };
|
|
561
615
|
const renameForm = document.createElement('form');
|
|
562
616
|
renameForm.className = 'pane-rename';
|
|
563
617
|
renameForm.hidden = true;
|
|
@@ -593,6 +647,11 @@
|
|
|
593
647
|
item.fit = makeButton('Fit', () => { select(item.id); item.client?.fitGrid(); });
|
|
594
648
|
item.enlarge = makeButton('Enlarge', () => {
|
|
595
649
|
select(item.id);
|
|
650
|
+
// A queued Enlarge fit must not run after a later Restore of this pane.
|
|
651
|
+
const fitRevision = ++item.fitRevision;
|
|
652
|
+
const fitAfterLayout = (fit) => window.requestAnimationFrame(() => {
|
|
653
|
+
if (item.fitRevision === fitRevision) fit();
|
|
654
|
+
});
|
|
596
655
|
if (enlarged === item.id) {
|
|
597
656
|
enlarged = null;
|
|
598
657
|
arrange('restore');
|
|
@@ -601,13 +660,13 @@
|
|
|
601
660
|
else item.client?.takeGrid(item.previousGrid.cols, item.previousGrid.rows);
|
|
602
661
|
}
|
|
603
662
|
item.previousGrid = null;
|
|
604
|
-
if (autoFit)
|
|
663
|
+
if (autoFit) fitAfterLayout(() => item.client?.autoFitGrid(80, 24, true));
|
|
605
664
|
} else {
|
|
606
665
|
item.previousGrid = item.client?.getGrid() || null;
|
|
607
666
|
enlarged = item.id;
|
|
608
667
|
arrange('enlarge');
|
|
609
|
-
if (autoFit)
|
|
610
|
-
if (!autoFit)
|
|
668
|
+
if (autoFit) fitAfterLayout(() => item.client?.autoFitGrid(80, 24, true));
|
|
669
|
+
if (!autoFit) fitAfterLayout(() => item.client?.fitGrid());
|
|
611
670
|
}
|
|
612
671
|
});
|
|
613
672
|
item.pin = makeButton('Pin', () => {
|
|
@@ -616,10 +675,27 @@
|
|
|
616
675
|
});
|
|
617
676
|
item.left = makeButton('Move left', () => move(item.id, -1));
|
|
618
677
|
item.right = makeButton('Move right', () => move(item.id, 1));
|
|
678
|
+
for (const control of [item.enlarge, item.pin, item.left, item.right]) {
|
|
679
|
+
control.classList.add('pane-optional-control');
|
|
680
|
+
}
|
|
619
681
|
item.menuButton = makeButton('Menu', () => { item.menu.hidden = !item.menu.hidden; });
|
|
682
|
+
item.menuButton.classList.add('pane-menu-button');
|
|
620
683
|
const menu = document.createElement('div');
|
|
621
684
|
menu.className = 'pane-menu';
|
|
622
685
|
menu.hidden = true;
|
|
686
|
+
item.menuStatus = document.createElement('div');
|
|
687
|
+
item.menuStatus.className = 'pane-menu-status';
|
|
688
|
+
item.menuStatus.hidden = true;
|
|
689
|
+
item.menuMessageCount = makeButton('', () => openMessages(`session:${item.id}`));
|
|
690
|
+
item.menuMessageCount.className = 'pane-collapsed-control pane-menu-message-count';
|
|
691
|
+
item.menuMessageCount.hidden = true;
|
|
692
|
+
item.menuEnlarge = makeButton('Enlarge', () => item.enlarge.click());
|
|
693
|
+
item.menuPin = makeButton('Pin', () => item.pin.click());
|
|
694
|
+
item.menuLeft = makeButton('Move left', () => item.left.click());
|
|
695
|
+
item.menuRight = makeButton('Move right', () => item.right.click());
|
|
696
|
+
for (const control of [item.menuEnlarge, item.menuPin, item.menuLeft, item.menuRight]) {
|
|
697
|
+
control.classList.add('pane-collapsed-control');
|
|
698
|
+
}
|
|
623
699
|
item.kill = makeButton('Kill', () => { void killSession(item.id); });
|
|
624
700
|
item.kill.dataset.action = 'kill';
|
|
625
701
|
item.copy = makeButton('Copy session id', () => { void copySessionId(item.id); });
|
|
@@ -630,9 +706,10 @@
|
|
|
630
706
|
item.restart.dataset.action = 'restart';
|
|
631
707
|
item.dismiss = makeButton('Dismiss', () => dismiss(item.id));
|
|
632
708
|
item.dismiss.dataset.action = 'dismiss';
|
|
633
|
-
menu.append(item.
|
|
709
|
+
menu.append(item.menuStatus, item.menuMessageCount, item.menuEnlarge, item.menuPin, item.menuLeft, item.menuRight,
|
|
710
|
+
item.rename, renameForm, item.kill, item.copy, item.pop, item.restart, item.dismiss);
|
|
634
711
|
item.menu = menu;
|
|
635
|
-
head.append(label,
|
|
712
|
+
head.append(label, purpose, role, badge, messageCount, state, space, size, floor, item.fit, item.enlarge,
|
|
636
713
|
item.pin, item.left, item.right, item.menuButton);
|
|
637
714
|
head.addEventListener('dblclick', (event) => {
|
|
638
715
|
if (!event.target.closest('button')) item.enlarge.click();
|
|
@@ -663,10 +740,15 @@
|
|
|
663
740
|
const prompt = document.createElement('div');
|
|
664
741
|
prompt.className = 'pane-prompt';
|
|
665
742
|
prompt.hidden = true;
|
|
666
|
-
|
|
743
|
+
const copyNotice = document.createElement('div');
|
|
744
|
+
copyNotice.className = 'pane-copy-notice';
|
|
745
|
+
copyNotice.setAttribute('role', 'status');
|
|
746
|
+
copyNotice.hidden = true;
|
|
747
|
+
copyNotice.textContent = 'Copied to clipboard.';
|
|
748
|
+
notices.append(banner, copyNotice, prompt);
|
|
667
749
|
wrap.append(term, notices);
|
|
668
750
|
card.append(head, menu, overflowNote, wrap);
|
|
669
|
-
Object.assign(item, { term, banner, prompt });
|
|
751
|
+
Object.assign(item, { term, banner, copyNotice, prompt });
|
|
670
752
|
card.addEventListener('click', () => select(item.id, true));
|
|
671
753
|
card.addEventListener('focus', () => select(item.id));
|
|
672
754
|
updateCard(item);
|
|
@@ -676,14 +758,18 @@
|
|
|
676
758
|
function updateCard(item) {
|
|
677
759
|
const summary = item.summary;
|
|
678
760
|
item.label.textContent = summary.label || summary.id;
|
|
761
|
+
item.label.title = item.label.textContent;
|
|
679
762
|
item.purpose.textContent = [summary.purpose, summary.parent && summary.startedBy && `Started by ${summary.startedBy}`].filter(Boolean).join(' · ');
|
|
680
|
-
|
|
763
|
+
item.purpose.title = item.purpose.textContent;
|
|
764
|
+
// Mark chairs explicitly; the label and purpose identify other panes.
|
|
681
765
|
item.role.textContent = summary.role === 'chair' ? 'Chair' : '';
|
|
766
|
+
item.role.title = item.role.textContent;
|
|
682
767
|
item.role.hidden = summary.role !== 'chair';
|
|
683
768
|
item.card.dataset.role = summary.role === 'chair' ? 'chair' : 'delegate';
|
|
684
769
|
item.badge.textContent = summary.stalled ? '● Stalled' : attention(item) ? '● Waiting' : '';
|
|
685
770
|
item.badge.title = summary.stalled
|
|
686
|
-
? `${summary.stalled.reason} since ${summary.stalled.since}: ${summary.stalled.description}`
|
|
771
|
+
? `${item.badge.textContent}: ${summary.stalled.reason} since ${summary.stalled.since}: ${summary.stalled.description}`
|
|
772
|
+
: item.badge.textContent;
|
|
687
773
|
item.card.classList.toggle('attention', attention(item));
|
|
688
774
|
item.card.classList.toggle('selected', selected === item.id);
|
|
689
775
|
item.card.classList.toggle('ended', summary.exited === true);
|
|
@@ -691,10 +777,15 @@
|
|
|
691
777
|
: summary.exitCode === null || summary.exitCode === undefined
|
|
692
778
|
? 'Ended: its output failed'
|
|
693
779
|
: `Ended (code ${String(summary.exitCode)})`;
|
|
780
|
+
item.state.title = item.state.textContent;
|
|
694
781
|
item.pin.textContent = pins.includes(item.id) ? 'Unpin' : 'Pin';
|
|
695
782
|
item.enlarge.textContent = enlarged === item.id ? 'Restore' : 'Enlarge';
|
|
783
|
+
item.menuPin.textContent = item.pin.textContent;
|
|
784
|
+
item.menuEnlarge.textContent = item.enlarge.textContent;
|
|
696
785
|
item.pin.setAttribute('aria-label', item.pin.textContent);
|
|
697
786
|
item.enlarge.setAttribute('aria-label', item.enlarge.textContent);
|
|
787
|
+
item.menuPin.setAttribute('aria-label', item.menuPin.textContent);
|
|
788
|
+
item.menuEnlarge.setAttribute('aria-label', item.menuEnlarge.textContent);
|
|
698
789
|
item.restart.hidden = launchBody(launches[item.id]) === null;
|
|
699
790
|
item.dismiss.hidden = summary.exited !== true;
|
|
700
791
|
item.card.setAttribute('aria-label', `${item.label.textContent} ${item.purpose.textContent}`);
|
|
@@ -757,20 +848,22 @@
|
|
|
757
848
|
item.client = ShellPuppetPane.create({
|
|
758
849
|
container: item.term, sessionId: item.id, dashboardProof: proof,
|
|
759
850
|
initialFontOverride: fontSize,
|
|
760
|
-
elements: { banner: item.banner,
|
|
851
|
+
elements: { banner: item.banner, copyNotice: item.copyNotice, promptAlert: item.prompt,
|
|
852
|
+
size: item.size, overflowNote: item.overflowNote },
|
|
761
853
|
onAttentionChange: () => updateAttention(),
|
|
762
|
-
onGeometryReady: () => scheduleAutoFit(),
|
|
763
|
-
onGeometryChange: () => scheduleFontFit(),
|
|
764
|
-
onMetricsChange: () => scheduleAutoFit(),
|
|
854
|
+
onGeometryReady: (reason) => scheduleAutoFit([item], reason === 'connect' ? 'connect' : 'ready'),
|
|
855
|
+
onGeometryChange: () => { updateMenuStatus(item); scheduleFontFit(); },
|
|
856
|
+
onMetricsChange: () => { item.metricsRevision = (item.metricsRevision || 0) + 1; scheduleAutoFit([item]); },
|
|
765
857
|
onOutsideGeometry: () => {
|
|
766
|
-
focusOpenFits.delete(item.id);
|
|
767
858
|
incomingFits.delete(item.id);
|
|
768
859
|
scheduleFontFit();
|
|
769
860
|
},
|
|
770
|
-
onGridTaken: () => {
|
|
861
|
+
onGridTaken: () => { incomingFits.delete(item.id); },
|
|
771
862
|
});
|
|
772
863
|
}
|
|
773
864
|
function deactivate(item, reassigned = false) {
|
|
865
|
+
pendingAutoFits.delete(item);
|
|
866
|
+
item.fitSignature = null;
|
|
774
867
|
if (!item.client) return;
|
|
775
868
|
const client = item.client;
|
|
776
869
|
item.client = null;
|
|
@@ -1160,7 +1253,6 @@
|
|
|
1160
1253
|
const id = frame.move.session;
|
|
1161
1254
|
movedSessions.add(id);
|
|
1162
1255
|
pendingOpen.delete(id);
|
|
1163
|
-
focusOpenFits.delete(id);
|
|
1164
1256
|
for (const [target, session] of pendingWindowMoves) {
|
|
1165
1257
|
if (session === id) pendingWindowMoves.delete(target);
|
|
1166
1258
|
}
|
|
@@ -1232,7 +1324,6 @@
|
|
|
1232
1324
|
pendingWindowMoves.clear();
|
|
1233
1325
|
pendingOpen.clear();
|
|
1234
1326
|
movedSessions.clear();
|
|
1235
|
-
focusOpenFits.clear();
|
|
1236
1327
|
endActiveDivider?.();
|
|
1237
1328
|
applyAssignment([], {});
|
|
1238
1329
|
root.replaceChildren();
|
|
@@ -1318,7 +1409,7 @@
|
|
|
1318
1409
|
enlarged = null;
|
|
1319
1410
|
persist();
|
|
1320
1411
|
arrange('focus open');
|
|
1321
|
-
if (autoFit)
|
|
1412
|
+
if (autoFit) scheduleAutoFit([panes.get(id)], 'focus-open');
|
|
1322
1413
|
else fitWhenReady(id, ownPair());
|
|
1323
1414
|
}
|
|
1324
1415
|
}
|
|
@@ -1524,6 +1615,8 @@
|
|
|
1524
1615
|
if (data.type === 'preferences' && typeof data.autoFit === 'boolean' &&
|
|
1525
1616
|
(data.fontSize === null || (Number.isInteger(data.fontSize) && data.fontSize >= 8 && data.fontSize <= 32))) {
|
|
1526
1617
|
autoFit = data.autoFit;
|
|
1618
|
+
if (!autoFit) for (const item of panes.values()) item.client?.withdrawAutoFit();
|
|
1619
|
+
else for (const item of panes.values()) item.client?.resumeAutoFit();
|
|
1527
1620
|
setFontSize(data.fontSize, false);
|
|
1528
1621
|
}
|
|
1529
1622
|
}
|
|
@@ -1582,7 +1675,9 @@
|
|
|
1582
1675
|
assignmentSettleUntil = 0;
|
|
1583
1676
|
assignmentSettleStartedAt = 0;
|
|
1584
1677
|
autoFit = !autoFit;
|
|
1585
|
-
|
|
1678
|
+
if (!autoFit) for (const item of panes.values()) item.client?.withdrawAutoFit();
|
|
1679
|
+
else for (const item of panes.values()) item.client?.resumeAutoFit();
|
|
1680
|
+
renderPreferences(); persist(); scheduleAutoFit(shown(), 'toggle'); broadcastPreferences();
|
|
1586
1681
|
});
|
|
1587
1682
|
document.getElementById('designated-window').addEventListener('click', () => {
|
|
1588
1683
|
if (feed?.readyState === WebSocket.OPEN) feed.send(JSON.stringify({ type: 'window-designate' }));
|
package/dist/viewer/index.html
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
<div id="term"></div>
|
|
47
47
|
<div id="notices">
|
|
48
48
|
<div id="banner" hidden></div>
|
|
49
|
+
<div id="copy-notice" role="status" hidden>Copied to clipboard.</div>
|
|
49
50
|
<!-- Raised when the daemon reports this session has been sitting on a permission
|
|
50
51
|
prompt nobody has answered. role=status (not alert) so a screen reader
|
|
51
52
|
announces it without stealing focus from the terminal the human is typing into. -->
|