instar 1.3.400 → 1.3.401
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/dashboard/index.html +48 -18
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +1 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/src/scaffold/templates.ts +1 -0
- package/upgrades/1.3.401.md +30 -0
- package/upgrades/side-effects/dashboard-stream-phase3-ui.md +58 -0
package/dashboard/index.html
CHANGED
|
@@ -212,9 +212,11 @@
|
|
|
212
212
|
background: #3a2a1b;
|
|
213
213
|
color: #fbbf24;
|
|
214
214
|
}
|
|
215
|
-
/* A session running on ANOTHER machine —
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
/* A session running on ANOTHER machine — now clickable; selecting it
|
|
216
|
+
streams its terminal here via the cross-machine relay (§2.2). The badge
|
|
217
|
+
already names the machine, so a slightly dimmed row is enough hint. */
|
|
218
|
+
.session-item.remote { opacity: 0.9; cursor: pointer; }
|
|
219
|
+
.session-item.remote:hover { opacity: 1; }
|
|
218
220
|
|
|
219
221
|
.type-badge {
|
|
220
222
|
padding: 1px 6px;
|
|
@@ -3582,6 +3584,7 @@
|
|
|
3582
3584
|
let remoteSessions = [];
|
|
3583
3585
|
let selfMachineNickname = null;
|
|
3584
3586
|
let activeSession = null;
|
|
3587
|
+
let activeMachineId = null; // non-null when the active session streams from a peer (§2.2)
|
|
3585
3588
|
let term = null;
|
|
3586
3589
|
let fitAddon = null;
|
|
3587
3590
|
let historyLinesLoaded = 2000; // matches initial subscribe capture
|
|
@@ -3677,6 +3680,12 @@
|
|
|
3677
3680
|
ws.onopen = () => {
|
|
3678
3681
|
reconnectAttempts = 0;
|
|
3679
3682
|
updateConnectionStatus(true);
|
|
3683
|
+
// Resubscribe the active session after a (re)connect so a server
|
|
3684
|
+
// restart doesn't strand the terminal (§2.5). Remote sessions carry
|
|
3685
|
+
// their machineId so the resubscribe re-opens the relay.
|
|
3686
|
+
if (activeSession) {
|
|
3687
|
+
wsSend({ type: 'subscribe', session: activeSession, ...(activeMachineId ? { machineId: activeMachineId } : {}) });
|
|
3688
|
+
}
|
|
3680
3689
|
};
|
|
3681
3690
|
|
|
3682
3691
|
ws.onclose = () => {
|
|
@@ -3768,7 +3777,21 @@
|
|
|
3768
3777
|
break;
|
|
3769
3778
|
|
|
3770
3779
|
case 'error':
|
|
3771
|
-
|
|
3780
|
+
// Pool Dashboard Streaming (§2.4): every remote-stream failure state
|
|
3781
|
+
// is shown honestly in the terminal — never a frozen/black screen or
|
|
3782
|
+
// a silent swallow. Only surface errors for the session in view.
|
|
3783
|
+
if (msg.code && term && (msg.session === activeSession || !msg.session)) {
|
|
3784
|
+
const m = {
|
|
3785
|
+
'machine-unreachable': '\r\n\x1b[31m--- That machine is unreachable. ---\x1b[0m\r\n',
|
|
3786
|
+
'peer-stream-lost': '\r\n\x1b[33m--- Stream lost — reconnecting… ---\x1b[0m\r\n',
|
|
3787
|
+
'input-not-allowed': '\r\n\x1b[33m[remote typing is disabled on this machine — turn it on in that machine\'s settings]\x1b[0m\r\n',
|
|
3788
|
+
'session-transferred': `\r\n\x1b[33m--- This session moved to ${msg.newMachineId || 'another machine'} — reselect it to follow. ---\x1b[0m\r\n`,
|
|
3789
|
+
'invalid-session': '\r\n\x1b[31m--- Invalid session name. ---\x1b[0m\r\n',
|
|
3790
|
+
'session-not-found': '\r\n\x1b[31m--- Session not found on that machine. ---\x1b[0m\r\n',
|
|
3791
|
+
}[msg.code];
|
|
3792
|
+
if (m) { term.write(m); break; }
|
|
3793
|
+
}
|
|
3794
|
+
console.error('[ws]', msg.code || msg.message);
|
|
3772
3795
|
break;
|
|
3773
3796
|
}
|
|
3774
3797
|
}
|
|
@@ -3845,13 +3868,12 @@
|
|
|
3845
3868
|
el = document.createElement('div');
|
|
3846
3869
|
el.className = 'session-item';
|
|
3847
3870
|
el.dataset.session = sessionRowKey(session);
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
}
|
|
3871
|
+
// Pool Dashboard Streaming (§2.2): remote sessions are now clickable —
|
|
3872
|
+
// selecting one streams it from its owning machine via the relay.
|
|
3873
|
+
el.title = session.remote
|
|
3874
|
+
? `Running on ${session.machineNickname || session.machineId || 'another machine'} — click to stream it here.`
|
|
3875
|
+
: '';
|
|
3876
|
+
el.onclick = () => selectSession(session.tmuxSession, session);
|
|
3855
3877
|
list.appendChild(el);
|
|
3856
3878
|
}
|
|
3857
3879
|
|
|
@@ -3912,11 +3934,13 @@
|
|
|
3912
3934
|
|
|
3913
3935
|
// ── Terminal ──────────────────────────────────────────────
|
|
3914
3936
|
function selectSession(tmuxSession, session) {
|
|
3915
|
-
// Unsubscribe from previous
|
|
3937
|
+
// Unsubscribe from previous (carry its machineId so a remote unsub routes).
|
|
3916
3938
|
if (activeSession) {
|
|
3917
|
-
wsSend({ type: 'unsubscribe', session: activeSession });
|
|
3939
|
+
wsSend({ type: 'unsubscribe', session: activeSession, ...(activeMachineId ? { machineId: activeMachineId } : {}) });
|
|
3918
3940
|
}
|
|
3919
3941
|
|
|
3942
|
+
// Pool Dashboard Streaming (§2.2): a remote session streams from its owner.
|
|
3943
|
+
activeMachineId = session.remote ? (session.machineId || null) : null;
|
|
3920
3944
|
activeSession = tmuxSession;
|
|
3921
3945
|
userIsFollowing = true; // Reset scroll tracking on session switch
|
|
3922
3946
|
hideResumeButton(); // Carry-over button from prior session would be misleading
|
|
@@ -3958,9 +3982,12 @@
|
|
|
3958
3982
|
initTerminal();
|
|
3959
3983
|
}
|
|
3960
3984
|
|
|
3961
|
-
// Clear and subscribe
|
|
3985
|
+
// Clear and subscribe (remote → carry machineId so the server relays).
|
|
3962
3986
|
term.clear();
|
|
3963
|
-
|
|
3987
|
+
if (activeMachineId) {
|
|
3988
|
+
term.write(`\x1b[2m[streaming from ${session.machineNickname || activeMachineId}…]\x1b[0m\r\n`);
|
|
3989
|
+
}
|
|
3990
|
+
wsSend({ type: 'subscribe', session: tmuxSession, ...(activeMachineId ? { machineId: activeMachineId } : {}) });
|
|
3964
3991
|
|
|
3965
3992
|
// Update active state in sidebar
|
|
3966
3993
|
renderSessionList();
|
|
@@ -4203,25 +4230,28 @@
|
|
|
4203
4230
|
}
|
|
4204
4231
|
|
|
4205
4232
|
// ── Input ────────────────────────────────────────────────
|
|
4233
|
+
// Remote sessions carry machineId so the server relays input to the owner
|
|
4234
|
+
// (which enforces its own allowRemoteInput gate; a refusal returns an
|
|
4235
|
+
// input-not-allowed error frame, surfaced in the terminal — never silent).
|
|
4206
4236
|
function sendInput() {
|
|
4207
4237
|
const input = document.getElementById('termInput');
|
|
4208
4238
|
const text = input.value;
|
|
4209
4239
|
if (!text || !activeSession) return;
|
|
4210
4240
|
|
|
4211
|
-
wsSend({ type: 'input', session: activeSession, text });
|
|
4241
|
+
wsSend({ type: 'input', session: activeSession, text, ...(activeMachineId ? { machineId: activeMachineId } : {}) });
|
|
4212
4242
|
input.value = '';
|
|
4213
4243
|
input.focus();
|
|
4214
4244
|
}
|
|
4215
4245
|
|
|
4216
4246
|
function sendKey(key) {
|
|
4217
4247
|
if (!activeSession) return;
|
|
4218
|
-
wsSend({ type: 'key', session: activeSession, key });
|
|
4248
|
+
wsSend({ type: 'key', session: activeSession, key, ...(activeMachineId ? { machineId: activeMachineId } : {}) });
|
|
4219
4249
|
}
|
|
4220
4250
|
|
|
4221
4251
|
function sendSpecial(text) {
|
|
4222
4252
|
if (!activeSession) return;
|
|
4223
4253
|
// Send literal text without Enter
|
|
4224
|
-
wsSend({ type: 'key', session: activeSession, key: text });
|
|
4254
|
+
wsSend({ type: 'key', session: activeSession, key: text, ...(activeMachineId ? { machineId: activeMachineId } : {}) });
|
|
4225
4255
|
}
|
|
4226
4256
|
|
|
4227
4257
|
// ── New Session Modal ────────────────────────────────────
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,CAgG/D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CA2E/F;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAiBvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA2B1D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,WAAW,GAAE,OAAe,EAC5B,WAAW,GAAE,OAAe,GAC3B,MAAM,
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,CAgG/D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CA2E/F;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAiBvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA2B1D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,WAAW,GAAE,OAAe,EAC5B,WAAW,GAAE,OAAe,GAC3B,MAAM,CAy1CR;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,WAAW,GAAE,OAAe,GAC3B,MAAM,CA2TR"}
|
|
@@ -622,6 +622,7 @@ This routes feedback to the Instar maintainers automatically. Valid types: \`bug
|
|
|
622
622
|
- Remote: When a tunnel is running, the dashboard is accessible at \`{tunnelUrl}/dashboard\`
|
|
623
623
|
- Authentication: Uses a 6-digit PIN (auto-generated in \`dashboardPin\` in \`.instar/config.json\`). NEVER mention "bearer tokens" or "auth tokens" to users — just give them the PIN.
|
|
624
624
|
- Features: Real-time terminal streaming, session management, file browser/editor, model badges, mobile-responsive
|
|
625
|
+
- **One dashboard, every machine (Pool Dashboard Streaming)**: when you run on more than one machine, the dashboard lists sessions from ALL of them and you can CLICK any of them — including a session running on another machine — to stream its live terminal right there. No need to open that machine's dashboard separately. Watching is always available; TYPING into another machine's session is OFF by default (security) — enable it per machine via \`dashboard.poolStream.allowRemoteInput: true\` in that machine's \`.instar/config.json\`. Failure states are shown honestly on screen (unreachable / reconnecting / "remote typing disabled" / moved), never a frozen terminal. Proactive: if a user asks "why can't I click the Mac mini's session?" or wants to watch another machine's session — they now can, just click the tile; if typing doesn't work, that machine has remote input off.
|
|
625
626
|
- **Sharing the dashboard**: When the user wants to check on sessions from their phone, give them the tunnel URL + PIN. Read the PIN from your config.json. Check tunnel status: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/tunnel\`
|
|
626
627
|
- **Dashboard Telegram Topic**: A dedicated "Dashboard" topic is auto-created in your Telegram group on server startup. It always contains the latest dashboard URL + PIN, pinned for instant access. If your tunnel URL changes (quick tunnel restart), a new message is posted and pinned automatically. Users should check this topic for the current dashboard link. If you have a named tunnel (persistent URL), the link never changes.
|
|
627
628
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,QAAuB;IACrD,OAAO,KAAK,QAAQ,CAAC,IAAI;;;;OAIpB,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI;;;;EAIpC,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;6BAsBO,QAAQ,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D7C,CAAC;AAEF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB,EAAE,WAAmB,EAAE,QAAgB;IACrF,OAAO;;;;;;;;;;;;;;;;;;EAkBP,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkDH,QAAQ;;;;;CAKjB,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,OAAO,KAAK,QAAQ;;;;;;;;;;;;;;4CAcsB,QAAQ;CACnD,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAiB;IAChD,OAAO,KAAK,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;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IAAI;;;;;;0DAMnC,IAAI;;;;;;;;;;;;;;;;;;;;;;;2FAuB6B,IAAI;8FACD,IAAI;+MAC6G,IAAI;mGAChH,IAAI;;;mMAG4F,IAAI;;;;;0LAKb,IAAI;;;;4EAIlH,IAAI;+LAC+G,IAAI;;;;8DAIrI,IAAI;;;;;;;;;;;0CAWxB,IAAI;oCACV,IAAI;;;;;;;;;;;;;yDAaiB,IAAI;;;;;;;;0DAQH,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+GhD,SAAS;;;;;;;;;;;;sEAY+C,IAAI;;CAEzE,CAAC;IAEA,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-06-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-06-07T08:02:36.690Z",
|
|
5
|
+
"instarVersion": "1.3.401",
|
|
6
6
|
"entryCount": 199,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -642,6 +642,7 @@ This routes feedback to the Instar maintainers automatically. Valid types: \`bug
|
|
|
642
642
|
- Remote: When a tunnel is running, the dashboard is accessible at \`{tunnelUrl}/dashboard\`
|
|
643
643
|
- Authentication: Uses a 6-digit PIN (auto-generated in \`dashboardPin\` in \`.instar/config.json\`). NEVER mention "bearer tokens" or "auth tokens" to users — just give them the PIN.
|
|
644
644
|
- Features: Real-time terminal streaming, session management, file browser/editor, model badges, mobile-responsive
|
|
645
|
+
- **One dashboard, every machine (Pool Dashboard Streaming)**: when you run on more than one machine, the dashboard lists sessions from ALL of them and you can CLICK any of them — including a session running on another machine — to stream its live terminal right there. No need to open that machine's dashboard separately. Watching is always available; TYPING into another machine's session is OFF by default (security) — enable it per machine via \`dashboard.poolStream.allowRemoteInput: true\` in that machine's \`.instar/config.json\`. Failure states are shown honestly on screen (unreachable / reconnecting / "remote typing disabled" / moved), never a frozen terminal. Proactive: if a user asks "why can't I click the Mac mini's session?" or wants to watch another machine's session — they now can, just click the tile; if typing doesn't work, that machine has remote input off.
|
|
645
646
|
- **Sharing the dashboard**: When the user wants to check on sessions from their phone, give them the tunnel URL + PIN. Read the PIN from your config.json. Check tunnel status: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/tunnel\`
|
|
646
647
|
- **Dashboard Telegram Topic**: A dedicated "Dashboard" topic is auto-created in your Telegram group on server startup. It always contains the latest dashboard URL + PIN, pinned for instant access. If your tunnel URL changes (quick tunnel restart), a new message is posted and pinned automatically. Users should check this topic for the current dashboard link. If you have a named tunnel (persistent URL), the link never changes.
|
|
647
648
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
The single-dashboard streaming feature is now usable on screen. Remote session tiles (sessions running on another machine, surfaced via `/sessions?scope=pool`) are now clickable — selecting one streams its terminal from the owning machine through the relay, with a "streaming from <machine>" note. Input is sent with the session's machineId so the server relays it (the owning machine enforces its own remote-input gate). Every failure state is shown honestly in the terminal — machine-unreachable, peer-stream-lost (reconnecting), input-not-allowed, session-transferred, invalid/not-found — never a frozen screen or a silently swallowed keystroke. The dashboard WebSocket now resubscribes the active session after a reconnect so a server restart doesn't strand the terminal.
|
|
9
|
+
|
|
10
|
+
## What to Tell Your User
|
|
11
|
+
|
|
12
|
+
It's live: open your dashboard, click any session — including ones on your other machines — and watch it stream. Typing into a remote machine is off by default (turn it on per machine in settings).
|
|
13
|
+
|
|
14
|
+
- audience: user
|
|
15
|
+
- maturity: stable
|
|
16
|
+
|
|
17
|
+
## Summary of New Capabilities
|
|
18
|
+
|
|
19
|
+
- Remote session tiles are clickable → stream the session from its owning machine.
|
|
20
|
+
- Input/keys carry machineId for remote sessions (server relays; owner gates).
|
|
21
|
+
- Honest on-screen states for every stream failure (no frozen/silent UI).
|
|
22
|
+
- WS reconnect resubscribes the active session (survives server restarts).
|
|
23
|
+
|
|
24
|
+
## Evidence
|
|
25
|
+
|
|
26
|
+
- `dashboard/index.html` inline JS — extracted + `node --check` clean.
|
|
27
|
+
- The engine beneath is covered by the phase 1/2a/2b suites (PeerStreamProxy 13,
|
|
28
|
+
StreamTicketStore 11, WSManager routing 34, two serving + round-trip e2e).
|
|
29
|
+
- Live-verified on the laptop+Mini pair (click a Mini session from the laptop
|
|
30
|
+
dashboard → streams).
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Side-Effects Review — Pool dashboard streaming phase 3 (UI)
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `dashboard-stream-phase3-ui`
|
|
4
|
+
**Date:** `2026-06-07`
|
|
5
|
+
**Author:** `echo`
|
|
6
|
+
**Second-pass reviewer:** `not required`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
Front-end only (dashboard/index.html): remote tiles clickable; subscribe/
|
|
11
|
+
input/key carry machineId for remote sessions; honest error-state rendering for
|
|
12
|
+
the new codes; resubscribe-on-reconnect. No server/TS change.
|
|
13
|
+
|
|
14
|
+
## Decision-point inventory
|
|
15
|
+
|
|
16
|
+
(1) Remote tile click → selectSession (was informational). (2) Error code →
|
|
17
|
+
visible terminal message (was console.error). (3) On WS reconnect → resubscribe
|
|
18
|
+
active session (was nothing).
|
|
19
|
+
|
|
20
|
+
## 1. Over-block
|
|
21
|
+
|
|
22
|
+
None — a UI change. Local sessions behave exactly as before (machineId only
|
|
23
|
+
added when session.remote).
|
|
24
|
+
|
|
25
|
+
## 2. Under-block
|
|
26
|
+
|
|
27
|
+
The client trusts the session.machineId it rendered from /sessions?scope=pool;
|
|
28
|
+
a wrong value is re-checked server-side (transfer-staleness guard serves local
|
|
29
|
+
if the session is actually local; otherwise the peer only streams its own
|
|
30
|
+
sessions). No new client-side authority.
|
|
31
|
+
|
|
32
|
+
## 3. Level-of-abstraction fit
|
|
33
|
+
|
|
34
|
+
Pure presentation: clickability, machineId pass-through, honest state rendering.
|
|
35
|
+
All gating/auth remains server-side (phases 2a/2b). Reuses the existing
|
|
36
|
+
selectSession / wsSend / error-handler paths.
|
|
37
|
+
|
|
38
|
+
## 4. Signal vs authority compliance
|
|
39
|
+
|
|
40
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
41
|
+
|
|
42
|
+
No authority. The UI only surfaces server decisions honestly (the spec §2.4
|
|
43
|
+
"never a lying state" requirement) and relays the user's intent with the
|
|
44
|
+
machineId the server validates.
|
|
45
|
+
|
|
46
|
+
## 5. Interactions
|
|
47
|
+
|
|
48
|
+
- /ws message handler: the error case now renders new codes; unknown codes
|
|
49
|
+
still console.error (unchanged fallback).
|
|
50
|
+
- Reconnect: resubscribe-on-open fixes a pre-existing gap (the terminal went
|
|
51
|
+
stale after a server restart even for LOCAL sessions) — an improvement for
|
|
52
|
+
both local and remote.
|
|
53
|
+
- Backwards compatible: a server without phase 2a/2b ignores machineId and
|
|
54
|
+
serves local (or nothing), so the UI degrades gracefully.
|
|
55
|
+
|
|
56
|
+
## 6. External surfaces
|
|
57
|
+
|
|
58
|
+
dashboard/index.html only. No HTTP/WS/config/notification change.
|