@clagentic/console 1.7.0 → 1.8.0-beta.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.
Files changed (58) hide show
  1. package/bin/cli.js +198 -2542
  2. package/lib/build-sha.json +4 -0
  3. package/lib/cli/daemon-launch.js +797 -0
  4. package/lib/cli/ipc-subcommands.js +186 -0
  5. package/lib/cli/menus.js +849 -0
  6. package/lib/cli/net-detect.js +209 -0
  7. package/lib/cli/tui.js +589 -0
  8. package/lib/daemon.js +15 -6
  9. package/lib/memory-shed.js +81 -2
  10. package/lib/pages.js +13 -17
  11. package/lib/project-connection.js +13 -0
  12. package/lib/project-loop.js +4 -0
  13. package/lib/project-sessions.js +9 -3
  14. package/lib/project.js +3 -2
  15. package/lib/public/css/diagnostics.css +29 -1
  16. package/lib/public/css/home-hub.css +10 -0
  17. package/lib/public/css/overlays.css +19 -0
  18. package/lib/public/index.html +12 -11
  19. package/lib/public/manifest.json +1 -1
  20. package/lib/public/modules/app-connection.js +150 -4
  21. package/lib/public/modules/app-history-replay.js +155 -0
  22. package/lib/public/modules/app-home-hub.js +24 -14
  23. package/lib/public/modules/app-messages.js +1246 -1469
  24. package/lib/public/modules/app-notifications.js +4 -4
  25. package/lib/public/modules/app-rate-limit.js +128 -27
  26. package/lib/public/modules/command-palette.js +11 -22
  27. package/lib/public/modules/context-sources.js +1 -6
  28. package/lib/public/modules/filebrowser.js +25 -13
  29. package/lib/public/modules/input.js +47 -12
  30. package/lib/public/modules/mcp-ui.js +2 -2
  31. package/lib/public/modules/notifications.js +22 -1
  32. package/lib/public/modules/playbook.js +6 -6
  33. package/lib/public/modules/project-settings.js +5 -13
  34. package/lib/public/modules/qrcode.js +2 -2
  35. package/lib/public/modules/rate-limit-state.js +133 -0
  36. package/lib/public/modules/relative-time.js +27 -0
  37. package/lib/public/modules/scheduler-history.js +1 -5
  38. package/lib/public/modules/server-settings.js +28 -15
  39. package/lib/public/modules/sidebar-mobile.js +8 -3
  40. package/lib/public/modules/sidebar-projects.js +1 -1
  41. package/lib/public/modules/sidebar-sessions.js +1 -15
  42. package/lib/public/modules/sidebar.js +3 -3
  43. package/lib/public/modules/utils.js +1 -0
  44. package/lib/public/sw.js +24 -4
  45. package/lib/sdk-bridge.js +22 -0
  46. package/lib/sdk-message-processor.js +27 -1
  47. package/lib/server-auth.js +48 -2
  48. package/lib/server-palette.js +17 -1
  49. package/lib/server-settings.js +70 -4
  50. package/lib/server.js +200 -4
  51. package/lib/session-search.js +20 -5
  52. package/lib/sessions.js +84 -3
  53. package/lib/smtp.js +6 -6
  54. package/lib/yoke/adapters/codex.js +1 -1
  55. package/package.json +4 -2
  56. package/scripts/install-local-test.js +97 -0
  57. package/scripts/verify-installed-build.js +80 -0
  58. package/scripts/write-build-sha.js +53 -0
@@ -111,6 +111,15 @@ function shedMemory(opts) {
111
111
 
112
112
  var sessionsTrimmed = 0;
113
113
  var sessionsEvicted = 0;
114
+ // lr-f36626: sessions force-evicted while carrying a live registered
115
+ // background child (session.activeTaskToolIds non-empty at eviction time).
116
+ // forceEvictToLimit only ever unloads in-heap history for these — it never
117
+ // closes queryInstance, so the child itself is never killed — but the
118
+ // operator still needs to know pressure reached as far as a live dispatch,
119
+ // per lr-f36626's "never a silent orphan" requirement. Each entry carries
120
+ // the project's send()/sendAndRecord so the per-session notification below
121
+ // can run after the loop, once beforeBytes/afterBytes are both known.
122
+ var liveChildReclaims = [];
114
123
 
115
124
  for (var pi = 0; pi < projects.length; pi++) {
116
125
  var proj = projects[pi];
@@ -135,10 +144,21 @@ function shedMemory(opts) {
135
144
  try {
136
145
  // 2. Force-evict beyond the normal LRU limit down to a pressure limit,
137
146
  // still skipping the active session (forceEvictToLimit's own
138
- // invariant, shared with the routine LRU path).
147
+ // invariant, shared with the routine LRU path). Live-child sessions
148
+ // are only reached as a last resort within forceEvictToLimit itself
149
+ // (pass 2) — see its header in lib/sessions.js.
139
150
  if (typeof sm.forceEvictToLimit === 'function' && typeof sm.LRU_HISTORY_LIMIT === 'number') {
140
151
  var pressureLimit = Math.max(1, Math.floor(sm.LRU_HISTORY_LIMIT * PRESSURE_LRU_FRACTION));
141
- sessionsEvicted += sm.forceEvictToLimit(pressureLimit);
152
+ var evictResult = sm.forceEvictToLimit(pressureLimit);
153
+ sessionsEvicted += evictResult.evicted;
154
+ for (var rci = 0; rci < evictResult.reclaimedLiveChild.length; rci++) {
155
+ liveChildReclaims.push({
156
+ session: evictResult.reclaimedLiveChild[rci],
157
+ sm: sm,
158
+ send: proj.send,
159
+ slug: proj.slug,
160
+ });
161
+ }
142
162
  }
143
163
  } catch (e) {
144
164
  // Same isolation as above — one project's failure does not block others.
@@ -169,6 +189,7 @@ function shedMemory(opts) {
169
189
  sessionsTrimmed: sessionsTrimmed,
170
190
  sessionsEvicted: sessionsEvicted,
171
191
  cachesDropped: cachesDropped,
192
+ liveChildReclaimed: liveChildReclaims.length,
172
193
  };
173
194
 
174
195
  _log(Object.assign({
@@ -179,6 +200,9 @@ function shedMemory(opts) {
179
200
  // 4. UI diagnostic — session-independent, project-scoped broadcast (same
180
201
  // delivery path as settings-preflight's diagnostics: plain send(), not
181
202
  // sendAndRecord, since this has no session to attach to and is ephemeral).
203
+ // Fires for every shedding pass, live-child reclaim or not — this is the
204
+ // routine "memory pressure occurred" signal, distinct from the per-session
205
+ // reclaim notification below.
182
206
  var deltaBytes = beforeBytes - afterBytes;
183
207
  var diagnostic = {
184
208
  type: 'diagnostic',
@@ -196,6 +220,61 @@ function shedMemory(opts) {
196
220
  }
197
221
  }
198
222
 
223
+ // 5. lr-f36626: per-session notification + durable AUTO-RESUME marker for
224
+ // every session force-evicted while a live background child was
225
+ // registered. This is the ONLY reap-adjacent path allowed to reclaim a
226
+ // live-child session (the idle reaper in sdk-bridge.js now refuses to —
227
+ // see the lastActivityAt bump on subagent stream events in
228
+ // sdk-message-processor.js), and per spec it must never do so silently:
229
+ // - session.pendingAutoResume=true is a durable flag (persisted via
230
+ // sm.saveSessionFile) so a later reconnect / session-list read can
231
+ // drive a console-initiated AUTO-RESUME of that session — the "durable
232
+ // checkpoint" is the on-disk session file itself (source of truth is
233
+ // already disk per lr-2ea2a7; this eviction never touched it) plus
234
+ // this marker recording WHY a resume is expected.
235
+ // - Diagnostics panel: same broadcast diagnostic path as step 4, one
236
+ // entry per reclaimed session, source 'memory-reclaim' so it reads
237
+ // distinctly from the routine pressure diagnostic above.
238
+ // - Inline red chat marker: sendAndRecord'd into the affected session's
239
+ // own history via the existing type:"error" -> addSystemMessage(...,
240
+ // true) render path (sys-msg.error) — zero new frontend code, and it
241
+ // replays correctly on reconnect like any other history entry.
242
+ for (var li = 0; li < liveChildReclaims.length; li++) {
243
+ var reclaim = liveChildReclaims[li];
244
+ var rSession = reclaim.session;
245
+ if (!rSession) continue;
246
+ try {
247
+ rSession.pendingAutoResume = true;
248
+ rSession.pendingAutoResumeReason = 'memory_pressure_reclaim';
249
+ if (reclaim.sm && typeof reclaim.sm.saveSessionFile === 'function') {
250
+ reclaim.sm.saveSessionFile(rSession);
251
+ }
252
+ } catch (e) {
253
+ // Marker persistence failing must not block the notification below —
254
+ // the operator still needs to see the reclaim happened.
255
+ }
256
+
257
+ var reclaimMessage = 'Memory pressure reclaimed this session while a background task was still running. '
258
+ + 'It will auto-resume; if it does not, resume it manually.';
259
+
260
+ if (reclaim.send) {
261
+ try {
262
+ reclaim.send({
263
+ type: 'diagnostic',
264
+ severity: 'warning',
265
+ source: 'memory-reclaim',
266
+ message: (reclaim.slug ? '[' + reclaim.slug + '] ' : '') + reclaimMessage,
267
+ });
268
+ } catch (e) { /* one client's send failure must not block others */ }
269
+ }
270
+
271
+ if (reclaim.sm && typeof reclaim.sm.sendAndRecord === 'function') {
272
+ try {
273
+ reclaim.sm.sendAndRecord(rSession, { type: 'error', text: reclaimMessage });
274
+ } catch (e) { /* inline marker failing must not block the rest of the pass */ }
275
+ }
276
+ }
277
+
199
278
  return summary;
200
279
  }
201
280
 
package/lib/pages.js CHANGED
@@ -5,7 +5,7 @@ function setupPageHtml(httpsUrl, httpUrl, hasCert, lanMode) {
5
5
  <meta name="apple-mobile-web-app-capable" content="yes">
6
6
  <link rel="manifest" href="/manifest.json">
7
7
  <link rel="apple-touch-icon" href="/apple-touch-icon.png">
8
- <title>Setup - Clagentic:Console</title>
8
+ <title>Setup - Clagentic: Console</title>
9
9
  <style>
10
10
  :root{--s-bg:#060810;--s-text:#C8D4E0;--s-accent:#00CFFF;--s-muted:#7A8FA6;--s-border:#1E2E48;--s-dimmer:#3D5068;--s-success:#29D9A8;--s-accent-15:rgba(0,207,255,0.15);--s-success-10:rgba(41,217,168,0.1);--s-success-15:rgba(41,217,168,0.15);--s-accent-06:rgba(0,207,255,0.06);--s-muted-06:rgba(122,143,166,0.06);--s-muted-15:rgba(122,143,166,0.15)}
11
11
  @media(prefers-color-scheme:light){:root{--s-bg:#F4F7FB;--s-text:#1E2A38;--s-accent:#0099CC;--s-muted:#4A5D72;--s-border:#B4C6D9;--s-dimmer:#8FA4BA;--s-success:#1BA87E;--s-accent-15:rgba(0,153,204,0.15);--s-success-10:rgba(27,168,126,0.1);--s-success-15:rgba(27,168,126,0.15);--s-accent-06:rgba(0,153,204,0.06);--s-muted-06:rgba(74,93,114,0.06);--s-muted-15:rgba(74,93,114,0.15)}}
@@ -65,7 +65,7 @@ h1{color:var(--s-accent);font-size:22px;margin:0 0 4px;text-align:center}
65
65
  .done-note .skip-link{display:inline;margin-top:0;font-size:13px}
66
66
  </style></head><body>
67
67
  <div class="c">
68
- <h1>Clagentic:Console</h1>
68
+ <h1>Clagentic: Console</h1>
69
69
  <p class="subtitle">Setup your device for the best experience</p>
70
70
 
71
71
  <div class="steps-bar" id="steps-bar"></div>
@@ -118,7 +118,7 @@ h1{color:var(--s-accent);font-size:22px;margin:0 0 4px;text-align:center}
118
118
  <div class="step-card" id="step-pwa">
119
119
  <div class="step-label">Step <span class="step-cur">2</span> of <span class="step-total">3</span></div>
120
120
  <div class="step-title">Add to Home Screen</div>
121
- <div class="step-desc">Install Clagentic:Console as an app for quick access and a full-screen experience.</div>
121
+ <div class="step-desc">Install Clagentic: Console as an app for quick access and a full-screen experience.</div>
122
122
 
123
123
  <div class="platform-ios">
124
124
  <div class="check-status warn">On iOS, push notifications only work from the installed app. This step is required.</div>
@@ -158,12 +158,12 @@ h1{color:var(--s-accent);font-size:22px;margin:0 0 4px;text-align:center}
158
158
  </div>
159
159
  <div class="instruction"><div class="inst-num">2</div>
160
160
  <div class="inst-text">Click it and then click <b>Install</b> to confirm.
161
- <div class="note">If there is no icon, go to <b>Menu > Install Clagentic:Console</b> or <b>Menu > Save and Share > Install</b>.</div>
161
+ <div class="note">If there is no icon, go to <b>Menu > Install Clagentic: Console</b> or <b>Menu > Save and Share > Install</b>.</div>
162
162
  </div>
163
163
  </div>
164
164
  </div>
165
165
 
166
- <div id="pwa-status" class="check-status pending">After installing, open Clagentic:Console from your home screen to continue setup.</div>
166
+ <div id="pwa-status" class="check-status pending">After installing, open Clagentic: Console from your home screen to continue setup.</div>
167
167
  <button class="skip-link" id="pwa-skip" onclick="nextStep()" style="display:none">Skip for now</button>
168
168
  </div>
169
169
 
@@ -191,7 +191,7 @@ h1{color:var(--s-accent);font-size:22px;margin:0 0 4px;text-align:center}
191
191
  <div class="done-title">All set!</div>
192
192
  <div class="done-desc">Your device is configured. You can change these settings anytime from the app.</div>
193
193
  <p class="done-note" id="remote-access-note">Want access outside your local network? Options include <a href="https://tailscale.com" target="_blank" rel="noopener">Tailscale</a>, <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/" target="_blank" rel="noopener">Cloudflare Tunnel</a>, or your existing VPN. <button class="skip-link" onclick="document.getElementById('remote-access-note').style.display='none'">Dismiss</button></p>
194
- <a class="btn" id="done-link" href="${httpsUrl}">Open Clagentic:Console</a>
194
+ <a class="btn" id="done-link" href="${httpsUrl}">Open Clagentic: Console</a>
195
195
  </div>
196
196
  </div>
197
197
  </div>
@@ -447,7 +447,7 @@ function pushDone() {
447
447
  pushStatus.textContent = "Push notifications enabled!";
448
448
  fireConfetti();
449
449
  navigator.serviceWorker.ready.then(function(reg) {
450
- reg.showNotification("\ud83c\udf89 Welcome to Clagentic:Console!", {
450
+ reg.showNotification("\ud83c\udf89 Welcome to Clagentic: Console!", {
451
451
  body: "\ud83d\udd14 You\u2019ll be notified when Claude responds.",
452
452
  tag: "claude-welcome",
453
453
  });
@@ -554,10 +554,6 @@ if (!isHttps && !isLocal) {
554
554
  }
555
555
 
556
556
 
557
- function escapeHtml(s) {
558
- return String(s).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
559
- }
560
-
561
557
  // --- Build auth page CSS variables from ayu-light theme (same logic as theme.js computeVars) ---
562
558
  var path = require("path");
563
559
  var _authTheme = require(path.join(__dirname, "themes", "ayu-light.json"));
@@ -702,7 +698,7 @@ function adminSetupPageHtml() {
702
698
  return '<!DOCTYPE html><html lang="en"><head>' +
703
699
  '<meta charset="UTF-8">' +
704
700
  '<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">' +
705
- '<title>Admin Setup - Clagentic:Console</title>' +
701
+ '<title>Admin Setup - Clagentic: Console</title>' +
706
702
  '<style>' + authPageStyles + '</style></head><body><div class="c">' +
707
703
  '<div class="steps-bar"><span class="steps-dot current" id="dot0"></span><span class="steps-dot" id="dot1"></span><span class="steps-dot" id="dot2"></span><span class="steps-dot" id="dot3"></span></div>' +
708
704
 
@@ -797,7 +793,7 @@ function multiUserLoginPageHtml() {
797
793
  return '<!DOCTYPE html><html lang="en"><head>' +
798
794
  '<meta charset="UTF-8">' +
799
795
  '<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">' +
800
- '<title>Login - Clagentic:Console</title>' +
796
+ '<title>Login - Clagentic: Console</title>' +
801
797
  '<style>' + authPageStyles + '</style></head><body><div class="c">' +
802
798
  '<div class="steps-bar"><span class="steps-dot current" id="dot0"></span><span class="steps-dot" id="dot1"></span></div>' +
803
799
 
@@ -885,7 +881,7 @@ function invitePageHtml(inviteCode) {
885
881
  return '<!DOCTYPE html><html lang="en"><head>' +
886
882
  '<meta charset="UTF-8">' +
887
883
  '<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">' +
888
- '<title>Join - Clagentic:Console</title>' +
884
+ '<title>Join - Clagentic: Console</title>' +
889
885
  '<style>' + authPageStyles + '</style></head><body><div class="c">' +
890
886
  '<div class="steps-bar"><span class="steps-dot current" id="dot0"></span><span class="steps-dot" id="dot1"></span><span class="steps-dot" id="dot2"></span></div>' +
891
887
 
@@ -966,7 +962,7 @@ function smtpLoginPageHtml() {
966
962
  return '<!DOCTYPE html><html lang="en"><head>' +
967
963
  '<meta charset="UTF-8">' +
968
964
  '<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">' +
969
- '<title>Login - Clagentic:Console</title>' +
965
+ '<title>Login - Clagentic: Console</title>' +
970
966
  '<style>' + authPageStyles +
971
967
  '.otp-input{width:100%;font-size:24px;letter-spacing:8px;text-align:center;padding:12px;' +
972
968
  'background:var(--field-bg);border:1px solid var(--field-border);border-radius:8px;color:var(--fg);' +
@@ -1122,7 +1118,7 @@ function smtpInvitePageHtml(inviteCode) {
1122
1118
  return '<!DOCTYPE html><html lang="en"><head>' +
1123
1119
  '<meta charset="UTF-8">' +
1124
1120
  '<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">' +
1125
- '<title>Join - Clagentic:Console</title>' +
1121
+ '<title>Join - Clagentic: Console</title>' +
1126
1122
  '<style>' + authPageStyles + '</style></head><body><div class="c">' +
1127
1123
  '<div class="steps-bar"><span class="steps-dot current" id="dot0"></span><span class="steps-dot" id="dot1"></span><span class="steps-dot" id="dot2"></span></div>' +
1128
1124
 
@@ -1210,7 +1206,7 @@ function noProjectsPageHtml() {
1210
1206
  return '<!DOCTYPE html><html lang="en"><head>' +
1211
1207
  '<meta charset="UTF-8">' +
1212
1208
  '<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">' +
1213
- '<title>Clagentic:Console</title>' +
1209
+ '<title>Clagentic: Console</title>' +
1214
1210
  '<style>' + authPageStyles + '</style></head><body><div class="c">' +
1215
1211
  '<h1>Hang tight!</h1>' +
1216
1212
  '<div class="sub">No projects have been assigned to your account yet.</div>' +
@@ -196,6 +196,19 @@ function attachConnection(ctx) {
196
196
  active.ownerId = wsUser.id;
197
197
  sm.saveSessionFile(active);
198
198
  }
199
+ // lr-f36626: console-driven AUTO-RESUME for a session that was force-
200
+ // evicted under memory pressure while it had a live background child
201
+ // (see lib/memory-shed.js's liveChildReclaims handling). The eviction
202
+ // itself never killed queryInstance — the child kept running — so
203
+ // "resume" here means: this is the first console reconnect since the
204
+ // reclaim, the durable checkpoint (the on-disk session file, already
205
+ // reloaded by loadSessionHistory above) is what the operator sees, and
206
+ // the flag is cleared so this fires exactly once, not on every
207
+ // subsequent reconnect to the same session.
208
+ if (active.pendingAutoResume) {
209
+ active.pendingAutoResume = false;
210
+ sm.saveSessionFile(active);
211
+ }
199
212
  // lr-2ea2a7: hasHistory uses the ABSOLUTE count (_historyBaseIndex +
200
213
  // heap length), not the raw heap length — with a bounded tail-loaded
201
214
  // session the heap length alone is still correct here (a session with
@@ -1441,6 +1441,10 @@ function attachLoop(ctx) {
1441
1441
  for (var di = 0; di < sessionIds.length; di++) {
1442
1442
  sm.deleteSessionQuiet(sessionIds[di]);
1443
1443
  }
1444
+ // lr-0827ba (PEACHES follow-up): notify clients of exactly which
1445
+ // sessions were deleted so per-session client state (rate-limit-state.js)
1446
+ // can be pruned instead of leaking a background timer forever.
1447
+ if (sessionIds.length > 0) sm.broadcastSessionDeleted(sessionIds);
1444
1448
  loopRegistry.remove(loopIdToDel);
1445
1449
  sm.broadcastSessionList();
1446
1450
  return true;
@@ -1538,10 +1538,16 @@ function attachSessions(ctx) {
1538
1538
  moveAllSchedulesToProject(removeSlug, msg.moveTasksTo);
1539
1539
  }
1540
1540
  if (typeof opts.onRemoveProject === "function") {
1541
- // Send result before removing so the WS is still open
1542
- sendTo(ws, { type: "remove_project_result", ok: true, slug: removeSlug });
1541
+ // onRemoveProject is synchronous (git worktree remove runs via
1542
+ // execFileSync) — call it first and forward its actual result.
1543
+ // Previously this sent {ok:true} unconditionally before calling
1544
+ // onRemoveProject, so a real failure (e.g. dirty/locked worktree
1545
+ // returned by removeWorktree) was silently discarded: the client
1546
+ // was told removal succeeded while the worktree stayed on disk
1547
+ // (lr-fc2818).
1543
1548
  var removeUserId = ws._clayUser ? ws._clayUser.id : null;
1544
- opts.onRemoveProject(removeSlug, removeUserId);
1549
+ var removeResult = opts.onRemoveProject(removeSlug, removeUserId) || {};
1550
+ sendTo(ws, { type: "remove_project_result", ok: removeResult.ok !== false, slug: removeSlug, error: removeResult.error });
1545
1551
  } else {
1546
1552
  sendTo(ws, { type: "remove_project_result", ok: false, error: "Not supported" });
1547
1553
  }
package/lib/project.js CHANGED
@@ -689,6 +689,7 @@ function createProjectContext(opts) {
689
689
  text: text,
690
690
  resetsAt: sendsAt,
691
691
  scheduledAt: Date.now(),
692
+ localId: session.localId,
692
693
  };
693
694
  sm.sendAndRecord(session, schedEntry);
694
695
  session.scheduledMessage = {
@@ -698,7 +699,7 @@ function createProjectContext(opts) {
698
699
  session.scheduledMessage = null;
699
700
  if (session.destroying) return;
700
701
  console.log("[project] Scheduled message firing for session " + session.localId);
701
- sm.sendAndRecord(session, { type: "scheduled_message_sent" });
702
+ sm.sendAndRecord(session, { type: "scheduled_message_sent", localId: session.localId });
702
703
  var schedUserMsg = { type: "user_message", text: text, _ts: Date.now() };
703
704
  // lr-2ea2a7: routes through the shared history-cap helper (see grep-guard test).
704
705
  sm.recordHistoryEntry(session, schedUserMsg, true);
@@ -719,7 +720,7 @@ function createProjectContext(opts) {
719
720
  clearTimeout(session.scheduledMessage.timer);
720
721
  session.scheduledMessage = null;
721
722
  session.rateLimitAutoContinuePending = false;
722
- sm.sendAndRecord(session, { type: "scheduled_message_cancelled" });
723
+ sm.sendAndRecord(session, { type: "scheduled_message_cancelled", localId: session.localId });
723
724
  }
724
725
  }
725
726
 
@@ -241,6 +241,21 @@
241
241
  -------------------------------------------------------- */
242
242
  .toast-diagnostic {
243
243
  position: relative;
244
+ /* lr-56fb36: the base .toast rule (base.css) sets left:50% and bottom:80px
245
+ for its own center-bottom, single-toast anchoring. .toast-diagnostic
246
+ already overrides transform (translateY only, no translateX) and
247
+ position (relative, not fixed), but left/bottom are separate properties
248
+ that were never reset here — the cascade lets them leak through
249
+ unchanged, offsetting this box away from the normal-flow position the
250
+ corner-anchored #diagnostic-toast-container (lr-e901) computes for it.
251
+ That leftover left:50% is what pushes the toast off past the right
252
+ viewport edge on both desktop and mobile despite the lr-fab390/lr-4ef618
253
+ width clamps, which only bound the box's own width, not its offset.
254
+ Reset both explicitly so this box's position comes entirely from normal
255
+ flow inside the container, matching the positioning-comes-from-the-
256
+ parent contract stated below. */
257
+ left: auto;
258
+ bottom: auto;
244
259
  opacity: 0;
245
260
  transform: translateY(-8px);
246
261
  pointer-events: auto;
@@ -251,11 +266,19 @@
251
266
  border-radius: 10px;
252
267
  box-shadow: 0 4px 20px rgba(var(--shadow-rgb), 0.3);
253
268
  min-width: 280px;
254
- max-width: 400px;
269
+ /* lr-fab390: the container is right:8px from the viewport edge, so the
270
+ box's available width is capped at (100vw - 16px) — clamp max-width to
271
+ whichever is smaller than the 400px intent so the box can never be
272
+ pushed past the right edge on a narrow/zoomed desktop viewport. The
273
+ min-width:280px floor is unchanged; it still fits down to ~296px
274
+ viewports, matching the mobile breakpoint below which the container
275
+ itself switches to a full-width layout. */
276
+ max-width: min(400px, calc(100vw - 16px));
255
277
  padding: 10px 14px;
256
278
  display: flex;
257
279
  flex-direction: column;
258
280
  gap: 4px;
281
+ box-sizing: border-box;
259
282
  }
260
283
  .toast-diagnostic.visible {
261
284
  opacity: 1;
@@ -324,6 +347,11 @@
324
347
  font-size: 12.5px;
325
348
  color: var(--text-secondary);
326
349
  line-height: 1.5;
350
+ /* lr-fab390: mirrors the mobile overflow-wrap:anywhere fix (lr-4ef618,
351
+ below) — word-break:break-word alone does not break long unbreakable
352
+ tokens (hook event names, absolute paths), letting them force the
353
+ flex child's intrinsic width past the container's right edge. */
354
+ overflow-wrap: anywhere;
327
355
  word-break: break-word;
328
356
  }
329
357
 
@@ -497,6 +497,16 @@
497
497
  text-align: center;
498
498
  flex-shrink: 0;
499
499
  }
500
+ /* Per-project alert indicator — same red used by .icon-strip-project-badge
501
+ (unread badge). A count wouldn't fit this row, so a plain dot is enough
502
+ to show WHERE the alert is coming from. */
503
+ .hub-recent-alert-dot {
504
+ width: 6px;
505
+ height: 6px;
506
+ border-radius: 50%;
507
+ flex-shrink: 0;
508
+ background: #e74c3c;
509
+ }
500
510
  .hub-recent-project-icon--blank {
501
511
  width: 20px;
502
512
  height: 20px;
@@ -1325,3 +1325,22 @@ button.top-bar-pill.pill-accent:hover { background: color-mix(in srgb, var(--acc
1325
1325
  margin-top: 1.2rem;
1326
1326
  letter-spacing: 0.03em;
1327
1327
  }
1328
+
1329
+ /* lr-de5fcb Surface 1: shown only in the explicit "session expired" state,
1330
+ never during a normal transient-disconnect reconnect. */
1331
+ #connect-overlay-signin-btn {
1332
+ margin-top: 1rem;
1333
+ padding: 0.5rem 1.2rem;
1334
+ border-radius: 6px;
1335
+ border: 1px solid #DA7756;
1336
+ background: transparent;
1337
+ color: #DA7756;
1338
+ font-family: var(--font-mono);
1339
+ font-size: 0.85rem;
1340
+ cursor: pointer;
1341
+ }
1342
+
1343
+ #connect-overlay-signin-btn:hover {
1344
+ background: #DA7756;
1345
+ color: #000;
1346
+ }
@@ -14,7 +14,7 @@
14
14
  <meta name="theme-color" content="#282a36">
15
15
  <link rel="icon" type="image/png" href="favicon-banded.png">
16
16
  <link rel="apple-touch-icon" href="apple-touch-icon.png">
17
- <title>Clagentic:Console</title>
17
+ <title>Clagentic: Console</title>
18
18
  <link rel="preconnect" href="https://fonts.googleapis.com">
19
19
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
20
20
  <link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=DM+Mono:wght@300;400;500&family=Roboto+Mono:wght@400;500;700&family=Nunito:wght@700;800&display=swap" rel="stylesheet">
@@ -52,11 +52,11 @@
52
52
  <button id="ext-pill" class="top-bar-ext-btn" title="Chrome Extension"><i data-lucide="puzzle"></i> Extension</button>
53
53
  <div id="ext-popover" class="ext-popover">
54
54
  <div class="ext-popover-header">
55
- <div class="ext-popover-title">Clagentic:Console for Chrome <span class="ext-experimental">Experimental</span></div>
55
+ <div class="ext-popover-title">Clagentic: Console for Chrome <span class="ext-experimental">Experimental</span></div>
56
56
  <div class="ext-popover-sub">v0.1.0</div>
57
57
  </div>
58
58
  <div class="ext-popover-connected hidden" id="ext-connected-banner"><i data-lucide="check-circle"></i> Extension connected</div>
59
- <div class="ext-popover-desc" id="ext-popover-desc">Connect your browser to Clagentic:Console. Gives Claude visibility into open tabs, console, network, DOM, and screenshots.</div>
59
+ <div class="ext-popover-desc" id="ext-popover-desc">Connect your browser to Clagentic: Console. Gives Claude visibility into open tabs, console, network, DOM, and screenshots.</div>
60
60
  <button class="ext-popover-download" id="ext-download-btn"><i data-lucide="download"></i> Download Extension (.zip)</button>
61
61
  <div class="ext-popover-status hidden" id="ext-download-status"></div>
62
62
  <div class="ext-popover-divider" id="ext-popover-divider"></div>
@@ -95,9 +95,9 @@
95
95
 
96
96
  <!-- === Icon Strip === -->
97
97
  <div id="icon-strip">
98
- <div class="icon-strip-home" title="Clagentic:Console">
98
+ <div class="icon-strip-home" title="Clagentic: Console">
99
99
  <span class="icon-strip-pill"></span>
100
- <svg class="icon-strip-logo" width="38" height="38" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg" aria-label="Clagentic:Console">
100
+ <svg class="icon-strip-logo" width="38" height="38" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg" aria-label="Clagentic: Console">
101
101
  <defs>
102
102
  <linearGradient id="cg-strip" gradientUnits="userSpaceOnUse" x1="6" y1="10" x2="66" y2="62">
103
103
  <stop offset="0%" stop-color="#00CFFF"/>
@@ -282,6 +282,7 @@
282
282
  <div id="connect-overlay">
283
283
  <svg id="console-logo-svg" viewBox="0 0 112 112" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"></svg>
284
284
  <p id="connect-overlay-msg">Reconnecting to server…</p>
285
+ <button id="connect-overlay-signin-btn" class="hidden">Sign in again</button>
285
286
  </div>
286
287
  <div id="sticky-notes-container" class="hidden"></div>
287
288
  <div id="replay-loading" class="hidden">
@@ -949,7 +950,7 @@
949
950
  <button class="layout-option" data-brand="classic">
950
951
  <span class="layout-option-icon">◈</span>
951
952
  <span class="layout-option-label">Classic</span>
952
- <span class="layout-option-desc">The original Clagentic:Console look. Dracula dark, Ayu light.</span>
953
+ <span class="layout-option-desc">The original Clagentic: Console look. Dracula dark, Ayu light.</span>
953
954
  </button>
954
955
  </div>
955
956
  </div>
@@ -1427,7 +1428,7 @@
1427
1428
  </div>
1428
1429
  <div class="server-settings-section" data-section="restart">
1429
1430
  <h2>Restart</h2>
1430
- <p class="settings-hint" style="margin-bottom: 16px;">Restart the Clagentic:Console daemon process. All active sessions will be briefly interrupted and clients will automatically reconnect.</p>
1431
+ <p class="settings-hint" style="margin-bottom: 16px;">Restart the Clagentic: Console daemon process. All active sessions will be briefly interrupted and clients will automatically reconnect.</p>
1431
1432
  <div class="settings-card">
1432
1433
  <div class="settings-field">
1433
1434
  <label class="settings-label">Restart Daemon</label>
@@ -1445,7 +1446,7 @@
1445
1446
  <div class="settings-danger-icon"><i data-lucide="alert-triangle"></i></div>
1446
1447
  <div class="settings-danger-body">
1447
1448
  <h3 class="settings-danger-title">Danger Zone</h3>
1448
- <p class="settings-danger-desc">Shutting down the server will terminate all active sessions, disconnect all clients, and stop the Clagentic:Console daemon process. This action cannot be undone.</p>
1449
+ <p class="settings-danger-desc">Shutting down the server will terminate all active sessions, disconnect all clients, and stop the Clagentic: Console daemon process. This action cannot be undone.</p>
1449
1450
  </div>
1450
1451
  </div>
1451
1452
  <div class="settings-card settings-card-danger">
@@ -1696,7 +1697,7 @@
1696
1697
  <button class="skills-close" id="mcp-modal-close"><i data-lucide="x"></i></button>
1697
1698
  </div>
1698
1699
  <div class="mcp-content" id="mcp-content">
1699
- <p class="mcp-no-servers">No MCP servers detected. Configure in Clagentic:Console Chrome Extension.</p>
1700
+ <p class="mcp-no-servers">No MCP servers detected. Configure in Clagentic: Console Chrome Extension.</p>
1700
1701
  </div>
1701
1702
  </div>
1702
1703
  </div>
@@ -1794,7 +1795,7 @@
1794
1795
  <h3>Provide details</h3>
1795
1796
  <div id="ralph-input-task-section" class="hidden">
1796
1797
  <label class="ralph-field-label" for="ralph-task">Task description <span class="ralph-field-req">*</span></label>
1797
- <p class="ralph-hint">Write a rough idea. Clagentic:Console will refine it into detailed instructions.</p>
1798
+ <p class="ralph-hint">Write a rough idea. Clagentic: Console will refine it into detailed instructions.</p>
1798
1799
  <textarea id="ralph-task" rows="5" placeholder="e.g. Add dark mode toggle to the settings page"></textarea>
1799
1800
  </div>
1800
1801
  <div id="ralph-input-prompt-section" class="hidden">
@@ -2082,7 +2083,7 @@
2082
2083
  <div class="pwa-modal-card">
2083
2084
  <div class="pwa-modal-icon">📲</div>
2084
2085
  <h3 class="pwa-modal-title">Add to Home Screen</h3>
2085
- <p class="pwa-modal-desc">Add Clagentic:Console to your home screen for a better experience.</p>
2086
+ <p class="pwa-modal-desc">Add Clagentic: Console to your home screen for a better experience.</p>
2086
2087
  <ul class="pwa-modal-benefits">
2087
2088
  <li><i data-lucide="maximize" class="pwa-benefit-icon"></i>Full-screen — no browser toolbar</li>
2088
2089
  <li><i data-lucide="bell" class="pwa-benefit-icon"></i>Push notifications when tasks finish</li>
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "Clagentic:Console",
2
+ "name": "Clagentic: Console",
3
3
  "short_name": "Console",
4
4
  "id": "/",
5
5
  "start_url": "/",