Compare commits

..
8 changed files with 15 additions and 122 deletions

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ export function VaultPageHeader({
}
interface VaultHeaderSearchProps
extends Omit<React.ComponentPropsWithRef<typeof Input>, "className"> {
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "className"> {
className?: string;
inputClassName?: string;
rightAdornment?: React.ReactNode;
+4 -20
View File
@@ -738,7 +738,6 @@ export function VaultViewLayout({ ctx }: { ctx: VaultViewLayoutContext }) {
}
const keyListRef = React.useRef(keys);
keyListRef.current = keys;
const hostSearchInputRef = React.useRef<HTMLInputElement>(null);
const newHostActionsRef = React.useRef<HTMLDivElement>(null);
const sessionActionsRef = React.useRef<HTMLDivElement>(null);
const { handlePluginPreviewCommit, getPluginPreviewAnalysis } =
@@ -951,34 +950,19 @@ export function VaultViewLayout({ ctx }: { ctx: VaultViewLayoutContext }) {
dataSection="vault-hosts-header"
>
<VaultHeaderSearch
ref={hostSearchInputRef}
placeholder={t("vault.hosts.search.placeholder")}
className="flex-1"
inputClassName={cn(
search && "pr-12",
isSearchQuickConnect &&
"pr-16 border-primary/50 ring-1 ring-primary/20",
"border-primary/50 ring-1 ring-primary/20",
)}
value={search}
onChange={(e) => setSearch(e.target.value)}
onKeyDown={handleSearchKeyDown}
rightAdornment={
search && (
<div className="flex items-center gap-1">
{isSearchQuickConnect && <Zap size={14} className="text-primary" />}
<button
type="button"
aria-label={t("common.clear")}
className="grid size-6 cursor-pointer place-items-center rounded text-muted-foreground hover:bg-foreground/10 hover:text-foreground"
onClick={() => {
setSearch("");
hostSearchInputRef.current?.focus();
}}
>
<X size={14} />
</button>
</div>
)
isSearchQuickConnect ? (
<Zap size={14} className="text-primary" />
) : null
}
/>
<Button
+2 -45
View File
@@ -69,19 +69,8 @@ module.exports = {
'dist/**/*',
'electron/**/*',
// The Windows Hello helper is shipped once through win.extraResources.
// Exclude both its C++ source and local per-arch build output from app.asar.
// Exclude local per-arch build output from app.asar on every platform.
'!electron/bridges/windowsHelloHelper/build/**/*',
'!electron/bridges/windowsHelloHelper/NetcattyWindowsHello.cpp',
// Packaged builds always run `prebuild` -> `build:preload`, producing
// `electron/preload.bundle.cjs` (preferred by preloadPath.cjs). Keep
// the unbundled preload sources out of app.asar.
'!electron/preload.cjs',
'!electron/preload/**/*',
// Build-time macOS entitlements plist, dev launcher, and internal docs
// are not runtime app files.
'!electron/entitlements.mac.plist',
'!electron/launch.cjs',
'!electron/plugins/distribution/README.md',
// Test fixtures, test-only helpers, and dev/CI schema snapshots are not
// runtime resources. Keep them out of production ASARs (including plugin
// smoke fixtures so no example plugin can be mistaken for an installed package).
@@ -189,15 +178,6 @@ module.exports = {
// web-streams-polyfill is only a Node < 16.5 fallback inside fetch-blob;
// Netcatty requires Node >= 22 / Electron 42 with native Web Streams.
'!node_modules/web-streams-polyfill/**/*',
// tar-stream and events-universal declare bare-* packages only for the
// Holepunch/Bare runtime ("bare" import/export condition). Node/Electron
// always resolves default Node.js built-ins and never loads bare-* or
// their cross-platform iOS/Android/desktop .bare prebuilds.
'!node_modules/bare-fs/**/*',
'!node_modules/bare-url/**/*',
'!node_modules/bare-path/**/*',
'!node_modules/bare-events/**/*',
'!node_modules/bare-stream/**/*',
// Main process only CJS-requires css-tree (cjs/index.cjs) and mdn-data's
// css/{at-rules,properties,syntaxes}.json; skip browser/ESM/l10n/schema copies.
'!node_modules/css-tree/dist/**/*',
@@ -249,15 +229,6 @@ module.exports = {
// per-platform prebuilds); netcatty uses the user's copilot via cliPath,
// so it is excluded entirely.
'!**/@anthropic-ai/claude-agent-sdk-*/**/*',
// claudeDriver.cjs only imports the default "@anthropic-ai/claude-agent-sdk"
// entrypoint (sdk.mjs). Exclude unused sibling entrypoints and manifests
// while keeping sdk.mjs, LICENSE.md, and README.md.
'!node_modules/@anthropic-ai/claude-agent-sdk/assistant.mjs',
'!node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs',
'!node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js',
'!node_modules/@anthropic-ai/claude-agent-sdk/extractFromBunfs.js',
'!node_modules/@anthropic-ai/claude-agent-sdk/manifest.json',
'!node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json',
'!node_modules/@anthropic-ai/claude-code-*/**/*',
'!node_modules/@openai/codex-{darwin,linux,linuxmusl,win32}-*/**/*',
'!node_modules/@github/copilot-{darwin,linux,linuxmusl,win32}-*/**/*',
@@ -275,22 +246,8 @@ module.exports = {
'!node_modules/@cursor/sdk/dist/**/*.d.ts',
'!node_modules/@cursor/sdk/dist/**/*.d.ts.map',
// sqlite3 rebuilds a native module for Electron; its upstream source
// tarball, C++ sources, and install-only prebuild-install/tar helpers
// are not needed at runtime (sqlite3-binding.js only requires bindings).
// tarball is build-time payload only.
'!node_modules/sqlite3/deps/**/*',
'!node_modules/sqlite3/src/**/*',
'!node_modules/prebuild-install/**/*',
'!node_modules/tar/**/*',
// Native module C/C++ sources, build scripts, and node-pty's third_party
// ConPTY staging copies are build-time only; runtime loads compiled
// binaries from build/Release or prebuilds.
'!node_modules/node-pty/third_party/**/*',
'!node_modules/node-pty/deps/**/*',
'!node_modules/node-pty/src/**/*',
'!node_modules/node-pty/scripts/**/*',
'!node_modules/node-pty/node-addon-api/**/*',
'!node_modules/node-pty/typings/**/*',
'!node_modules/@serialport/bindings-cpp/src/**/*',
// Native compilation helpers are needed during install/rebuild only.
// Match nested copies too; keep the actual native loaders and binaries.
'!node_modules/**/node-gyp/**/*',
-4
View File
@@ -10,10 +10,6 @@ export default [
files: ["examples/plugins/starter-netcatty/panel.js"],
languageOptions: { globals: globals.browser },
},
{
files: ["plugins/*/scripts/**/*.{js,mjs,cjs}"],
languageOptions: { globals: globals.node },
},
// The recommended preset has no file scope of its own, so scope it off all of
// electron/ — that main-process tree is historically unlinted. The bridges
// get a focused rule set in the dedicated block at the end of this config;
@@ -336,8 +336,6 @@ void electron.app
console.error("MONITOR_ELECTRON_SMOKE_FAILED:", error);
try {
fs.rmSync(userData, { recursive: true, force: true });
} catch {
// Best-effort temp dir cleanup on failure.
}
} catch {}
electron.app.exit(1);
});
@@ -318,7 +318,6 @@ export function computeAlertBadge(
const count = Math.min(999, active.length);
const criticalCount = active.filter((a) => a.severity === 'critical').length;
const tone: 'warning' | 'danger' = criticalCount > 0 ? 'danger' : 'warning';
// eslint-disable-next-line no-control-regex
const topMsg = (active[0]?.message ?? '').replace(/[\r\n\t\x00-\x1f\x7f]/g, ' ').trim();
const summary =
@@ -72,11 +72,6 @@ export function OverviewTab({
return { min, avg, max };
}, [points]);
const diskLayout = useMemo(
() => buildMonitorDiskListLayout(stats, showSystemDisks, thresholds.diskWarning),
[stats, showSystemDisks, thresholds.diskWarning],
);
if (isProbe) {
const probe = state?.probe;
return (
@@ -181,6 +176,11 @@ export function OverviewTab({
? Math.min(100, (stats.fdUsed / stats.fdMax) * 100)
: null;
const diskLayout = useMemo(
() => buildMonitorDiskListLayout(stats, showSystemDisks, thresholds.diskWarning),
[stats, showSystemDisks, thresholds.diskWarning],
);
const hasCpuBreakdown = points.some((p) => p.cpuUser != null || p.cpuSystem != null);
return (
+2 -43
View File
@@ -529,31 +529,8 @@ test("node_modules packaging exclusions prune unused payloads while preserving l
"node_modules/foo/CHANGELOG.md",
"node_modules/foo/HISTORY.md",
"node_modules/@anthropic-ai/sdk/README.md",
"node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare",
"node_modules/bare-fs/index.js",
"node_modules/bare-path/index.js",
"node_modules/bare-events/index.js",
"node_modules/bare-stream/index.js",
"node_modules/@anthropic-ai/claude-agent-sdk/assistant.mjs",
"node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs",
"node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js",
"node_modules/@anthropic-ai/claude-agent-sdk/extractFromBunfs.js",
"node_modules/@anthropic-ai/claude-agent-sdk/manifest.json",
"node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json",
"node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe",
"node_modules/node-pty/deps/winpty/src/include/winpty.h",
"node_modules/node-pty/src/unix/pty.cc",
"node_modules/node-pty/scripts/post-install.js",
"node_modules/node-pty/node-addon-api/napi.h",
"node_modules/node-pty/typings/node-pty.d.ts",
"node_modules/@serialport/bindings-cpp/src/serialport.cpp",
"node_modules/sqlite3/src/database.cc",
"node_modules/prebuild-install/index.js",
"node_modules/tar/index.js",
]) {
for (const [label, filter] of [["mac", nmMac], ["win", nmWin], ["linux", nmLinux]]) {
assert.equal(filter(path.join(root, dropped), stat), false, `expected excluded (${label}): ${dropped}`);
}
assert.equal(nmMac(path.join(root, dropped), stat), false, `expected excluded: ${dropped}`);
}
for (const kept of [
@@ -571,20 +548,9 @@ test("node_modules packaging exclusions prune unused payloads while preserving l
"node_modules/foo/NOTICE.md",
// @anthropic-ai/claude-agent-sdk declares "license": "SEE LICENSE IN README.md"
"node_modules/@anthropic-ai/claude-agent-sdk/README.md",
"node_modules/@anthropic-ai/claude-agent-sdk/LICENSE.md",
"node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs",
"node_modules/tar-stream/index.js",
"node_modules/node-pty/lib/index.js",
"node_modules/node-pty/build/Release/pty.node",
"node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe",
"node_modules/@serialport/bindings-cpp/dist/index.js",
"node_modules/@serialport/bindings-cpp/build/Release/bindings.node",
"node_modules/sqlite3/lib/sqlite3.js",
"node_modules/sqlite3/build/Release/node_sqlite3.node",
]) {
for (const [label, filter] of [["mac", nmMac], ["win", nmWin], ["linux", nmLinux]]) {
assert.equal(filter(path.join(root, kept), stat), true, `expected preserved (${label}): ${kept}`);
}
assert.equal(nmMac(path.join(root, kept), stat), true, `expected preserved: ${kept}`);
}
// Platform-scoped @vscode/windows-process-tree exclusion
@@ -625,12 +591,6 @@ test("app file exclusions prune dev schemas, test helpers/fixtures, svg sources,
"electron/bridges/cliDiscoveryTestIsolation.cjs",
"electron/bridges/sshBridge/serverStatsTestHelpers.cjs",
"electron/bridges/terminalBridge.moshConpty.integration.cjs",
"electron/bridges/windowsHelloHelper/NetcattyWindowsHello.cpp",
"electron/preload.cjs",
"electron/preload/api.cjs",
"electron/entitlements.mac.plist",
"electron/launch.cjs",
"electron/plugins/distribution/README.md",
"dist/icon.svg",
"dist/tray-iconTemplate.svg",
]) {
@@ -639,7 +599,6 @@ test("app file exclusions prune dev schemas, test helpers/fixtures, svg sources,
assert.equal(macFilter(path.join(root, "dist/index.html"), stat), true);
assert.equal(macFilter(path.join(root, "electron/main.cjs"), stat), true);
assert.equal(macFilter(path.join(root, "electron/preload.bundle.cjs"), stat), true);
const macosVariantIcon = path.join(root, "dist/icons/variants/macos/icon.png");
assert.equal(macFilter(macosVariantIcon, stat), true);