mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-17 21:10:48 +00:00
96628e8bd032434230d2faef047bd8a1ffb6bbcf
4554
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
96628e8bd0 | fix(#2849): automated Cursor CLI fix | ||
|
|
4f46a3728b |
Merge pull request #2820 from binaricat/cursor/issue-2818-31232543614
feat(vault): add copy hostname action in host context menu |
||
|
|
5294f63544 |
ui(vault): move copy hostname into host context menu
Keep the one-click hostname copy from #2818 without crowding host cards; expose it next to copy-credentials in list/grid and tree menus instead. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
7e843f6f2e |
Merge pull request #2847 from binaricat/ui/scripts-sidepanel-compact-toolbar
ui(scripts): compact side panel toolbar like host tree |
||
|
|
2004f26c3e |
ui(scripts): compact side panel toolbar like host tree
Hide search behind an icon toggle, surface create actions as inline icons, and move bulk delete into a selection bar so the Library toolbar stays compact. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
7c478215c8 |
fix(notes): recover long markdown paste when Lexical insert no-ops (#2838)
* fix(#2783): automated Cursor CLI fix * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix: address Codex review on PR #2838 * fix(notes): slim paste recovery after Codex review bloat Collapse the 40-round Lexical serialization/domain rewrite back to the original caret-loss recovery: intercept without selection, setMarkdown merge when there is no caret, and keep insertMarkdown when there is one. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(notes): harden paste recovery against stale commits Invalidate deferred paste commits on note switch/unmount, merge from live editor markdown, and poll briefly for muted onChange instead of appending. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: netcatty-bot <308658023+netcatty-bot@users.noreply.github.com> Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
01b818d598 |
fix(terminal): keep autocomplete local when SSH echo/path lags (#2831)
Prefer the reliable keystroke buffer under SSH echo lag so local history/fig/snippet matches appear without waiting for remote echo or path listings. Soft-budget remote path completion and keep Enter recording on the stricter alignment path. |
||
|
|
0d453a42c4 |
fix(system): show PVE CT ZFS/bind mounts in disk overview (#2837)
Minimal fix for PVE CT disk overview: broaden df filtering, derive dash Capacity, fall back to df /. |
||
|
|
5dcba28621 |
feat(scripts): add expand/collapse all and delete-selected toolbar actions (#2828)
* fix(#2826): automated Cursor CLI fix * fix(scripts): confirm bulk delete and clear host bindings Scripts side-panel mass-delete skipped confirmation and, when onSnippetsChange was wired, filtered snippets without clearing host login/connect script bindings. Confirm first, always dispatch the shared delete event, and apply deletes via deleteSelectedSnippetsFromVault. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(scripts): harden delete handler against stale vault state Read snippets/hosts from refs in the shared delete listener so rapid confirms cannot resurrect already-removed items, and clear pending bulk delete when the scripts panel hides so the confirm dialog does not resurface after a mid-prompt hide. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(scripts): keep delete refs current within the same tick Update snippetsRef/hostsRef immediately after applying a delete so a same-tick second event cannot rebuild vault state from the pre-delete snapshot and resurrect removed snippets or host bindings. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: address Codex review on PR #2828 * fix(scripts): hoist bulk-delete confirm outside toolbar popover Portalled Dialog focus dismissed the compact Scripts popover and cleared pendingDeleteIds before confirm. Own the confirm in TerminalToolbar and defer via onBulkDeleteRequest when nested in that popover. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: serialize snippet saves with bulk-delete vault lock updateSnippets wrote STORAGE_KEY_SNIPPETS without withVaultImportLock, so a concurrent edit could land between bulk-delete's snapshot read and journal commit and be discarded. Queue ordinary snippet writes on the shared lock and include them in waitForPendingVaultWrites. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: rebase queued snippet saves onto latest vault snapshot Locking updateSnippets alone still wrote a pre-delete full array, so a popup bulk-delete could be resurrected (or a storage-event version bump could cancel the local edit). Rebase under the vault lock and supersede only newer local writers via snippetsWriteOwnerRef. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 * fix: address Codex review on PR #2828 --------- Co-authored-by: netcatty-bot <308658023+netcatty-bot@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
3513addb9c |
feat(ai): add one-click provider connection test in settings (#2845)
* fix(#2844): automated Cursor CLI fix * fix: address Codex review on PR #2845 --------- Co-authored-by: netcatty-bot <308658023+netcatty-bot@users.noreply.github.com> |
||
|
|
c9bc39d1a1 | feat(sftp): open current path in linked terminal (#2825) | ||
|
|
03acd48585 | fix(terminal): commit CJK punctuation from IME insertText (#2834) | ||
|
|
fd295e7529 | fix(ssh): open Copy Tab shell before PID discovery on rate-limited bastions (#2808) | ||
|
|
f4e14afc9d | fix(#2839): automated Cursor CLI fix (#2840) | ||
|
|
93dce066fd | fix(sftp): apply search filter in tree view (#2829) | ||
|
|
49b88241db | fix(autocomplete): match Chinese snippet titles via pinyin and pre-echo input (#2814) | ||
|
|
b67ff061c2 | fix: address Codex review on PR #2820 | ||
|
|
8a482dc928 | fix: address Codex review on PR #2820 | ||
|
|
3d433c8727 | fix: address Codex review on PR #2820 | ||
|
|
ea765ce074 |
feat(system-manager): add Ports and Services tabs with capability gating (#2817)
Related to #2561. Adds detect-first Ports/Services system manager tabs, network-appliance read-only gating, and hardened collectors/parsers from Bugbot review. |
||
|
|
8ee55963d8 |
feat(portforward): make main process authoritative for runtime state (#2288) (#2819)
* feat(portforward): make main process authoritative for runtime state Phase 1 of #2288: add snapshot/runtime event protocol with epoch+revision, stop persisting active/connecting/error into localStorage, migrate legacy stored phases on read, and project unknown when snapshots are unavailable. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(portforward): access runtime bridge via netcattyBridge Satisfy the no-restricted-properties lint rule for window.netcatty. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(portforward): honor snapshot authority and prune on resync Default runtime projection to unknown until a successful snapshot, reconcile (not sync-only) on epoch/revision gaps, serialize runtime event handling, clear worker runtime subscribers on window destroy, and align tray unknown UX with RuleCard. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
b1a0a26d01 |
feat(settings): 设置全局搜索(可展开联想跳转) (#2816)
Closes #2616 Closes #2683 Add expandable settings search with autocomplete jump-to-anchor navigation across tabs (including AI/Sync sub-tabs). |
||
|
|
c718d042ac | fix(#2818): automated Cursor CLI fix | ||
|
|
3490b0673d |
fix: StrictMode 双发清理 + 笔记页卡顿优化 (#2810)
* Cursor: Apply local changes for cloud agent * fix(terminal): stop first SSH fail under StrictMode remount Defer backend boot past the double-invoke, cancel superseded vault init, gate start on vault hydration, and harden hotkey/attach cleanup so the first connect no longer races a stale close or empty keychain. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * perf: finish StrictMode mega-subscriber plan (accent isolation + docs) Stabilize published terminal themes across custom-accent drag, apply accent at chrome/log leaves and CSS injection only, land Phase 0 design/plan docs, and lock Host-bag / Bugbot-clean contracts for the isolation checklist. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * docs: add StrictMode mega-subscriber design and plan artifacts Force-add Phase 0 spec/plan under docs/superpowers (gitignored locally) so the delivery branch carries the approved design and plan copy. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: clear remaining StrictMode doubles and notes editor jank Gate every AI send and reject concurrent runTurn, latch tray connect flush and settings persistMounted remounts, and stop notes content drafts from rebuilding MDXEditor/shell on each keystroke. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * perf: gate hidden notes panel subscribe and skip host-link annotate on keystrokes Hidden terminal notes mounts keep a live snapshot read but stop listening to publishes. Host-link DOM annotation follows hosts/mode (preview MutationObserver) instead of every markdown value change. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: latch SSH transport idle TTL notify under StrictMode Avoid duplicate main-process notifySettingsChanged on effect double-invoke when the idle TTL value has not changed. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * perf: freeze inactive vault notes against hosts churn and prefetch MDXEditor Gate the retained VaultNotesSection notesStore subscription while hidden, ignore hosts identity in its memo compare when inactive, and warm the lazy InlineMarkdownEditor chunk when notes become active. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: clear remaining AI StrictMode double-fire hazards Latch Ask-AI terminal selection on requestId before draft mutation, hoist Codex App Server IPC bridge to App (ref-counted), and make Catty requestApproval join an existing waiter for the same toolCallId. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: remount-safe AI send latch and skip stale MCP approval IPC Replace the component sendInFlightRef with a module key latch so StrictMode panel remount cannot reopen a mid-flight send, and no-op resolveApproval when the pending entry is already drained. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * test: allow gated useNotesStore in VaultNotesSection memo contract The retained notes section now passes enabled:isActive so hidden mounts do not subscribe; update the VaultView memo source assertion accordingly. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: keep note drafts across mode toggle and external note publishes Flush ref-only content before edit/preview remount, and skip prop→editor setMarkdown while a local draft diverges from the last synced value. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * chore: strip StrictMode sermon comments after Bugbot/Comment Sicko pass Keep effect-order and public-export contracts; drop remount/perf narration that the latches and tests already encode. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: remount-safe Ask-AI terminal selection latch Move consumed requestIds to a module Set so StrictMode remount cannot append the same selection chip twice before parent state clears. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * chore: drop remount latch comment Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
70607cb26d |
perf: StrictMode + Host-island mega-subscriber elimination (#2809)
Split vault/session/settings into publishers and store-backed Hosts so hot fields no longer rebuild the whole shell, and harden Terminal boot / startup effects for StrictMode double-mounts. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
a56b868d10 |
fix(system-manager): show Ascend 910B NPU info from CANN 24.x npu-smi tables (#2812)
* fix(system-manager): parse CANN 24.x Ascend npu-smi info tables ModelArts / CANN 24.1 tables include Hugepages-Usage and Bus-Id chip rows that the old regex rejected, so the GPU tab showed zero Ascend devices even when npu-smi was present. Parse summary+chip pairs like nputop, always collect the info dump, and fall back to info -m for NPU IDs. Closes #2811 Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * feat(system-manager): harden Ascend parsing from nputop fixtures and polish GPU UI Borrow real npu-smi samples from youyve/nputop (Apache-2.0) so CI covers 910B2C, 310B4, Atlas A3 multi-chip, and 310P3 process tables without hardware. Aggregate multi-chip NPUs, parse info-dump processes, and surface npu-smi driver versions. GPU tab now keeps a short util/HBM sparkline history and ResourceBar uses smooth width transitions with load-aware tones, closer to an nvtop feel inside the existing system-manager chrome. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
c4e2391dd8 |
fix(sftp): omit totalBytes on temp download for external editor (#2799)
downloadToTempWithProgress passed totalBytes:0, which transferBridge treats as an explicit empty snapshot and skips the remote body, so external editors opened empty files (fixes #2787). Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
cfa47270be |
fix(terminal): raise autocomplete suggestion cap for snippet matches (#2797)
* fix(terminal): raise autocomplete suggestion default beyond 8 Snippet keyword matches were truncated at autocompleteMaxSuggestions=8 before the floating list, so users with many matching scripts could not scroll to the rest (fixes #2793). Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): migrate persisted autocompleteMaxSuggestions 8 to 50 Existing installs saved the old default into localStorage with no settings UI, so raising DEFAULT alone left the popup capped at 8. Treat 8 as the legacy sentinel while preserving intentional custom caps. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
b7979e02be |
fix(terminal): stop keyword highlight flicker on Enter (#2805)
* fix(terminal): stop keyword highlight flicker on Enter Idle Enter was misclassified as user scroll so overscan decorations were pruned before writeParsed cancel (Ubuntu RTT). Also swap cursor-line decorations atomically to avoid clear-before-create flash (fixes #2784). Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): catch up highlights after Enter protection window While enterInputPending blocked scroll-prune, viewport scrolls were also ignored with no dirty mark. Mark dirty during the window and trigger a write refresh when Enter protection clears. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): persist keyword highlights across scroll (#2784) Replace Enter scroll-skip band-aid with mam15mon/#2348 persistence: keep decorations across scroll, sync only newly exposed rows, bound retention (~20 viewports / max 1200). Keep Enter write-path protections and cursor-line atomic swap. Continuous Enter may scroll; prune-on-scroll is gone. Co-authored-by: mam15mon <mam15mon@users.noreply.github.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): bound persistent keyword prune to scroll path Keep Enter/write deferred pruning intact by pruning the retention cap only after scroll viewport indexing, not on every decoration apply. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): rescan dirty overlap on persistent scroll refresh Overlapping scroll only scanned newly exposed rows then cleared the whole viewport dirty set, which could drop in-place redraw work when scroll outranked a pending write refresh. Rescan write-dirtied overlap lines and only clear dirty for ranges that were actually processed. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> Co-authored-by: mam15mon <mam15mon@users.noreply.github.com> |
||
|
|
2c6390bf6f |
fix(tabs): restore previous tab after closing temporary session (#2804)
Closing the active tab fell back to last workspace/solo in array order, so opening a temp tab then closing it jumped away from the prior work tab (fixes #2788). Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
0f535d0b80 |
fix(notes): protect title IME, surface persist failures, harden paste (#2803)
* fix(notes): protect title IME, surface persist failures, harden paste Note titles rewrote controlled value during CJK composition (Sogou Wubi). Notes localStorage writes ignored QuotaExceededError so restarts lost content. Markdown paste intercept could preventDefault with a no-op insert (fixes #2783). Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(notes): commit title draft on blur for IME composition IME-only title entry never called onCommit until compositionend; blur could flush an empty draftTitle and then adopt the stale external value. Commit the local draft on blur before parent flushNoteDraft. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(notes): stash IME title drafts in refs without controlled rewrite Composition updates now live-stash into draftTitleRef for teardown and note-switch flushes, while onCommit still waits for idle IME. Blur syncs superseded external titles before flush so stale drafts cannot overwrite. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(notes): clear stashed title when IME composition is superseded compositionEnd now live-stashes the adopted external title so pagehide and note-switch flushes cannot persist rejected composed text. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(notes): cancel draft flush during IME title stash Prior idle commits could still debounce-flush mid-composition and rewrite the controlled title. Stash now clears the timer, and external supersede in the adopt effect live-stashes the authoritative title. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(notes): dedupe quota failure toasts during autosave Debounced draft flushes can hit QuotaExceededError repeatedly; rate-limit the error toast so users are not spammed every 300ms. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
68ad8a6118 |
Merge pull request #2800 from binaricat/cursor/fix-automation-verify-gate-dcb2
fix(ci): stop Cursor automation verify-gate false positives |
||
|
|
0144c9c6d3 |
fix(ci): narrow volatile TAP diag skip to known logger tags
Address Bugbot: do not skip every `# [` comment. Only ignore known app debug tags (transferDiag, FileWatcher, SessionLogStream, ...), while still failing on unknown bracket diagnostics like `# [fatal]`. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
4bcc619de4 |
fix(ci): stop automation verify gate false positives
Ignore success-case TAP YAML diagnostics and normalize volatile console noise in baseline comparison so red-but-unchanged candidate runs pass as baseline_only. Align the session-backed fastPut expectation with live-path uploads, harden SCP abort teardown races, drop mixed hallucinated research citations instead of failing classify, and soften verification failure copy so it no longer claims the patch introduced the failure. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
cc5ad3be16 |
perf: isolate Terminal hot props, cut memory/jank, and repay architecture debt (#2790)
* refactor: migrate architecture-debt hooks into application/state Move SFTP Wave A stores/hooks and related vault/AI/terminal/systemManager hooks out of components into application/state, update importers, and keep thin deprecated re-exports at the old paths. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * refactor(sftp): align local bookmarks store API with global bookmarks Export subscribe/get/set/rehydrate helpers from localSftpBookmarks to match the globalSftpBookmarks external-store pattern. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(electron): reduce baseline memory via spellcheck/GPU/prewarm guards Disable spellcheck on BrowserWindows and the default session, drop spare renderers, gate aggressive GPU switches behind NETCATTY_COMPAT_GPU, and make settings prewarm opt-in via NETCATTY_PREWARM_SETTINGS. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * Isolate notes and customAccent from TerminalLayer hot props Route vault notes through notesStore (shellHistoryStore pattern) and app accent through appearanceChromeStore so note edits and accent-drag ticks no longer rebuild TerminalLayer. Notes/AI slots and Terminal leaves subscribe locally; VaultView and open-note callbacks stay unchanged. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(ui): cut unnecessary AppView/VaultView/settings re-renders Stabilize TopTabs close handler, memo AppHostTreeLayer, exclude accent from settingsVersion, ignore connectionLogs off the logs section, share lastConnected host refs, and keep rename dialog drafts local so chrome domain stays stable. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * chore: package size, dead code, and consolidation cleanup Remove unused direct deps, exclude Vite-bundled renderer packages from electron-builder, delete high-confidence dead code/no-op transfer warm wiring, consolidate cloud provider IDs and KnownHost/SFTP helpers, and land UI/AGENTS quick wins (rAF text batching, notes draft debounce, streaming plain text, tempDirBridge, diagnostics adapter, External MCP setters). Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: stabilize rAF text batching and diagnostics tests Polyfill requestAnimationFrame for Node, flush pending text before steer buffering, bypass rAF while steer is in flight, and stub global localStorage for AI panel diagnostics adapter tests. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: correct import paths after application/state hook migrations Migrated vault/AI/system hooks still used components/-relative imports; point them at repo-root domain/components/types/lib instead. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: address Bugbot/Codex regressions from perf cleanup - Keep blank Enter from closing RenameDraftDialog; only reset rename state after a non-empty submit - Flush note drafts before vault mutations so pending title/body edits are not overwritten - Re-apply appearanceChromeStore accent on appearanceTheme in Terminal, and keep layer themes unaccented Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(notes): flush draft before markdown export paths Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: keep editor-close hotkey ref fresh during render Assign handleRequestCloseEditorTabRef in render instead of useEffect so Cmd/Ctrl+W never hits the App stub before the effect runs. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: keep accent in chrome themes without TerminalLayer thrash Restore accent in globalAppearance for chrome/injection consumers. Keep resolveFocusedAppearance identity stable across accent drag via accent ref, while Terminal leaf still re-applies appearanceChromeStore. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: keep compose chrome accent live and merge note renames Subscribe theme-panel focusedAppearance to appearanceChromeStore so compose-bar chrome updates during color-picker drag even when resolveFocusedAppearance identity stays stable. Tree renames now merge title into the post-flush note instead of replacing from a stale row. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: clear terminal accent when switching back to theme mode Re-resolve appearanceTheme by catalog id before applyCustomAccent so a stale baked custom cursor/selection cannot stick after accentMode returns to theme while TerminalLayer memo ignores accent props. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: register unsaved prompt singleton during render AppView close handlers call promptUnsavedChanges outside the old render-prop. Assign the singleton during render so Cmd/Ctrl+W and tab close never hit the pre-effect null window that auto-cancels. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: keep vault import hooks UI-free and flush notes on teardown Move ImportOptions into application/state and inject a notifier so useVaultImportHandlers no longer imports components. Notes drafts also flush on pagehide/beforeunload when Electron tears down without React unmount. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: move AI terminal session context builders into domain buildAITerminalSessionInfo and AIPanelContext now live under domain/ so application hooks no longer import TerminalLayerSupport and create a UI → application → UI cycle. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: drop duplicate AIPanelContext type from TerminalLayerSupport The type is re-exported from domain; the local definition conflicted. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: keep migrated state hooks free of UI-layer imports Move aiChatStreamingSupport into infrastructure/ai and poll list helpers into domain/systemManager so useAIChatStreaming / useSystemManager no longer import from components. Leave thin re-exports at the old paths. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: move remaining migrated-hook deps out of components Host-key verification types/helpers now live in domain/, and SFTP column layout types live in application/state/sftp/columnLayout. Application hooks no longer import those definitions from the UI layer. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix: clear lint blockers and flush notes when panels hide Move AI panel diagnostics persistence into application/state so components stop importing localStorageAdapter. Flush note drafts when retained NotesManager mounts become inactive, and silence related lint warnings in theme/host-key helpers. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(notes): publish notesStore sync on vault note updates updateNotes/updateNoteGroups now publishNotesSnapshot immediately so AI/notes consumers do not briefly read a stale catalog after a hide flush. Flush inactive drafts in useLayoutEffect before paint. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
443202ba4e |
fix(sftp): instant folder-drop scan UI and drop full-tree pre-scan (#2782)
* fix(sftp): instant folder-drop scan UI and drop full-tree pre-scan Restore interleaved folder transfers as the only non-compressed path, remove the folder pre-scan setting, and make local folder drops show a scanning task with live discovered counts via native listLocalTree (with cancel + progress). UI shows "done · found" instead of a fake grand-total percentage while discovery is still growing. * fix(sftp): make folder scan cancellation bridge-safe * fix(sftp): preserve path-only terminal drops * fix(terminal): accept native folder drop paths * fix(sftp): keep scan task cancellable during setup * fix(sftp): preserve scan failure state during setup errors * fix(sftp): keep folder scan task across retries * fix(sftp): cancel scan task immediately * fix(sftp): keep cancellation active through session setup * fix(sftp): settle failed drop upload retry * fix(sftp): preserve cancellation in final scan cleanup * fix(sftp): harden folder scan cancellation and conflicts * fix(sftp): finish Codex follow-ups on folder scan cancel UX - Abort sibling listLocalTree walks when one multi-root scan fails - Prefer ERR_*_CANCELLED over matching "cancel" in error text - Clear scanning phase on settle; only label live rows as Scanning - Omit directory metadata sizes from drop entries used for totals * fix(sftp): stream folder discovery into concurrent uploads Local path-backed folder drops now edge-scan and edge-transfer: listLocalTree streams entry batches while upload workers consume them, so the first files start before a 100k-file walk finishes. Cancel aborts the walk, clears the queue, and stops creating child tasks. Compressed uploads still materialize fully then pack. * fix(sftp): harden progressive folder UX, retry, and size-based uploads Align the SFTP panel with transfer-center progress, keep nested tree batches until tree-end, honor pause during progressive enqueue, add low-cost retry for external drag-drop files, and drop whole-file upload digests for industry size-based resume (download live-log prefix checks unchanged). * fix(sftp): address multi-agent review on progressive upload and retry Gate progressive drops to path-backed folders only, prefer pool sessions on drag-drop retry with in-flight and cancel guards, soft-check upload mtime without fail-open contentVerifiedSeparately, skip multi-root pause HOL, and fail closed when the local tree stream misses tree-end. * fix(sftp): finish multi-root pause HOL and parent rollup guards Race-wait on all latched parents so resuming a non-head folder can proceed, and only roll progressive parents to completed after terminal failed status. * fix(sftp): address Codex progressive conflict and hang findings Add root-level conflict preflight to progressive folder uploads, wake all backpressure waiters, preserve cancel listeners across uploadEntriesDirect, and surface empty-directory mkdir failures.v1.1.76 |
||
|
|
6c246bb8f4 |
fix: optimize growing-download verification (#2780)
* fix(sftp): optimize growing-download verification * fix(sftp): harden growing-download prefix verification Skip unprivileged SSH digest commands for sudo SFTP sessions and reject empty-input digests so root-only sources fall through to the elevated SFTP channel. Hash remote prefixes in concurrency-sized windows so verification keeps a bounded memory footprint instead of retaining the full downloaded prefix. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): fall back when remote digest command times out Treat SSH digest open/run timeouts as a miss for the optional command-path optimization so growing-download verification can still prove the prefix via SFTP ranges instead of failing a completed transfer. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): propagate digest open timeouts after transport invalidation SSH_EXEC_OPEN_TIMEOUT invalidates the physical transport in boundedSshExec, so falling through to SFTP on the same session is unsafe. Keep run-timeout fallback to SFTP, but fail closed on open timeout. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): mark digest open timeouts as noTransferFallback SSH_EXEC_OPEN_TIMEOUT already invalidates the transport. Tag it with noTransferFallback so downloadFile's isolated→shared catch fails closed instead of retrying verification on the poisoned session. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): fail closed on verify timeouts; range-hash checkpoint resumes Mark SFTP verification request/stream timeouts with noTransferFallback so downloadFile does not retry body transfer on a channel that still owns a timed-out request. Allow checkpoint-complete growth verification to use bounded prefix ranges under the session fast-download slot, including sudo paths that skip unprivileged SSH digests. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): drop wedged SFTP channel after verification timeouts Clear and end the cached SFTP channel when prefix verification hits an OPEN/READ/stream watchdog or digest exec-open timeout, so later browse/transfer work cannot reuse a channel that still owns cancelled requests. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): use window inactivity watchdog for prefix range hashing Reset a single per-window READ inactivity timer whenever any range completes, instead of arming independent deadlines that all expire together on slow or serialized SFTP servers. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): abandon channel on stalled CLOSE; share abort gate Drop the cached SFTP channel when verification CLOSE times out or fails, and fan out concurrent prefix READs through one shared AbortSignal gate so the bounded window does not attach dozens of listeners. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
90df595e43 | fix: remove lint warnings (#2779) | ||
|
|
ab3580982d |
fix(sftp): parallel directory discovery, folder pre-scan, and skip-unchanged (#2712 / #2556) (#2772)
* fix(sftp): parallel folder discovery and unblock transfer stalls
Address #2712 / #2556 leftovers after the pipelined fail-closed work
(#2449 / #2720 / #2761): keep bulk body I/O on concurrent READ/WRITE only,
surface upload digest prep as verifying instead of a silent hang, make the
fastPut path-gate wait cancelable (#2755), parallelize multi-select enqueue,
and bound-parallelize directory listings so folder totals appear faster.
Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>
* feat(sftp): folder pre-scan and skip unchanged files
Absorb rsync strengths without an rsync backend: optionally walk the
full tree before transfer for stable file totals, and skip files whose
size and mtime already match the destination.
Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>
* fix(sftp): drop unused DiscoveredTransferFile import
Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>
* fix: address Codex review on PR #2772
* fix(sftp): address Codex review on path gate, aliases, and worker drain
- Invalidate same-transfer fallback when a force-released path gate gets a late truncating OPEN
- Use per-branch ancestors so sibling symlink aliases copy under pre-scan BFS
- Keep interleaved subdirectory walks sequential for deterministic manifest indices
- Drain transfer/bounded workers before propagating errors; ASCII punctuation
Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>
* fix(sftp): canonical pre-scan file order and pre-2001 mtime skip
Sort discovered files with compareDirectoryTraversalPaths before index
assignment, and treat timestamps >= 1e11 as milliseconds so year-2000
local mtimes still match SFTP second precision.
Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>
* fix(sftp): bound multi-select downloads and preserve dest mtime
Address Codex review on PR #2772: serialize local blob reads, bound
multi-select root downloads before pre-scan, replace remaining Unicode
em dashes, and stamp destination mtimes after successful transfers so
skip-unchanged can match on a later pass.
Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>
* fix(sftp): keep in-place OPEN poison until callback settles
Address Codex review on
|
||
|
|
bd81b1fbcf |
fix(sftp): make fastPut pending OPEN gate wait cancelable (#2759)
* fix(sftp): make fastPut pending OPEN gate wait cancelable An isolated concurrent OPEN that dies without a callback leaves pendingWriteOpenPathGate unresolved by design. Unconditionally awaiting it before fastPut pinned the transfer after abort was cleared; race the wait with cancel and bound it fail-closed so Cancel/lease cleanup can settle without racing a still-pending truncate (#2755). Co-authored-by: Cursor <cursoragent@cursor.com> * fix(sftp): end fastPut channel on gate wait abort Clear the gate-wait timeout on cancel so abandoned rejects cannot fire, and end the reopened isolated channel when the wait fails so Cancel / fail-closed timeout cannot leak an SSH subsystem. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(sftp): poison path gate after fastPut OPEN wait timeout When a dead write OPEN leaves truncatingSharedWriteOpenGates unresolved, fail-closed fastPut timeout now marks that entry failed so later same-path uploads reject promptly instead of hanging on waitForPrior. Keep the barrier until a late OPEN release clears it; waitForPrior rejection no longer starts OPEN. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): keep path-gate poison across successor waiters Reinstall the poisoned truncatingSharedWriteOpenGates entry on fail() so a same-path waiter that replaced the map slot cannot release the barrier for a third OPEN. Propagate fail (not resolve) when abandonGateWait sees a poisoned prior, and poison on cancel during the fastPut gate wait as well as timeout. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): let OPEN owner clear poison after successor fail Successor waiters that propagate a poisoned prior must not reinstall themselves into truncatingSharedWriteOpenGates. Otherwise the OPEN owner's late release cannot delete the barrier and same-path uploads stay fail-closed forever after the dangerous OPEN has settled. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): clear path-gate poison after transport end Arm a 2s post-close clear when the owning isolated SFTP channel ends so a host-keyed poison from a never-callback OPEN does not fail-closed every later same-path upload until process restart. Keep the grace so a late OPEN racing end() still has a barrier. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): arm path-gate poison clear without per-OPEN listeners Install the post-poison transport-gone clear from fail() instead of attaching end/close listeners on every write OPEN. Shared browse channels never emit those events per transfer, so the old approach leaked listeners and could hit MaxListenersExceededWarning. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): only OPEN owners arm path-gate poison cleanup Track openIssued / priorEntry on truncatingSharedWriteOpenGates so a waiter that reaches fastPut timeout poisons the OPEN-owning ancestor instead of reinstalling itself and clearing the barrier while the prior transport may still deliver a late truncating OPEN. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): do not arm ancestor poison cleanup from waiter fail When a waiting upload times out and fail() walks to the OPEN-owning ancestor, keep that ancestor's barrier until its own OPEN settles. Only the OPEN owner entry arms releaseAfterTransportGone after its transport is already gone. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
205d1591e8 |
feat(terminal): add disconnect/reconnect on workspace split status bar (#2769) (#2771)
* feat(terminal): add disconnect/reconnect controls on session status bar Workspace panes could not reach tab-level reconnect. Expose disconnect (without closing the pane) and reconnect beside the host info actions so split sessions stay operable. Closes #2769. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): abort in-flight boot on status-bar disconnect Disconnect keeps the pane mounted, so cancel's unmount cleanup never runs. Flip isBootActiveRef (and isCancelling) so a late startSSH/startMosh attach cannot resurrect the session after the user disconnects mid-connect. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): ignore stale start UI after status-bar disconnect When disconnect aborts an in-flight connect, starter catch paths must not reopen auth or repopulate errors. Gate SSH/telnet/mosh/ET/local/serial failure UI on isTerminalBootActive and harden the boot effect awaits. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): hide disconnect/reconnect on compact popup terminals Owned command popups use compactToolbar with a one-shot startup command. Exposing reconnect there can re-run that command; keep the controls on normal tabs/workspace panes only. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): use boot epoch so reconnect cannot revive aborted starts Disconnect alone flipping isBootActiveRef is not enough: an immediate reconnect re-arms boot, and a late startSSH from the aborted attempt can still attach. Capture a boot epoch per attempt and ignore stale attaches/UI. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): do not let stale attach abort a newer reconnect tryAttach failure for an expired boot epoch must close the orphan session only. Calling abortSessionStartAfterUnmount() would force disconnected on a reconnect that already re-armed boot. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): reject late host-key prompts after disconnect Disconnect can land before pendingHostKeyRequestId is set. Auto-deny onHostKeyVerification when boot is inactive or status is disconnected so approval UI cannot reopen on an aborted pane. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): cancel wake and MFA when status-bar disconnects Invalidate hibernation reconnect-wake tokens on disconnect so a late wake cannot re-arm boot. Reject/cancel keyboard-interactive prompts for disconnected panes and clear any already-queued MFA for that session. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): ignore stale SSH catch UI and password fallback Check boot attempt currency before resetting reconnect UI state on SSH start failure, and before launching key→password fallback after disconnect so a replacement reconnect is not interrupted. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): guard stale SSH progress and host-key prompts Ignore chain-progress callbacks from superseded boot attempts, and thread bootEpoch through SSH host-key verification so a late prompt from an aborted start cannot overwrite a replacement reconnect. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): correlate MFA and jump host-keys with boot epoch Forward bootEpoch through jump-host verification and keyboard-interactive prompts, and reject superseded MFA when the retained tab has already started a replacement reconnect. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): keep replacement SSH session alive across stale starts Skip closeSession for superseded starts while a newer boot still owns the shared sessionId, and avoid clearing MFA wait state before the attempt-freshness guard on SSH success. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): own shared sessionIds by boot epoch Claim SSH/local registry slots with bootEpoch so a stale start cannot overwrite a replacement, and make closeSession no-op when the payload epoch does not match the live session owner. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): claim bootEpoch for all reconnectable backends Pass bootEpoch through Telnet/Mosh/ET/serial starts, claim registry slots the same way as SSH/local, and dispose displaced owners when a newer boot replaces the shared sessionId. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): protect preload listeners and ET artifacts on displace Defer epoch-scoped closeSession listener teardown until main confirms ownership, and remove ET external-auth temp artifacts when a newer boot displaces the previous registry owner. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): clean rejected Mosh starts and keep replacement listeners Kill superseded Mosh/ET PTYs and auth temp files when claimSessionSlot rejects, and never clear shared preload listeners on epoch-scoped closes. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): settle superseded boots and stop displaced log streams Reject Telnet/SSH claim failures through Promise reject/failReuse instead of uncaught EventEmitter/.then throws, and stop a displaced session's log stream so a logging-disabled reconnect cannot append into the old file. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): keep woken runtime when disconnect cancels hibernate wake Disconnect invalidates in-flight hibernated reconnects with keep mode so a successful wake that already cleared hibernatedRef is not disposed into a dead pane that can never reconnect. Unmount still disposes orphan runtimes. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): bind reused SSH shellPid only to the claimed session Late PID discovery after Copy Tab reuse must not write onto a newer bootEpoch that already replaced the shared sessionId registry slot. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): await plugin cancel cleanup and clear boot epochs on teardown Track plugin start/cancel promises so Disconnect→Reconnect waits until the external session finishes unregistering, and stop unmount teardown from republishing boot epochs into the process-wide map. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): cancel SSH passphrase prompts on disconnect Register a pending-boot AbortSignal for SSH starts, abort it (and session- scoped passphrase requests) from closeSession even before a registry slot exists, and filter/drop late passphrase modals by boot epoch / disconnect. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): close owned boot epoch and scope passphrase cancels Capture the pre-bump epoch for disconnect/teardown closeSession so live transports are not skipped by epoch mismatch, cancel only passphrase prompts at or below that epoch, and revalidate boot currency after async passphrase lookups before queuing a modal. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): tag Telnet auto-login and Mosh ready with bootEpoch Emit bootEpoch on telnet auto-login and mosh:ready events so overlapping Disconnect→Reconnect boots ignore cross-delivered callbacks meant for an older shared sessionId. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): update disconnect assertion and cancel pending serial opens Align the disconnect source regression with invalidateBootEpochForClose, and abort in-flight serialPort.open attempts via pending boot AbortSignal so Disconnect→Reconnect cannot leave a stale open racing the replacement. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): keep flow-pause leases on skipped epoch closes Worker close:await previously cleared pause ownership in finally even when the worker returned skipped for an epoch mismatch, dropping the live replacement's lease. Only clear on non-skipped closes; epoch-scoped fire-and-forget close similarly defers to onSessionClosed. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
30004e7716 |
fix(ssh): forward resolved Local Network first hop on direct starts (#2775)
When the terminal worker is disabled, startSSHSessionWrapper probed LAN access but dropped the resolved address before startSSHSessionWithRetries. Share attachMacLocalNetworkProbeResult with the worker path so split-DNS FQDN first hops still get Local Network error guidance. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
75452055ae |
fix(ssh): harden macOS Local Network TCC trigger (#2673) (#2766)
* fix(ssh): harden macOS Local Network TCC trigger for LAN SSH Replace the main-process TCP probe with Apple's TN3179 UDP discard-port connect, resolve vault hostnames/.local before probing, hold the socket briefly so TCC can present the alert, and annotate EHOSTUNREACH errors that embed LAN IPs even when the host was stored as a DNS name. Addresses recurring #2673 / #2663 / #1040 Local Network silent failures. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(ssh): address Codex Local Network review findings Clear the UDP connect safety timer once connected so a slow .local resolve cannot truncate the TCC hold. Mark worker-forwarded start payloads after the main-process probe so utilityProcess skips a second hold. Keep the new test comments ASCII-only. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(ssh): bound Local Network DNS lookup by probe timeout Codex noted that hostname resolution before the UDP probe had no deadline, so a hung DNS lookup could stall every non-literal SSH start. Race the lookup against the existing probe timeout and skip probing when it expires so the normal SSH dial can proceed. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(ssh): tighten Local Network error address parsing Ignore LAN bind addresses in Node's "- Local (ip:port)" suffix so public SSH failures are not mislabeled as Local Network denials. Also extract embedded IPv6 ULA/link-local remotes from unreachable errors. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(ssh): only hint Local Network when the first hop is LAN A .local final host reached through a public proxy or jump must not force the macOS Local Network hint when the failing dial never touched LAN. Annotate from the first hop and remote error address instead. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(ssh): probe jump-level proxy as the first Local Network hop Match sshBridge first-hop wiring: a usable jump.proxy overrides the session proxy and the jump hostname. Otherwise a .local jump behind a public proxy probes the wrong host, and a LAN proxy in front of a public jump is missed. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(ssh): retry .local Local Network probes over udp6 IPv6-only mDNS hosts never resolve on a udp4 socket, so the TCC trigger could miss them. For unresolved hostnames try udp4 then udp6. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(ssh): share Local Network probe timeout across UDP families udp4 then udp6 fallbacks for .local hosts now inherit one overall deadline instead of restarting DEFAULT_PROBE_TIMEOUT_MS per family. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * chore: re-request Codex review after unanswered pass Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(ssh): skip Local Network probe for ProxyCommand hops Treat an active jump/session ProxyCommand as a terminal first hop so we do not fall through to a LAN hostname and spuriously prompt. Also share one wall-clock deadline across DNS resolution and UDP family attempts. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * test(ssh): tolerate residual Local Network probe budgets in hold test Shared-deadline math can arm the safety timer at 499ms instead of exactly 500ms. Identify that timer by being larger than the hold, not by equality. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(macos): preserve ProxyCommand skip during Local Network error annotation Keep ProxyCommand's skipProbe sentinel through annotateMacLocalNetworkErrorMessage so .local hop names do not get a false Local Network hint when TCP probing was intentionally skipped. Split residual UDP budget evenly across remaining address families so dual-stack and .local IPv6 attempts still get time. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * test(ssh): fire residual Local Network safety timers in hang probe test Shared-deadline math arms the UDP safety timer with a residual budget (e.g. 2999ms) rather than the exact DEFAULT_PROBE_TIMEOUT_MS constant, so matching only the constant left the hang-socket test unable to settle. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(macos): never hint Local Network for ProxyCommand errors skipProbe means an external ProxyCommand owns the dial. Do not append the Netcatty Local Network TCC hint from child-process LAN addresses in the error text — that guidance would send users to enable Netcatty for a connection Electron never made. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(macos): ignore downstream LAN addresses behind public first hops When a public proxy/jump owns the first dial, unreachable addresses embedded in the error often name a private host the remote side tried to reach. Only use those addresses as Local Network evidence when they identify the local first-hop dial. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(macos): keep LAN hints for private DNS first hops and ASCII comments Treat common private DNS suffixes (e.g. bastion.lan) as Local Network evidence so hostname-based first hops still get guidance when Node reports the resolved IP. Replace em dashes and arrows in this module with ASCII. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(macos): keep Local Network hints for unqualified first hops Single-label jump/proxy names such as "dev-viet" resolve to LAN IPs that appear in Node unreachable errors. Treat those hostnames as local-side evidence so annotation still guides users to macOS Local Network settings. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(macos): carry resolved first-hop LAN addresses into error annotation ensureAccess remembers the LAN IP it probed for a hostname first hop and forwards it on the worker start payload. Annotation uses that resolved address so private split-DNS FQDNs like bastion.example.com still get Local Network guidance without treating public proxies as LAN. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
08d1bb5f81 |
fix(terminal): keep newest scrollback after hibernate wake (#2765)
* fix(terminal): restore hibernate scrollback before viewport Hibernate wake was writing the viewport first and appending older scrollback on idle. Under a finite xterm scrollback cap that trims the just-restored newest rows, so switching back to a hibernated tab could permanently drop the end of large output (#2762). Replay scrollback → viewport → pending on the wake path while keeping chunked writes. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): prefer full hibernate snapshot on wake SerializeAddon range slices omit the seam newline, so concatenating scrollback+viewport can merge boundary lines. Prefer the coherent full snapshot for wake history, with a scrollback-then-viewport fallback, and cover the seam with a real SerializeAddon regression. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * style(terminal): keep hibernate wake comments ASCII-only Address Codex P3: replace em dash / arrow punctuation in touched comments per AGENTS.md ASCII convention. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): drain hibernate pending via take-and-clear on wake Full-history replay widens the window where capped pending output can grow without increasing length. Length-based slice drains then skip new bytes. Capture and clear pending before replay, then drain pure deltas. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): final pending drain before hibernate listener teardown After the bounded take-and-clear loop, take any remaining pending once more before stopHibernateListeners so wake-time output is not dropped. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): stop hibernate listeners before final pending drain Awaiting the final pending write while listeners are still live can lose already-acked bytes that arrive during that write. Stop listeners first, then take-and-replay any remainder. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): keep hibernate exit listener through final pending replay Stop only the data listener before the final pending drain so pending stops growing, but leave the exit listener registered until after the reattach decision so an exit during that await is not missed. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): pause backend flow across hibernate history replay Full-history wake no longer races the 512 KiB pending cap or the 64 KiB preload backlog. Pause-and-wait drains into pending, stop the data listener, take pending once, replay, reattach, then resume. Removes the multi-pass drain that still dropped ACKed bytes under sustained output. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): harden hibernate wake against drain failure and exit tails Check setSessionFlowPausedAndWait success. On drain failure keep the hibernate data listener with the pending cap disabled for the wake window. After history replay, take pending once more so exit "[session closed]" tails and uncapped live arrivals are not discarded. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): pause reconnect hibernate wakes and recheck exit after late drain Always pause when a backend session exists (including sessionConnected=false reconnect wakes). Drain late pending plus an exit-tail take before deciding reattach. Resume flow only after reattach, or on wake failure; successful reconnect wakes stay paused until cleanupSession. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): restore hibernate listeners on failed wake On wake failure, dispose the partial xterm runtime and reinstall hibernate listeners (preserving pending) instead of unpausing into a listener-less backlog gap. Successful reconnect wakes still keep the pause until cleanupSession. Add a final pending take before exit-listener teardown. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): restore take-and-cleared pending on failed hibernate wake Track every pending take during wake and pass it to restoreAfterFailedWake so a thrown replay/reattach cannot permanently drop already-buffered output with the disposed partial xterm. Also take once more before exit-listener teardown. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): drain hibernate pending until empty before teardown After history replay, loop take-and-append until an empty take so an exit or residual chunk that arrives during an awaited replay cannot be dropped by stopHibernateListeners. Data listener is already stopped, so the loop stays short in practice. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
6bc65a43de |
fix(terminal): forward Ctrl+V for local clipboard image paste (#2760)
Local terminal paste with an image-only clipboard now forwards raw Ctrl+V into the PTY so nested TUIs (e.g. Claude Code) can read the OS clipboard. Text and file-path paste, and remote sessions, are unchanged. Fixes #2758 |
||
|
|
904af93a1d |
fix(credentials): 防止解密失败后二次加密污染本地与云端 (#2702) (#2770)
* fix(credentials): stop double-encrypting undecryptable safeStorage blobs When local decrypt failed (e.g. OSCrypt key churn after reboot), encrypt used to wrap the leftover enc:v1 ciphertext again, permanently poisoning the vault. Startup sync could also push those placeholders to cloud and make download restore the same poison. - Keep real enc:v1 blobs unchanged on encrypt (header check, no wrap) - Strip device-bound placeholders when applying portable sync payloads - Guard startup local-wins / merge round-trips before upload - Skip vault init re-encrypt writes when secrets are still undecrypted Fixes #2702 Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sync): strip enc:v1 secrets from smart-merge uploads Bugbot found that after local apply sanitized placeholders, legacy v1 smart-merge could still decrypt an unstripped remote, merge it, and re-upload the poison. Strip device-bound credentials on remote decrypt and again on the merged payload before upload. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(credentials): address Codex P2 review on #2702 - Always re-encrypt vault init batches so plaintext siblings are not left unprotected when one record is a stale enc:v1 placeholder - Sanitize device-bound secrets before convergent restore prepare so CRDT replica commit matches vault import - Require a complete safeStorage blob (header + min 31 bytes) before treating enc:v1 as ciphertext; encrypt header-only coincidences Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(credentials): address Codex P1 review on #2702 - Decode enc:v1 payloads with atob in the renderer-safe domain helper - Heal poisoned remote secrets from local/base before smart-merge so good credentials are not discarded as remote-only deletions - Keep post-merge strip so leftover enc:v1 never uploads Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(credentials): address Codex P1 CBC min and startup heal - Accept 19-byte v10/v11 CBC OSCrypt blobs (not only 31-byte GCM) - Heal poisoned remote secrets before startup smart-merge - Strip unresolved placeholders on merge round-trip upload Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sync): sanitize payloads at every apply/commit boundary Codex P1: vault apply stripped enc:v1 while commitRemoteInspection and convergent materialization could keep the poison. Sanitize merged/remote payloads before apply+base commit, strip on CRDT materialization, and sanitize convergent apply inputs. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sync): heal local and remote secrets before smart-merge Smart-merge could select a locally-changed entity whose only secret delta was enc:v1 poison, then strip and upload empty secrets. Heal both sides from the opposite payload/base before merge on all sync paths. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sync): keep enc:v1 intact during convergent materialize Stripping device-bound secrets inside materializeSyncPayloadFromConvergentState broke envelope validation for poisoned-but-consistent v2 snapshots, so decrypt could not hydrate the clouds #2702 needs to recover. Portable stripping stays at apply/upload boundaries. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(credentials): detect Windows DPAPI by decoded header bytes Real DPAPI blobs start with 01 00 00 00 d0 8c... and base64-encode as AQAAANCM..., so the previous AQAAAA string prefix rejected them and allowed double-wrapping after key rotation. Match decoded headers in both the main-process bridge and renderer predicate. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * test(credentials): use complete enc:v1 fixtures for stricter detector Short placeholders like enc:v1:djEwAAAA no longer pass the platform header + minimum-size checks. Update auth/SFTP/proxy/sync fixtures to full v10-shaped blobs so npm test matches production validation. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sync): treat preferred credential deletions as authoritative When healing enc:v1 before merge, an empty/missing secret on a present preferred entity is an intentional clear and must not be revived from base. Only fall back to base when preferred is absent or also poisoned. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(credentials): reject impossible v10/v11 ciphertext lengths Accept only CBC-aligned sizes (19+16n) or GCM-sized blobs (>=31) so coincidental enc:v1 plaintext of intermediate length is encrypted instead of treated as an undecryptable placeholder. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(credentials): require full DPAPI provider GUID signature Accept Windows safeStorage blobs only when they start with version 01 00 00 00 plus provider GUID df9d8cd0-1501-11d1-8c7a-00c04fc297eb, so coincidental 01 00 00 00 prefixes are not treated as ciphertext. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
a8bd5e0f16 |
fix(windows): 恢复无边框窗口圆角并修复托盘四角透明 (#2505) (#2767)
* fix(windows): restore frameless rounded corners and tray transparency (#2505) Windows frameless windows used a solid host backgroundColor under DWM rounding, which showed as a dark rim, while the tray popup kept the default opaque backdrop under CSS border-radius (square tips / 冒尖). Use a clear transparent host with native roundedCorners for app windows, and disable OS rounding for the CSS-shaped tray overlay. Keep html/body transparent on the tray route so corner pixels stay see-through. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(windows): require chrome helpers outside with(ctx) createMainWindowApi injects require from windowManager.cjs, so a relative require inside with(ctx) resolved to electron/bridges/windowsWindowChrome.cjs and crashed every main-window create (MODULE_NOT_FOUND). Load the helpers at module scope in each factory so paths stay file-local. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(windows): keep resizable app windows opaque Codex P2: Electron documents transparent BrowserWindows as not resizable, and enabling resizable can break them. App content windows now only set roundedCorners: true with a solid theme backdrop; the tray overlay stays transparent because it is already non-resizable. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(tray): hide opaque splash on tray overlay route Codex P2: the shared splash screen still painted an opaque full-window fill when the tray panel showed before React mounted, recreating the square-corner flash. Mark tray-window early, CSS-hide the splash, and remove the splash node on DOM ready / tray render. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(tray): defer first show until ready; keep chrome comments ASCII Wait to show the tray BrowserWindow until did-finish-load so the shared opaque splash cannot flash as a square underlay. Also rewrite the new helper file header in ASCII-only English per AGENTS.md. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(tray): cancel pending first-load show on second toggle If the user toggles the tray again while the first renderer load is still pending, clear trayPanelShowWhenReady so did-finish-load cannot open the panel after an intentional dismiss. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(tray): keep shared splash transparent by default Move the opaque splash fill behind html:not(.tray-window) so the tray overlay route never inherits a solid full-window background from the shared splash markup. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
61839acaca |
[Feature] System 面板增加 GPU / NPU 占用监控 (#2561) (#2768)
* feat(system): add GPU/NPU monitor tab when accelerators are detected Probe nvidia-smi and npu-smi during System capabilities checks and show a GPU sub-tab with utilization, memory/HBM, temperature, power, and compute processes. Reuses the existing SSH exec + parse pattern (same approach as open-source remote GPU monitors) without new dependencies. Related to #2561 Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(system): address GPU monitor Bugbot findings - Use PowerShell nvidia-smi collector for local Windows sessions - Keep GPU tab in loading state while listAccelerators is pending - Render compute processes even when device list is empty - Stop treating Ascend HBM usage rate (%) as megabytes Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(system): address Codex GPU collector review findings - Wrap POSIX accelerator script with JSON.stringify so nested sed quotes cannot break outer sh -c - Parse Ascend proc-mem whitespace-delimited table rows Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(system): show unknown GPU util/memory as -- not 0% ResourceBar now treats null/undefined as unavailable, and the GPU device cards pass through null metrics instead of coalescing to 0. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
d7b749d23f |
fix(sync): rehydrate follow-app theme and guard groupConfig wipes (#2764)
* fix(sync): rehydrate follow-app theme and guard partial groupConfig wipes Second devices were keeping the local follow-app terminal theme flag after cloud sync wrote peer appearance settings, which flickered black vs yellow. Also block uploading an empty groupConfigs list while other vault data remains so hydration races cannot clear startup-command group defaults. Fixes #2757 Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sync): narrow complete-wipe shrink guard to groupConfigs Only treat empty groupConfigs with other vault data present as suspicious. Wiping the last snippet/note/etc. while hosts remain stays a normal delete. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
a1b338414f |
fix(sftp): remove serial createReadStream bulk download path (#2761)
* fix(sftp): remove serial createReadStream bulk download path Align downloads with upload fail-closed (#2449/#2719): use concurrent isolated/shared READ fanout only, wait for the per-session fast slot, and never fall back to RTT-bound serial createReadStream. Keep hash helpers on createReadStream for verification only. * fix(sftp): harden download slot cancel and fail-closed tests Address multi-agent review: make session fast-slot wait cancel idempotent with abort restore, recheck cancel after acquire, and lock fail-closed / slot-wait cancel with condition-based waiter-depth assertions. |