@slack/radar-mcp 1.18.0 → 1.19.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 +9 -4
- package/dist/mcp/index.js +18 -1
- package/dist/mcp/web-child-env.js +10 -7
- package/dist/shared/android.d.ts +10 -21
- package/dist/shared/android.js +40 -10
- package/dist/shared/dashboard-screen.d.ts +2 -2
- package/dist/shared/ios.d.ts +5 -10
- package/dist/shared/ios.js +23 -5
- package/dist/shared/screen-artifacts.d.ts +18 -1
- package/dist/shared/screen-artifacts.js +18 -2
- package/dist/shared/screen.d.ts +8 -14
- package/dist/shared/screen.js +26 -45
- package/dist/shared/transport.d.ts +31 -19
- package/dist/shared/wire.d.ts +24 -0
- package/dist/shared/wire.js +6 -0
- package/dist/web/bin.js +13 -9
- package/dist/web/macapp/RadarApp.swift +24 -4
- package/dist/web/public/index.html +39 -4
- package/dist/web/public/next/app.js +186 -18
- package/dist/web/public/next/feed.js +60 -11
- package/dist/web/public/next/filter.js +24 -11
- package/dist/web/public/next/screen.js +154 -73
- package/dist/web/public/next/store.js +639 -28
- package/dist/web/server.d.ts +29 -8
- package/dist/web/server.js +634 -65
- package/package.json +1 -1
package/dist/shared/screen.js
CHANGED
|
@@ -37,45 +37,23 @@
|
|
|
37
37
|
* explicitly on cleanup.
|
|
38
38
|
*/
|
|
39
39
|
import fs from "fs";
|
|
40
|
-
import os from "os";
|
|
41
40
|
import path from "path";
|
|
42
41
|
import { spawn, execFile, execFileSync } from "child_process";
|
|
43
42
|
import { promisify } from "util";
|
|
44
43
|
import { resolveAdbPath } from "./android.js";
|
|
45
|
-
import { createRecordingPath, secureRecording, } from "./screen-artifacts.js";
|
|
46
|
-
const SC_TMP = path.join(os.homedir(), ".slack-radar", "screen");
|
|
44
|
+
import { SCREEN_DIRECTORY, cleanupRecordings, createRecordingPath, secureRecording, } from "./screen-artifacts.js";
|
|
47
45
|
/**
|
|
48
|
-
* The only file names this module writes into the screen tmp dir, and therefore the only
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
46
|
+
* The only file names this module writes into the screen tmp dir, and therefore the only ones it
|
|
47
|
+
* will serve for download. Screenshots (png) joined recordings (mp4) here when screenshots became
|
|
48
|
+
* two-phase: a screenshot has to exist on disk for the outcome to be reportable before the browser
|
|
49
|
+
* is told to download it.
|
|
52
50
|
*/
|
|
53
51
|
const CAPTURE_NAME = /^radar_screen_[\w-]+\.(mp4|png)$/;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
* re-enable: a plain re-arm of the same device leaves the user's clips alone. Scoped to the
|
|
60
|
-
* names this module writes so it never deletes an unrelated file that landed in the dir.
|
|
61
|
-
*/
|
|
62
|
-
export function cleanupRecordings() {
|
|
63
|
-
try {
|
|
64
|
-
for (const f of fs.readdirSync(SC_TMP)) {
|
|
65
|
-
if (CAPTURE_NAME.test(f)) {
|
|
66
|
-
try {
|
|
67
|
-
fs.unlinkSync(path.join(SC_TMP, f));
|
|
68
|
-
}
|
|
69
|
-
catch {
|
|
70
|
-
// best-effort per file
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
// dir may not exist yet; nothing to clean
|
|
77
|
-
}
|
|
78
|
-
}
|
|
52
|
+
// Re-exported for the callers that reach the session-boundary cleanup through this module. This file
|
|
53
|
+
// carried a second copy of it, with its own dir and name pattern, until boot started reaching the
|
|
54
|
+
// screen-artifacts copy directly: two cleanups whose constants could be tightened apart with nothing
|
|
55
|
+
// failing.
|
|
56
|
+
export { cleanupRecordings };
|
|
79
57
|
const SC_SIZE = "720x1612";
|
|
80
58
|
const SC_BITRATE = "8000000";
|
|
81
59
|
const SC_BOUNDARY = "radarframe";
|
|
@@ -749,7 +727,7 @@ export function capturePath(file) {
|
|
|
749
727
|
const base = path.basename(file);
|
|
750
728
|
if (!CAPTURE_NAME.test(base))
|
|
751
729
|
return null;
|
|
752
|
-
const p = path.join(
|
|
730
|
+
const p = path.join(SCREEN_DIRECTORY, base);
|
|
753
731
|
return fs.existsSync(p) ? p : null;
|
|
754
732
|
}
|
|
755
733
|
/** The user-facing wording for each way a screenshot save can fail. */
|
|
@@ -776,16 +754,16 @@ export async function saveScreenshot() {
|
|
|
776
754
|
if (!png)
|
|
777
755
|
return { ok: false, reason: "capture-failed" };
|
|
778
756
|
const safe = new Date().toISOString().replace(/[:.]/g, "-");
|
|
779
|
-
const out = path.join(
|
|
757
|
+
const out = path.join(SCREEN_DIRECTORY, `radar_screen_${safe}.png`);
|
|
780
758
|
// Every host-side step is inside one try, so a failure to CREATE the dir is reported the same
|
|
781
759
|
// way as a failure to write the file. Left outside, an unwritable home threw straight out of
|
|
782
760
|
// here, and the route calling it has no catch, so the request hung until the client timed out.
|
|
783
761
|
try {
|
|
784
|
-
fs.mkdirSync(
|
|
762
|
+
fs.mkdirSync(SCREEN_DIRECTORY, { recursive: true, mode: 0o700 });
|
|
785
763
|
// mkdirSync's mode only applies on creation, so a dir from an earlier session keeps its
|
|
786
764
|
// old (world-traversable) perms. Same unconditional chmod startRecording does.
|
|
787
765
|
try {
|
|
788
|
-
fs.chmodSync(
|
|
766
|
+
fs.chmodSync(SCREEN_DIRECTORY, 0o700);
|
|
789
767
|
}
|
|
790
768
|
catch {
|
|
791
769
|
// best-effort; the file mode below is still applied
|
|
@@ -810,9 +788,10 @@ export function resetScreenDetection() {
|
|
|
810
788
|
}
|
|
811
789
|
/**
|
|
812
790
|
* Reset detection AND tear everything down: this process's live cast, the recorded mp4s, and any
|
|
813
|
-
* orphaned device-side screenrecord radar left behind. Only for a real session boundary (
|
|
814
|
-
* hardware, a
|
|
815
|
-
* user may be in the middle of, so
|
|
791
|
+
* orphaned device-side screenrecord radar left behind. Only for a real session boundary (dashboard
|
|
792
|
+
* boot, different hardware, a first enable that boot could not reap for, a deliberate re-detect, or
|
|
793
|
+
* process exit): the recordings and the live cast are work a user may be in the middle of, so
|
|
794
|
+
* calling this when nothing actually changed destroys it.
|
|
816
795
|
*/
|
|
817
796
|
export function resetScreenState() {
|
|
818
797
|
resetScreenDetection();
|
|
@@ -824,10 +803,11 @@ export function resetScreenState() {
|
|
|
824
803
|
// session boundary on disk.
|
|
825
804
|
cleanupRecordings();
|
|
826
805
|
// Best-effort: clean up orphaned device-side screenrecord procs that the host pipe
|
|
827
|
-
// close did not kill (they congest the single adb transport).
|
|
828
|
-
//
|
|
829
|
-
//
|
|
830
|
-
//
|
|
806
|
+
// close did not kill (they congest the single adb transport). The match is by cmdline and
|
|
807
|
+
// device-wide, so it also kills another dashboard's live cast and a hand-run
|
|
808
|
+
// `screenrecord --output-format=h264`; only the plain `screenrecord file.mp4` form falls
|
|
809
|
+
// outside the pattern. Single token deliberately: adb shell rejoins and re-parses the argv,
|
|
810
|
+
// so a pattern containing a space would need device-side quoting.
|
|
831
811
|
try {
|
|
832
812
|
execFile(adb(), ["shell", "pkill", "-9", "-f", "output-format=h264"], { timeout: 5000 }, () => { });
|
|
833
813
|
}
|
|
@@ -840,7 +820,8 @@ let cleanupRegistered = false;
|
|
|
840
820
|
* Kill any live cast (and orphaned device-side screenrecord) on process exit. Mirrors
|
|
841
821
|
* logcat-capture.registerCleanup(); without it, Ctrl-C on an open mirror orphans the
|
|
842
822
|
* screenrecord + ffmpeg children and leaves the device transport congested for the
|
|
843
|
-
* next session. Called
|
|
823
|
+
* next session. Called once the port bind is won (see registerScreenCleanupOnBind), so a launcher
|
|
824
|
+
* that loses the bind never arms a handler that would delete the winner's captures.
|
|
844
825
|
*/
|
|
845
826
|
export function registerScreenCleanup() {
|
|
846
827
|
if (cleanupRegistered)
|
|
@@ -880,7 +861,7 @@ function signalCleanup() {
|
|
|
880
861
|
scLive = null;
|
|
881
862
|
}
|
|
882
863
|
try {
|
|
883
|
-
//
|
|
864
|
+
// Same device-wide cmdline match as resetScreenState; see the note there for what it reaches.
|
|
884
865
|
execFileSync(adb(), ["shell", "pkill", "-9", "-f", "output-format=h264"], {
|
|
885
866
|
timeout: 3000,
|
|
886
867
|
stdio: "ignore",
|
|
@@ -38,6 +38,25 @@ export interface DeviceInfo {
|
|
|
38
38
|
/** Platform discriminator for mixed or platform-specific device UIs. */
|
|
39
39
|
platform?: string;
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* The outcome of choosing a device (selectDevice / resolveDevice). On success `serial` is null
|
|
43
|
+
* when nothing is attached (the caller's forward path reports no-device on its own); `switched`
|
|
44
|
+
* is true when the pick differs from the session's prior device; `devices` is the listing the
|
|
45
|
+
* pick was made from where the transport has one. On failure `error` is human-readable and
|
|
46
|
+
* `instructs` says whether that wording tells the user what to do next (set here, where the
|
|
47
|
+
* wording is written, so no client has to guess it from the prose).
|
|
48
|
+
*/
|
|
49
|
+
export type DevicePick = {
|
|
50
|
+
ok: true;
|
|
51
|
+
serial: string | null;
|
|
52
|
+
switched?: boolean;
|
|
53
|
+
devices?: DeviceInfo[];
|
|
54
|
+
} | {
|
|
55
|
+
ok: false;
|
|
56
|
+
error: string;
|
|
57
|
+
instructs: boolean;
|
|
58
|
+
devices: DeviceInfo[];
|
|
59
|
+
};
|
|
41
60
|
export interface DeviceTransport {
|
|
42
61
|
/**
|
|
43
62
|
* Human-readable platform name (e.g. "android", "ios").
|
|
@@ -251,15 +270,17 @@ export interface DeviceTransport {
|
|
|
251
270
|
* session's prior device: a switch invalidates device-scoped session state, and the
|
|
252
271
|
* orchestrator owns the reset.
|
|
253
272
|
*/
|
|
254
|
-
selectDevice?(serial: string | null):
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
273
|
+
selectDevice?(serial: string | null): DevicePick;
|
|
274
|
+
/**
|
|
275
|
+
* selectDevice's answer WITHOUT the pin: the same choice and the same errors, from the same
|
|
276
|
+
* code, so the two cannot disagree about which device wins. Records no new selection, drops no
|
|
277
|
+
* env pin, invalidates no forward. The listing itself still runs, and a pin whose device has
|
|
278
|
+
* vanished is reconciled away exactly as any listing reconciles it, so getSelectedDevice() can
|
|
279
|
+
* go from a serial to null across this call; it can never go to a NEW serial. For a caller that
|
|
280
|
+
* must decide whether to proceed at all before it touches anything, such as an unattended
|
|
281
|
+
* re-arm that refuses to adopt different hardware. Required wherever selectDevice is.
|
|
282
|
+
*/
|
|
283
|
+
resolveDevice?(serial: string | null): DevicePick;
|
|
263
284
|
/**
|
|
264
285
|
* The device pinned by the last successful selectDevice, or null when none is pinned.
|
|
265
286
|
* The enable body and the web /health response surface this so a user can see which
|
|
@@ -273,16 +294,7 @@ export interface DeviceTransport {
|
|
|
273
294
|
* Async variant of selectDevice for non-blocking boot/enable flows. Optional; platforms
|
|
274
295
|
* without an async device-listing path may omit it (the dashboard guards on presence).
|
|
275
296
|
*/
|
|
276
|
-
selectDeviceAsync?(serial: string | null): Promise<
|
|
277
|
-
ok: true;
|
|
278
|
-
serial: string | null;
|
|
279
|
-
switched?: boolean;
|
|
280
|
-
devices: DeviceInfo[];
|
|
281
|
-
} | {
|
|
282
|
-
ok: false;
|
|
283
|
-
error: string;
|
|
284
|
-
devices: DeviceInfo[];
|
|
285
|
-
}>;
|
|
297
|
+
selectDeviceAsync?(serial: string | null): Promise<DevicePick>;
|
|
286
298
|
/**
|
|
287
299
|
* Async variant of reassertForward for non-blocking boot/enable flows. Optional.
|
|
288
300
|
*/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire vocabulary shared by the dashboard server and its browser client. Types only, no runtime
|
|
3
|
+
* code and no imports, so both tsconfigs can `import type` it and the browser bundle is unchanged.
|
|
4
|
+
* docs/wire-contract.md is the prose half; this file is the machine-readable one.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A refusal marker on a failed /enable reply: the route will answer every later UNATTENDED
|
|
8
|
+
* attempt the same way, so the client's automation stops and hands the next press to the user.
|
|
9
|
+
* - self_arm_blocked: this process may not arm the device on its own (agent-spawned, or
|
|
10
|
+
* SLACK_RADAR_NO_ARM).
|
|
11
|
+
* - device_changed: the attached hardware differs from what this process last armed; adopting
|
|
12
|
+
* it is a human decision.
|
|
13
|
+
*/
|
|
14
|
+
export type EnableRefusal = "self_arm_blocked" | "device_changed";
|
|
15
|
+
/**
|
|
16
|
+
* The stream proxy's CURRENT diagnosis of an outage, stamped on `_status` frames. Not a log of
|
|
17
|
+
* what was diagnosed: a later frame's reason replaces an earlier one.
|
|
18
|
+
* - no_session: the device-side radar session has ended (socket absent); only a re-enable fixes
|
|
19
|
+
* this, so a client may act on it.
|
|
20
|
+
* - undiagnosed: an earlier diagnosis no longer holds (a later probe did not find the session
|
|
21
|
+
* absent). It is not a diagnosis and carries no cause; a client drops whatever it latched
|
|
22
|
+
* from the earlier reason. A frame with NO reason says nothing about the diagnosis.
|
|
23
|
+
*/
|
|
24
|
+
export type StatusReason = "no_session" | "undiagnosed";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire vocabulary shared by the dashboard server and its browser client. Types only, no runtime
|
|
3
|
+
* code and no imports, so both tsconfigs can `import type` it and the browser bundle is unchanged.
|
|
4
|
+
* docs/wire-contract.md is the prose half; this file is the machine-readable one.
|
|
5
|
+
*/
|
|
6
|
+
export {};
|
package/dist/web/bin.js
CHANGED
|
@@ -3,7 +3,7 @@ import { execSync } from "child_process";
|
|
|
3
3
|
import { realpathSync } from "fs";
|
|
4
4
|
import http from "http";
|
|
5
5
|
import { fileURLToPath } from "url";
|
|
6
|
-
import { armOnBoot, cleanupOnBind, createServer, seedInitialSpec, shutdownDashboard, startAutoCloseSweep, WEB_PORT, } from "./server.js";
|
|
6
|
+
import { armOnBoot, cleanupOnBind, createServer, registerScreenCleanupOnBind, seedInitialSpec, shutdownDashboard, startAutoCloseSweep, WEB_PORT, } from "./server.js";
|
|
7
7
|
import { RADAR_VERSION } from "../shared/constants.js";
|
|
8
8
|
/**
|
|
9
9
|
* One loopback GET against the dashboard's own port, used by the adopt path. Resolves with the
|
|
@@ -144,6 +144,7 @@ export function startWebServer() {
|
|
|
144
144
|
// so adopting it leaves its view and open DB-browser tab intact.
|
|
145
145
|
seedInitialSpec();
|
|
146
146
|
cleanupOnBind();
|
|
147
|
+
registerScreenCleanupOnBind();
|
|
147
148
|
// Arm the auto-close sweep only now that THIS process owns the port. Doing it post-bind (not
|
|
148
149
|
// in createServer) keeps importing the module — or a second launcher that loses the bind —
|
|
149
150
|
// from arming a timer that could process.exit. The interval is unref'd inside.
|
|
@@ -165,14 +166,17 @@ export function startWebServer() {
|
|
|
165
166
|
});
|
|
166
167
|
// The /shutdown route and the auto-close sweep both funnel through shutdownDashboard, so the
|
|
167
168
|
// server.close + timeout-fallback exit -- and the finalize-a-live-recording safety step --
|
|
168
|
-
// cannot drift between THOSE two paths. Ctrl-C / SIGTERM do
|
|
169
|
-
//
|
|
170
|
-
//
|
|
171
|
-
//
|
|
172
|
-
//
|
|
173
|
-
//
|
|
174
|
-
//
|
|
175
|
-
//
|
|
169
|
+
// cannot drift between THOSE two paths. Ctrl-C / SIGTERM mostly do not get that far, because
|
|
170
|
+
// Node runs signal listeners in registration order and two other modules register first:
|
|
171
|
+
// log-session's cleanup (from server.js module load, Android only) and, on the platforms without
|
|
172
|
+
// it, this handler ahead of the platform screen controller's own (which now registers post-bind, from
|
|
173
|
+
// registerScreenCleanupOnBind). Both of those call process.exit() synchronously, so on Android
|
|
174
|
+
// the logcat handler ends the process before this runs at all, and on iOS this one starts and is
|
|
175
|
+
// then cut short by the iOS controller's exit. Either way a live recording is torn down fire-and-forget
|
|
176
|
+
// rather than finalized. Pre-existing gap, not introduced here; closing it means restructuring
|
|
177
|
+
// signal handling across three modules, which is out of scope for a change about reap placement.
|
|
178
|
+
// Registering below still costs nothing and is the load-bearing path IF those handlers ever stop
|
|
179
|
+
// exiting synchronously.
|
|
176
180
|
const shutdown = () => void shutdownDashboard(server);
|
|
177
181
|
process.on("SIGINT", shutdown);
|
|
178
182
|
process.on("SIGTERM", shutdown);
|
|
@@ -449,16 +449,36 @@ let app = ReloadingApplication.shared
|
|
|
449
449
|
// bare binary is .prohibited, which would show no dock icon at all.
|
|
450
450
|
app.setActivationPolicy(.regular)
|
|
451
451
|
|
|
452
|
-
// A bare binary like this one has no storyboard, so nothing builds the
|
|
453
|
-
//
|
|
454
|
-
//
|
|
455
|
-
//
|
|
452
|
+
// A bare binary like this one has no storyboard, so nothing builds the menus a normal app gets
|
|
453
|
+
// for free, and a key equivalent with no menu item to route to silently does nothing. Cmd+Q had no
|
|
454
|
+
// "Quit" item, so the only way to close was the window's own red button. Cmd+C, Cmd+V, Cmd+X,
|
|
455
|
+
// Cmd+A and Cmd+Z had no Edit items, so copy and paste in the dashboard only worked from the
|
|
456
|
+
// right-click menu: WebKit's context menu dispatches its own actions, but the keyboard shortcuts
|
|
457
|
+
// go through the menu bar. The Edit items carry the standard responder-chain selectors with no
|
|
458
|
+
// target, which is how every AppKit app wires them; the focused web editor (the SQL box, a filter
|
|
459
|
+
// field, a text selection) is the responder that handles them, exactly as it does for the context
|
|
460
|
+
// menu. Menu titles are what the keyboard needs, not decoration: without a menu bar of its own
|
|
461
|
+
// this window still gets the standard behaviour these titles name.
|
|
456
462
|
let mainMenu = NSMenu()
|
|
457
463
|
let appMenuItem = NSMenuItem()
|
|
458
464
|
mainMenu.addItem(appMenuItem)
|
|
459
465
|
let appMenu = NSMenu()
|
|
460
466
|
appMenu.addItem(NSMenuItem(title: "Quit Slack Radar", action: #selector(NSApplication.terminate(_:)), keyEquivalent: "q"))
|
|
461
467
|
appMenuItem.submenu = appMenu
|
|
468
|
+
let editMenuItem = NSMenuItem()
|
|
469
|
+
mainMenu.addItem(editMenuItem)
|
|
470
|
+
let editMenu = NSMenu(title: "Edit")
|
|
471
|
+
// Selector(("undo:")) rather than #selector: undo/redo are responder-chain actions with no single
|
|
472
|
+
// declaring class to name, and the string form is the documented way to reference them.
|
|
473
|
+
editMenu.addItem(NSMenuItem(title: "Undo", action: Selector(("undo:")), keyEquivalent: "z"))
|
|
474
|
+
// An uppercase key equivalent means Shift is part of the shortcut: Shift+Cmd+Z, the standard Redo.
|
|
475
|
+
editMenu.addItem(NSMenuItem(title: "Redo", action: Selector(("redo:")), keyEquivalent: "Z"))
|
|
476
|
+
editMenu.addItem(NSMenuItem.separator())
|
|
477
|
+
editMenu.addItem(NSMenuItem(title: "Cut", action: #selector(NSText.cut(_:)), keyEquivalent: "x"))
|
|
478
|
+
editMenu.addItem(NSMenuItem(title: "Copy", action: #selector(NSText.copy(_:)), keyEquivalent: "c"))
|
|
479
|
+
editMenu.addItem(NSMenuItem(title: "Paste", action: #selector(NSText.paste(_:)), keyEquivalent: "v"))
|
|
480
|
+
editMenu.addItem(NSMenuItem(title: "Select All", action: #selector(NSText.selectAll(_:)), keyEquivalent: "a"))
|
|
481
|
+
editMenuItem.submenu = editMenu
|
|
462
482
|
app.mainMenu = mainMenu
|
|
463
483
|
|
|
464
484
|
let delegate = AppDelegate()
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
--accent:#0e9f6e; --accent-bg:#d6f3e6; --accent-text:#0a7d56;
|
|
36
36
|
--blue:#1d6fd0; --blue-2:#2f6bbf; --purple:#7a3fd0;
|
|
37
37
|
--warn:#b06c00; --warn-2:#8a5a00; --error:#d83a30; --error-2:#e0473d;
|
|
38
|
+
/* Amber for small semibold TEXT on the light page (the head, tail and reason spans, the Reconnect label): #b06c00 measures 3.89:1 against --bg and 4.21:1 on --surface, under WCAG AA's 4.5:1 for text that size; #8a5a00 measures 5.47:1 and 5.93:1. Same value as --warn-2 on purpose. Borders keep --warn. */
|
|
39
|
+
--warn-text:#8a5a00;
|
|
38
40
|
--hover:#eaf1f8; --sel:#d4e6f7; --hover-soft:#eaf1f8; --sel-soft:#dbe9f7;
|
|
39
41
|
--shadow:rgba(20,40,70,.18); --overlay:rgba(20,30,45,.28);
|
|
40
42
|
--chip-net-bg:#dbeafe; --chip-rtm-bg:#ecddfb; --chip-clog-bg:#d6f3e6; --chip-trace-bg:#faedcf; --chip-log-bg:#e7ebf0; --chip-log-fg:#4a5666;
|
|
@@ -52,12 +54,25 @@
|
|
|
52
54
|
#app { height:100%; display:flex; flex-direction:column; min-height:0; }
|
|
53
55
|
h1 { font-size:13px; font-weight:600; color:var(--muted-2); margin:0 0 6px; letter-spacing:.04em; display:flex; align-items:center; gap:8px; flex-wrap:wrap; flex:0 0 auto; }
|
|
54
56
|
.conn { font-size:13px; font-weight:600; }
|
|
55
|
-
.conn.connected { color:var(--accent); } .conn.waiting { color:var(--warn); }
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
.conn.connected { color:var(--accent); } .conn.waiting { color:var(--warn-text, var(--warn)); }
|
|
58
|
+
/* The status row: the recovery tail plus the reason / pick-error spans, on a line of its own (rendered last in the h1 so it takes the line below the controls and never pushes them down; they may still wrap for width reasons of their own) that stays while the Reconnect button shows, and exactly one text line tall: the reason never wraps, it ellipsizes with the full wording on hover, so its members can mount and unmount without changing the header's height. The reason spans drop to regular weight so the seam between the automation's status and the server's reason is visible. */
|
|
59
|
+
/* min-width:0 on the row itself is load-bearing: as an h1 flex item its automatic minimum is its content-based minimum (min-content, which for these nowrap children is the full wording's width), and without it the row grows past the header and the reason is clipped at the window edge instead of ellipsizing. */
|
|
60
|
+
.statusrow { flex-basis:100%; min-width:0; display:flex; flex-wrap:nowrap; align-items:center; gap:8px; min-height:1.5em; }
|
|
61
|
+
.statusrow .conn { white-space:nowrap; }
|
|
62
|
+
.statusrow .conn[title] { cursor:help; }
|
|
63
|
+
.statusrow .reason { font-weight:400; flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:help; }
|
|
64
|
+
/* min-width holds the button's own width across its "Reconnect Radar" / "enabling…" relabel (the wider label measures ~150px; the headroom covers a wider fallback glyph). What keeps the button and the chip after it from shifting at an ATTEMPT boundary is the header's markup order: the changing recovery tail renders after them, on its own status row, and the conn span before them holds its text between the outage's two ends (a device-list change aside). */
|
|
65
|
+
.reconnect { background:var(--surface); border:1px solid var(--warn); color:var(--warn-text, var(--warn)); border-radius:8px; padding:4px 12px; min-width:160px; text-align:center; font:inherit; font-size:12px; font-weight:600; cursor:pointer; }
|
|
66
|
+
.reconnect:hover { border-color:var(--warn-2); } .reconnect:disabled { opacity:.75; cursor:default; }
|
|
58
67
|
.profilewrap { font-size:12px; color:var(--blue-2); } .profilewrap b { color:var(--text); }
|
|
59
68
|
.profilewrap select { background:var(--surface); border:1px solid var(--border-2); border-radius:6px; color:var(--text); padding:3px 6px; font:inherit; font-size:11px; margin-left:4px; cursor:pointer; }
|
|
60
69
|
h1 .version { margin-left:auto; font-size:11px; font-weight:400; color:var(--muted-2); letter-spacing:0; }
|
|
70
|
+
/* Blue, not amber: this is an onboarding suggestion, and amber is what a real fault uses. */
|
|
71
|
+
h1 .setuphint { font-size:11px; font-weight:400; color:var(--blue-2); letter-spacing:0; }
|
|
72
|
+
h1 .setuphint a { color:inherit; }
|
|
73
|
+
/* Sized like .chip .x rather than a bare glyph: dismissal has no undo, so it needs a real target. */
|
|
74
|
+
h1 .setuphint .hintdismiss { background:var(--surface); border:1px solid var(--border-2); border-radius:50%; color:inherit; cursor:pointer; font:inherit; line-height:1; width:16px; height:16px; padding:0; margin-left:6px; }
|
|
75
|
+
h1 .setuphint .hintdismiss:hover { border-color:var(--accent); color:var(--text); }
|
|
61
76
|
.themebtn, .screenbtn { background:var(--surface); border:1px solid var(--border-2); color:var(--muted-2); border-radius:8px; padding:5px 12px; font:inherit; font-size:12.5px; cursor:pointer; }
|
|
62
77
|
.themebtn:hover, .screenbtn:hover { border-color:var(--accent); color:var(--text); } .screenbtn.on { background:var(--accent-bg); border-color:var(--accent); color:var(--accent-text); }
|
|
63
78
|
.killbtn.armed { border-color:var(--error); color:var(--error); } .killbtn.armed:hover { border-color:var(--error-2); color:var(--error-2); }
|
|
@@ -133,6 +148,13 @@
|
|
|
133
148
|
.ffilterwrap:focus-within { border-color:var(--accent); }
|
|
134
149
|
.ffilterwrap .ffilter { flex:1; min-width:80px; background:transparent; border:none; padding:3px 4px; font:inherit; font-size:12.5px; color:var(--text); }
|
|
135
150
|
.ffilterwrap .ffilter:focus { outline:none; }
|
|
151
|
+
/* The placeholder is the standing syntax reminder, so it needs real contrast: the browser
|
|
152
|
+
default grey lands near 2:1 on the light theme. --muted-2 clears 6:1 on both themes. */
|
|
153
|
+
.ffilterwrap .ffilter::placeholder { color:var(--muted-2); opacity:1; }
|
|
154
|
+
/* With pills present the hint is 27 monospace characters; below that width it hard-clips
|
|
155
|
+
mid-word, so the input drops to its own row instead. Without :has() the input keeps its
|
|
156
|
+
80px minimum and the hint clips; cosmetic, and every browser the dashboard runs in has it. */
|
|
157
|
+
.ffilterwrap:has(.fpill) .ffilter { min-width:28ch; }
|
|
136
158
|
.feedbar input { background:var(--surface-2); border:1px solid var(--border-2); border-radius:8px; color:var(--text); padding:7px 10px; font:inherit; font-size:12.5px; }
|
|
137
159
|
.feedbar input:focus { outline:none; border-color:var(--accent); }
|
|
138
160
|
.ffilterclear { position:absolute; right:8px; top:9px; cursor:pointer; color:var(--muted-2); background:var(--surface); border-radius:50%; width:16px; height:16px; line-height:14px; text-align:center; font-size:10px; }
|
|
@@ -156,6 +178,14 @@
|
|
|
156
178
|
.fpill-neg { background:var(--lvl-err-bg); border-color:var(--error-2); color:var(--error-2); }
|
|
157
179
|
.fpill-neg .fpill-sign { color:var(--error-2); }
|
|
158
180
|
.fpill-re, .fpill-quote { font-family:ui-monospace,Menlo,Consolas,monospace; }
|
|
181
|
+
/* A phrase pill is tinted and carries curly marks outside the ellipsizing body, so it reads as
|
|
182
|
+
a phrase even when a long pasted line truncates. */
|
|
183
|
+
.fpill-quote { background:var(--surface-3); }
|
|
184
|
+
.fpill-q { color:var(--muted-2); }
|
|
185
|
+
/* A negated phrase pill (-"log", the documented way to exclude by text on Live) carries both
|
|
186
|
+
classes at equal specificity; the compound keeps the negation red on the background, same
|
|
187
|
+
reasoning as the negated kind pills below. */
|
|
188
|
+
.fpill-neg.fpill-quote { background:var(--lvl-err-bg); }
|
|
159
189
|
.fpill-bad { background:var(--lvl-warn-bg); border-color:var(--warn); color:var(--warn-2); }
|
|
160
190
|
/* Kind-name pills on the Live view. Match the row's type chip color so "clog" reads the
|
|
161
191
|
same whether you see it in the pill or in the row's tchip. */
|
|
@@ -433,6 +463,11 @@
|
|
|
433
463
|
#screenpanel .scbtn { background:var(--surface); border:1px solid var(--border-2); color:var(--muted-2); border-radius:6px; padding:3px 9px; font:inherit; font-size:11.5px; cursor:pointer; } #screenpanel .scbtn:hover:not(:disabled) { border-color:var(--accent); color:var(--text); } #screenpanel .scbtn:disabled { opacity:0.4; cursor:not-allowed; } #screenpanel .scbtn.rec { color:var(--error); border-color:var(--error); }
|
|
434
464
|
#screenimg { width:100%; border:1px solid var(--border); border-radius:8px; background:#000; min-height:120px; transition:opacity 0.3s; } #screenimg.stale { opacity:0.5; }
|
|
435
465
|
#schint { font-size:11.5px; color:var(--muted); margin-bottom:8px; line-height:1.5; }
|
|
466
|
+
/* The save line sits under the status line and outlives it, so it has to read as the standing
|
|
467
|
+
answer rather than another transient note. Full text colour is what carries that at a glance:
|
|
468
|
+
persistence alone only reads over time, and the reveal underline is dock-app only, so in a
|
|
469
|
+
plain browser two muted lines would look like two transient notes. */
|
|
470
|
+
#scsave { font-size:11.5px; color:var(--text); margin:-4px 0 8px; line-height:1.5; }
|
|
436
471
|
/* Floating save confirmation. Lives outside the docked side panel on purpose: the panel is
|
|
437
472
|
only 340px wide and clipped to the right edge, and closing it (which auto-saves a running
|
|
438
473
|
recording) unmounts it entirely, so anything panel-local can be invisible exactly when it
|
|
@@ -447,7 +482,7 @@
|
|
|
447
482
|
#radartoast.on.clickable { pointer-events:auto; cursor:pointer; }
|
|
448
483
|
.scconsent { background:var(--surface); border:1px solid var(--border-3); border-radius:8px; padding:12px; font-size:12px; color:var(--text-2); line-height:1.55; } .scconsent b { color:var(--warn-2); }
|
|
449
484
|
.scconsent .scaccept { background:var(--accent-bg); border:1px solid var(--accent); color:var(--accent-text); border-radius:6px; padding:6px 14px; font:inherit; font-size:12px; cursor:pointer; margin-top:10px; display:block; } .scconsent .scaccept:hover { filter:brightness(1.1); }
|
|
450
|
-
.scinstall { background:var(--surface-2); border:1px solid var(--border); border-radius:6px; padding:8px 10px; margin-top:8px; font-size:11.5px; color:var(--text-2); } .scinstall code { color:var(--copybtn-fg); }
|
|
485
|
+
.scinstall, .scdetect { background:var(--surface-2); border:1px solid var(--border); border-radius:6px; padding:8px 10px; margin-top:8px; font-size:11.5px; color:var(--text-2); } .scinstall code { color:var(--copybtn-fg); }
|
|
451
486
|
.scinstall .sccopy { background:var(--copybtn-bg); border:1px solid var(--copybtn-border); color:var(--copybtn-fg); border-radius:5px; padding:2px 8px; font:inherit; font-size:11px; cursor:pointer; margin-left:6px; }
|
|
452
487
|
</style>
|
|
453
488
|
<!-- No-build Preact: the import map resolves the bare `preact` + `preact/hooks` + `htm`
|