Commit Graph
6631 Commits
Author SHA1 Message Date
陈大猫 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
陈大猫andCodex 30e9609b1b fix(terminal): preserve pane geometry through zoom and restore (#4337)
* fix(terminal): preserve pane geometry through zoom and restore

* fix(terminal): resolve percentage pane restore geometry

* fix(terminal): resolve percentage pane zoom-entry geometry

---------

Co-authored-by: Codex <codex@openai.com>
2026-11-24 14:08:32 +08:00
jinshenganyuciandbincxz 6527d5596f feat(sftp): stream packed downloads and restore folders locally (#4179)
* feat(sftp): stream packed downloads and restore selected folders locally

* fix(sftp): address packed download lifecycle and cleanup review

* fix(sftp): preserve live packed state across window reload and fall back on POSIX special child names

* fix(sftp): guard active-packed snapshot replay race and fall back on selected root symlinks

* fix(sftp): fall back before nested-link containment check for selected root symlinks

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:52:54 +08:00
GOUKI9999andbincxz a791d0b8c4 feat(terminal): configure SSH reconnect interval from 5 to 3600 seconds (#4039)
* feat(terminal): make SSH reconnect interval configurable

* fix(terminal): read latest reconnect settings via ref on session exit

* fix(terminal): pause connection timeout while waiting for auto-reconnect

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:52:25 +08:00
KenX049andbincxz bcce829294 feat(tabs): move a tab to its own window without reconnecting (#4202)
* feat(tabs): move a tab to its own window without reconnecting (#4201)

Adds "Move Tab to New Window" to the tab context menu. Instead of opening
a new connection like "Copy Tab to New Window", the tab is hidden from the
tab bar and an attach popup takes over the same live PTY, so bastion
sessions are not re-authenticated and no extra seat is used. Closing the
popup returns the tab (with its screen state) to the window it came from.

- popup lifecycle notifies the home window via terminal-popup:attach-closed
- new runtime poppedOut flag; popped-out tabs still persist for restore and
  are not labelled as AI silent sessions in the tray

* fix(tabs): keep moved tabs alive when their source window closes

- A moved-tab popup registers as the lifetime heir of its session. If the
  source window is destroyed, ownership passes to the popup instead of the
  session being closed (worker and in-process paths). AI observe popups are
  unchanged.
- If the source window is gone when the popup closes, skip the hand-back so
  the popup's ownership closes the session.
- Only offer/allow Move Tab to New Window for connected sessions; attach
  mode cannot connect or reconnect a backend.

* fix(tabs): expose Move Tab to New Window through TerminalHost

The handler was registered but not passed into the terminal domain bag,
so AppView received undefined and the menu item never rendered.

* fix(tabs): address move-to-window focus, crash ownership, live count, history, and AI context review findings

* fix(tabs): activate moved-tab lifetime heir only after output rebind succeeds

* fix(tabs): wait for popup attachment before hiding tab and exclude plugin sessions

* fix(tabs): confirm renderer reattach before resolving move and await output restore before unhiding tab

* fix(tabs): preserve detached output across popup crashes and avoid focusing main window from tray

* fix(tabs): deliver attach snapshots and output restore directly to peer session windows

* fix(tabs): schedule automatic output restore retries when popup recovery fails

* fix(tabs): handle reopen replay preservation, stale restore cancellation, startup workspace move, and shutdown log capture

* fix(tabs): reassert popped-out state after tray reopen

* test(terminal): provide log finalizer stubs in popup snapshot harness

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:50:36 +08:00
6cdf6b836b feat(terminal): show live jump hosts and fix AI prompt readiness (#4316)
* feat(terminal): extract hostnames from shell prompts

* fix(ai): accept decorated two-line shell prompts

* feat(tabs): add prompt-host title presentation

* feat(session): track prompt-host transitions

* feat(terminal): publish live prompt hostnames to tabs

* fix(session): include prompt host action in publisher runtime

* fix(ai): accept redrawn JumpServer shell prompts

* fix(tabs): prefer live prompt host behind user labels

* build(windows): normalize cross-built native modules

* fix(build): avoid config lint global shadowing

* fix(session): constrain live prompt hostname parsing

* fix(tabs): refresh workspace labels from live prompt hosts

* build(windows): validate cross-built native payloads

* fix(session): cover strict zsh and jump host prompts

* test(tabs): type live workspace prompt fixtures

* build(windows): scan packed native modules safely

* build(windows): add explicit cross-build script

* build(windows): make cross packaging self-contained

* fix(terminal): address review findings on JumpServer prompts and Windows cross-pack

* fix(windows): preserve child-process detection in cross-built packages

* fix(windows): require patched conpty.node during cross-packaging

---------

Co-authored-by: zjio26 <zjao2026@outlook.com>
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:50:25 +08:00
182531d7a7 feat(terminal): support Directory Picker in Windows PowerShell (#4177)
* feat(terminal): support Directory Picker in Windows PowerShell

* fix(terminal): handle qualified PowerShell paths and CI fixtures

* test(plugins): await dialog focus restoration in log settings

* test(terminal): normalize Windows fixture paths with native realpath

* fix(terminal): retry stale listings and recognize spaced UNC shares

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:50:14 +08:00
GOUKI9999andbincxz abd074fe95 fix(ai): refresh stale runtime model catalogs on use (#4263)
* fix(ai): refresh stale runtime model catalogs on use

* fix(ai): check model catalog freshness on picker open

* fix(ai): preserve saved rows on current-only stale catalog revalidation

* fix(ai): skip Cursor CLI probes on cacheOnly and warm model catalog checks

* fix(ai): keep cacheOnly model hydration non-blocking and restart-safe

* fix(ai): persist exact alias keys for cacheOnly hydration and reconcile warnings

* fix(ai): add backward-compatible pre-alias v1 catalog resolution for cacheOnly

* fix(ai): track alias migration per entry and consult Cursor alias before probing

* fix(ai): resolve pre-alias catalogs asynchronously by exact binary and allow missing CLI on cacheOnly

* fix(ai): preserve saved models for missing CLI and persist joined aliases after load

* fix(ai): reuse saved alias when bare CLI disappears from PATH

* fix(ai): alias env-configured CLI paths and adopt valid model on picker revalidation

* fix(ai): reprobe moved Cursor CLI on stale revalidation instead of pinning stale alias

* fix(ai): preserve PATH fallback when env-configured CLI path is invalid

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-11-24 10:50:03 +08:00
陈大猫andCodex fedab5ec3b fix(settings): draw a border on frameless settings windows (#4333)
* fix(settings): draw a border on frameless settings windows

* chore: retrigger CI after unrelated compressUploadBridge flake

---------

Co-authored-by: Codex <codex@openai.com>
2026-11-23 21:47:09 +08:00
陈大猫andCodex ad612aeb0c fix(hotkeys): let Linux Alt+M pane zoom reach the renderer (#4331)
Fixes #4329

Co-authored-by: Codex <codex@openai.com>
2026-11-23 20:49:18 +08:00