Commit Graph
6640 Commits
Author SHA1 Message Date
陈大猫 8c66f8786d refactor(electron): unify interactive SSH IPC prompt lifecycle into ipcPromptRegistry (#4395) 2026-11-25 22:03:09 +08:00
陈大猫 29be836550 perf(bundle): code-split re2js, css-tree/remote-dom, and Monaco out of startup index chunk (#4391) 2026-11-25 22:03:02 +08:00
陈大猫 703148c84f perf(terminal): eliminate O(N^2) output history shift, idle timestamp sorting, and redundant keyword regex scans (#4382)
* perf(terminal): eliminate O(N^2) output history shift, idle timestamp sorting, and redundant keyword regex scans

* fix(terminal): invalidate timestamp gutter viewport key on parsed writes
2026-11-25 22:02:55 +08:00
陈大猫 5b33d410f9 perf(ai): batch reasoning-delta and raw reasoning stream updates via requestAnimationFrame (#4378) 2026-11-25 22:02:49 +08:00
陈大猫 c27a40e5f0 perf(ui): eliminate HostTreeSidebar 60fps ResizeObserver layout thrash and stop hidden activeHostId rerenders (#4375) 2026-11-25 22:02:42 +08:00
陈大猫 30f9a91576 perf(renderer): pause background polling timers when hidden or idle and remove dead CloudSync auto-sync timer (#4372) 2026-11-25 22:02:35 +08:00
陈大猫 6461acb575 perf(terminal): gate redundant WebGL atlas wipes and recovery refits on window focus (#4371) 2026-11-25 22:02:27 +08:00
陈大猫 2347f33bc8 perf(electron): fix trayPanelRefreshTimer leak and make sessionLogStreamManager flush timer on-demand (#4370) 2026-11-25 22:02:21 +08:00
陈大猫 22e6b02ce2 perf(assets): convert Nerd Font symbols to WOFF2 and drop unused @fontsource .woff fallbacks (#4387) 2026-11-25 21:56:35 +08:00
陈大猫 58bc929a17 refactor(ui): extract shared VaultHostCard and InlineRenameInput components (#4393) 2026-11-25 21:56:29 +08:00
陈大猫 7e94183b89 fix(sftp): prevent drag listener/body-style/selection leaks and avoid full transfer list cloning on progress (#4383) 2026-11-25 21:53:05 +08:00
陈大猫 b8d05b3074 test: remove 2 verbatim duplicate test cases and rename env-gated SCP real tests to *.live.test.cjs (#4386) 2026-11-25 21:40:20 +08:00
陈大猫 e99ab5a8eb build(monaco): skip unused Monaco NLS locale bundles in copy-monaco.cjs (#4385) 2026-11-25 21:40:13 +08:00
陈大猫 9a2d6ef7bf test: remove 2 dead test helpers and 3 obsolete/superseded plugin UI PoC tests (#4384) 2026-11-25 21:40:06 +08:00
陈大猫 27a6f2e7a6 test: remove 3 legacy barrel test files duplicating 366 CI test executions (#4381) 2026-11-25 21:39:59 +08:00
陈大猫 c52ca5f730 perf(plugins): short-circuit PluginTerminalProviderRegistry cloning and IPC when plugin host is disabled (#4380) 2026-11-25 21:39:51 +08:00
陈大猫 0aeb1df039 fix(editor): replace leaking Monaco editor.addCommand with disposable editor.addAction (#4379) 2026-11-25 21:39:44 +08:00
陈大猫 b8f3577cd8 perf(ai): bound TraceStore/SessionStateStore with LRU ring buffer and clean consumed TwoPassCompactionCache entries (#4377) 2026-11-25 21:39:38 +08:00
陈大猫 412f6c4ec6 perf(ai): defer backup JSON.stringify in writeSessionsForStorage and fix mirror no-op guard (#4376) 2026-11-25 21:39:31 +08:00
陈大猫 32b1b633db fix(electron): prevent session log stream and SSH decoder leaks on explicit session close (#4374) 2026-11-25 21:39:24 +08:00
陈大猫 e2b0f83ea9 fix(ai): detach global window listeners and mark completion when aiMarkdownWarmup fires (#4373) 2026-11-25 21:39:17 +08:00
陈大猫 4d7906a710 perf(ui): coalesce AsidePanel and VaultViewLayout resize with rAF and avoid split-panel width reflow (#4369) 2026-11-25 21:39:09 +08:00
陈大猫 9c14e3934f perf(plugins): prevent plugin contribution reload and DOM observer teardown on tab switch (#4368) 2026-11-25 21:39:02 +08:00
陈大猫 59db998ec4 perf(ui): narrow unscoped useActiveTabId subscriptions on tab switch (#4367) 2026-11-25 21:38:54 +08:00
陈大猫 78c7d30648 perf(sftp): eliminate inline toggle callback and narrow SFTP pane active/focus subscriptions (#4365) 2026-11-25 21:38:47 +08:00
陈大猫 4c3f0ce80b perf(terminal): decouple plugin sidebar subscriptions and gate closed side-panel reflows (#4364) 2026-11-25 21:38:40 +08:00
陈大猫 fd732dff9c perf(terminal): stabilize theme panel callbacks and memoize SidePanelBrowserSlot (#4362) 2026-11-25 21:38:33 +08:00
陈大猫 93bec7497c fix(ui): unify custom tooltips and keep Custom CSS docs in help modal (#4360) 2026-11-25 20:08:02 +08:00
陈大猫 fa9b28adde fix(terminal): handle Ctrl+Insert copy without clearing selection or leaking Win32 input (#4357)
* fix(terminal): handle Ctrl+Insert copy without clearing selection or leaking Win32 input (#4351)

* fix(terminal): suppress paired Ctrl+Insert keyup in native Kitty mode and set Windows UA in test

* test(terminal): override navigator.userAgent via Object.defineProperty in JSDOM fixture
2026-11-25 19:35:45 +08:00
陈大猫 0eefb9ea46 fix(mcp): recognize Powerline U+E0B0-U+E0B7 idle prompt endings (#4359) 2026-11-25 19:18:40 +08:00
陈大猫 ed90d61014 fix(terminal): cap ligature joiner span to avoid WebGL 16384px overflow atlas spike (#4063) (#4358) 2026-11-25 19:02:59 +08:00
GOUKI9999 d066f1f082 fix(tabs): honor disabled double-click on workspace tabs (#4355) 2026-11-25 17:34:32 +08:00
陈大猫 b64c36fd40 feat(ui): inline compose directory picker and streamline AI session history UX (#4356)
* feat(ui): inline compose directory picker and streamline AI session history UX

* fix(ai): exclude workspace members and hidden terminals from active-elsewhere jump targets

* fix(ai): clear non-AI magnification overlay when jumping to an active chat tab
2026-11-25 17:29:32 +08:00
Joseph Hau 403c690061 feat(terminal): support Directory Picker in Windows CMD (#4343)
* feat(terminal): support Directory Picker in Windows CMD

* fix: show CMD-specific directory integration status
2026-11-25 15:52:30 +08:00
Radwan Selo a4805b3e3d feat(capabilities): add terminal_execute_bulk to run one command on many sessions (#4342)
* feat(capabilities): add terminal_execute_bulk to run one command on many sessions

Add a terminal_execute_bulk MCP tool that runs the same short command on
2-20 open terminal sessions and groups identical results.

- All-or-nothing preflight: scope, closing, busy, connected, transport
  and the per-shell command safety policy are checked for every target
  before anything is sent. Any bad target cancels the whole call and all
  bad targets are reported at once.
- One approval listing every host. Remembered grants and external-client
  session approval never satisfy it (policy.requiresFreshApproval), and a
  pending fan-out is not swept up by another request's session approval.
- Targets are claimed before the prompt and re-checked after it; all
  targets then start in the same synchronous turn under a single per-chat
  exec lock, each with its own wall-clock timeout.
- Results are grouped only when status, exit code, stdout, stderr and
  error are identical on the full output, then truncated (tailLines and
  size caps). JSON output matches the other tools.
- Loaded on demand through the terminal_bulk toolset.

* fix(capabilities): harden terminal_execute_bulk after review

- Only trust the metadata "connected" flag for worker-hosted sessions; a
  live main-process session with a stale snapshot is no longer refused.
- Keep targets protected from idle auto-close from the claim through the
  approval wait to completion, and release on every path.
- Classify blocklist refusals before status keywords so a pattern such as
  "cancel-job" is reported as not_sent, not cancelled.
- List the terminal_bulk toolset in the MCP server instructions and the
  netcatty-mcp skill so clients can discover it.
- Test that the bulk RPC gets the same timeout budget as terminal_execute.

* fix(capabilities): validate worker sessions up front and cancel them at the deadline

An independent review found that the default (terminal worker) sessions
could receive a partial send, and that the backstop deadline never
reached the worker.

- Add a no-send precheck mode to the worker exec handler. The bulk
  preflight now runs every deterministic check for worker sessions
  (transport, shell kind, shell-specific safety patterns, unsupported
  local shell, busy job) so a refusal cancels the whole call before any
  host receives the command.
- Add netcatty:ai:exec:cancel and call it at the deadline, so a stuck
  worker command is cancelled before the per-chat lock is released
  instead of overlapping the next command. Background jobs are left
  alone.
- Make the deadline grace 3s and give the bulk RPC extra timeout budget
  for its preflight, so the backstop fires before the client gives up.
- Do not group hosts whose exec layer already dropped different amounts
  of output, and share one size budget between stdout and stderr.
- Restrict the capability to the sidebar agent; the global agent runs
  delegated, which bulk refuses.
- Document that live terminal readiness is a send-time state.

* test(capabilities): cover terminal_execute_bulk over the real MCP wire and close mutation gaps

- Drive the tool through the real stdio MCP server: hidden until the
  terminal_bulk toolset is loaded, schema shape, JSON result, Error text
  with isError, schema rejection of a native array, and privacy masking
  of the grouped result with token restoration in the command.
- Mutation testing (18 deliberate breakages of the safety-critical
  lines) left three survivors; add tests that kill two of them: hosts
  differing only in exit code, status, stderr or error never share a
  group, and a session-scoped answer to a fan-out approval does not
  approve later writes from that client.
- Assert that delegated agents cannot reach the fan-out at the gate.

* fix(capabilities): address review findings on terminal_execute_bulk

- Keep the tool MCP-only for now. The in-app agent has no completed-write
  replay for it after a context-compaction retry, and its SDK approval
  gate would stack a second prompt on the bridge's fresh approval. Both
  can follow in a separate change.
- Re-run the transport preflight for every claimed target after the
  approval and before the synchronous start, so a worker session that
  changed while the user was deciding cancels the whole call instead of
  being refused after other hosts have started.
- Never group hosts whose exec layer already dropped part of the output:
  equal retained tails do not prove equal full results.

* fix(capabilities): only report not_sent on explicit evidence and flag capped output

- Classify a host as not_sent only when the exec layer says so (a known
  pre-send code or refusal text). An error with no output and no exit
  code, such as a terminal worker exiting after it typed the command,
  is now reported as error, so a mutating command is never presented as
  safe to retry blindly. SHELL_NOT_READY and EXECUTION_NOT_AUTHORIZED
  are now recognised, so a call where every host refuses fails as
  not sent instead of returning ok.
- Have execViaRawPty and execViaChannel set outputTruncated when they
  stop collecting at their size cap, so hosts that differ only in the
  discarded output are never grouped.

* test(capabilities): run terminal_execute_bulk against the real worker exec handler

Wire the bridge to the production terminal-worker exec handler with fake
shells that speak the wrapper protocol, and cover the grouped result,
Stop while every host is running, and real per-host timeouts.

* fix(capabilities): do not probe hosts before the bulk approval

In confirm mode the preflight ran the shell-kind probe, which opens an
SSH exec channel and runs a remote command, before the approval prompt.
Denying the call (or another target failing) still executed something on
the host, and on an account with a forced command that could trigger it.

- The preflight before the prompt is now read-only: no channel is opened,
  and the safety check uses the shell kind only if it is already known,
  otherwise the shell-independent patterns.
- The full check, including the probe and the shell-aware patterns, runs
  right after approval and before any command is sent, so the call is
  still all-or-nothing. Without a prompt the full check runs first.
- The worker precheck honours the same distinction.

* fix(capabilities): recheck local guards before probing hosts after approval

After the approval the bulk call ran the probing transport pass first and
rechecked cancellation, scope and the privacy policy afterwards. A call
that was no longer authorized (Stop pressed, session out of scope,
privacy settings changed while the prompt was open) was rejected only
after the hosts had already been probed.

Run the local, read-only guards first, then the probing pass, then the
guards again because the pass awaits, and only then take the chat lock
and start. A refusal by the privacy hook now happens before the lock is
taken.

* fix(capabilities): re-read the permission mode and classify exec refusals precisely

- Re-evaluate the live permission mode with the other local guards, both
  before the probing pass and again before the start. Switching to
  observer while a prompt is open (or while hosts are being checked) now
  refuses the call, and a call that needed no approval is refused if the
  mode turns into confirm before it starts.
- Keep the code of an error the exec layer throws, so SHELL_PROMPT_PENDING
  (thrown before anything is written) is reported as not_sent and an
  all-refused call fails as not sent.
- Recognise the executors' real closed-stream messages ("Stream closed
  unexpectedly", "Serial port closed unexpectedly") as connection_lost.
2026-11-25 15:45:53 +08:00
陈大猫 5a1352aab0 feat(sftp): insert file path or cd into paired terminal from SFTP context menu (#4323)
* feat(sftp): insert file path or cd into paired terminal from SFTP context menu

* fix(sftp): guard terminal path insertion against unclosed quote contexts

* fix(sftp): reject trailing dollar fusion and after-cursor command text

* fix(terminal): detect standard root-directory shell prompts (user@host:/$) for SFTP path injection

* fix(sftp): reject arithmetic insertion contexts and continuation-prompt cd

* fix(terminal): ignore right-aligned prompt decorations in after-cursor readiness check

* fix(sftp): resolve remote shell dialect from prompt/OS and use portable Unix quoting

* fix(terminal): require unwritten xterm gap cells before ignoring right-prompt decorations
2026-11-25 12:02:41 +08:00
陈大猫 a9cf94aeba feat(sftp): add back and forward directory history navigation (#4324)
* feat(sftp): add back and forward directory history navigation

* fix(sftp): preserve pending nav history transition on mid-flight refresh
2026-11-25 11:26:13 +08:00
陈大猫 196132621c feat(ai): make tool call output truncation limit configurable in AI settings (#4328) 2026-11-25 11:25:00 +08:00
陈大猫 0098f2e670 feat(terminal): keep compose bar right-click isolated and allow reordering pinned snippets (#4327) 2026-11-25 11:22:00 +08:00
陈大猫 730c8cad59 feat(portforward): use capped exponential backoff instead of giving up after 15s (#4322) 2026-11-25 11:20:42 +08:00
陈大猫 d9cb9a8fbc feat(tabs): reopen recently closed terminal tabs and workspaces with Cmd/Ctrl+Shift+T (#4325)
* feat(tabs): reopen recently closed terminal tabs and workspaces with Cmd/Ctrl+Shift+T

* test(tabs): drain activeTabStore notification timer before closing jsdom

* fix(tabs): exclude ephemeral hosts from closed tab reopen history
2026-11-25 11:18:18 +08:00
陈大猫 bbbcf72b81 feat(tabs): focus adjacent terminal tab on close instead of jumping to Vaults or SFTP (#4320)
* feat(tabs): focus adjacent terminal tab on close instead of jumping to Vaults or SFTP

* test(tabs): reset activeTabStore before tearing down JSDOM globals
2026-11-25 10:48:00 +08:00
陈大猫 10ad09fe34 feat(sftp): skip auto-opening SFTP side panel for network devices (#4321) 2026-11-25 10:44:22 +08:00
陈大猫 040aec53b2 feat(ai): tint user message bubbles with theme accent for clearer turn separation (#4317)
* feat(ai): tint user message bubbles with theme accent for clearer turn separation

* fix(css): wrap global border-color reset in @layer base so user bubble border-primary utilities apply
2026-11-25 10:37:12 +08:00
陈大猫 2bf8611919 feat(local-terminal): support optional startup command on local terminal hosts (#4326)
* feat(local-terminal): support optional startup command on local terminal hosts

* fix(local-terminal): validate saved local launch target before overlaying startup command
2026-11-25 10:26:36 +08:00
陈大猫 1d53af5a51 feat(ui): improve selected protocol contrast in new connection form (#4319) 2026-11-25 10:07:40 +08:00
陈大猫 3c3319eead feat(i18n): default UI language to system locale on first launch (#4318) 2026-11-25 10:03:10 +08:00
陈大猫 50dbb5cb5f fix: prefill saved password on SSH auth retry after MFA failure (#4350)
Fixes #4346

Prefill the saved host password in the SSH credential retry dialog after a target authentication failure, instead of clearing the field.

Linux Electron smoke PASS on 20b0ad946b:
/workspace/netcatty-smoke-shots/pr-4350-20b0ad946-20261125-095752
GitHub Codex CLEAN; CI 45524469003 green.
2026-11-25 10:01:44 +08:00
陈大猫 462c2adb2a fix: preserve occupied groups during Smart Merge (#4344)
Fixes #4344

Preserve occupied host groups (and their saved defaults) after Smart Merge when a null baseline meets remote tombstones for a moved group.

Linux Electron smoke PASS on 184c783d19:
/workspace/netcatty-smoke-shots/pr-4349-184c783d-20261124-194948
GitHub Codex CLEAN; CI 45386915778 green.
2026-11-24 19:58:38 +08:00
陈大猫 610da46a6f fix: distinguish closing tabs from session panes (#4336) (#4339) 2026-11-24 14:53:22 +08:00