mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-24 00:50:44 +00:00
4db44e2ede1996cd52f48c422fd78a34322f0d13
11
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
ea6fe18539 |
fix(vault): allow CSV import of same-endpoint hosts in different groups (#2739)
* fix(#2737): automated Cursor CLI fix * fix: address Codex review on PR #2739 * fix(vault): harden destination re-dedupe passphrase and counts Keep collapsed destination imports aligned with CSV merge policy for key passphrases, and correct plugin importer added/duplicate counters when hosts collapse into one group. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(vault): preserve SecureCRT and plugin hosts under destination group Skip endpoint collapse for SecureCRT imports, and keep plugin hosts that differ by configuration when an import destination rewrites their group. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(vault): skip plugin imports that collide after destination rewrite After rewriting imported hosts into the destination group, drop ones that now share a fingerprint with existing vault hosts. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(vault): keep group case in host merge keys Vault group paths are compared exactly, so Prod and prod must remain distinct session identities during import/create dedupe. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(vault): prune orphan credentials after destination collisions When a destination rewrite drops colliding imported hosts, also remove identities/keys that were only referenced by those skipped hosts. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(vault): only prune newly imported credentials on collision Pass existing identity/key counts into destination handling so remapped duplicates of vault credentials are never deleted when a host is skipped. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(vault): merge credential refs when collapsing destination hosts Carry identityId/telnetIdentityId/identityFileId onto the retained host so destination-group collapse does not drop referenced auth. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(vault): only graft credential refs onto bare collapsed hosts Avoid copying identityId onto a retained host that already has key or password auth, which would silently change resolveHostAuth preference. 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> |
||
|
|
8cdc887383 |
[Feature] Optimize large Vault imports and group management (#2540)
* feat(vault): optimize large imports and vault rendering (#2526) * fix(vault): address import review findings * fix(vault): preserve filtered selection and import consistency * fix(vault): complete import review fixes * fix(vault): make import cancellation concurrency-safe * fix(vault): preserve concurrent edits during import rollback * fix(vault): handle concurrent saves and reset import target * fix(vault): drop empty source groups after targeted import * fix(vault): preserve sidebar accessibility check * fix(vault): correct group counts and selection semantics * fix(vault): preserve imports across concurrent saves * fix(vault): preserve concurrent group changes during import * fix(vault): close concurrent import edge cases * fix(vault): retry rollback and enable tree keyboard selection * fix(vault): retain concurrent sources and visible selections * fix(vault): merge imported sources with persisted state * fix(vault): serialize duplicate managed imports * fix(vault): keep imports non-blocking and grouped views responsive * fix(vault): preserve concurrent managed sessions * fix(vault): preserve concurrent groups and keyboard access * fix(vault): serialize cross-window import commits * fix(vault): make import commits atomic * fix(vault): surface import rollback failures * fix(vault): recover import transactions safely * fix(vault): commit imported hosts atomically * fix(vault): preserve unfinished import recovery * fix(vault): wait for edits and preserve keyboard focus * fix(vault): protect group settings and lock fallback * fix(vault): keep virtual focus aligned * fix(vault): complete keyboard navigation semantics * fix(vault): finish keyboard navigation * fix(vault): close large-vault concurrency gaps * fix(vault): finish large-vault interaction safety * fix(vault): harden filtered large-vault flows * fix(vault): keep managed deletion atomic * fix(vault): coordinate managed file deletion * fix(vault): close cross-window managed races * fix(vault): refresh persisted managed state * fix(vault): preserve distinct imported sessions * fix(vault): keep failed progress accurate * fix(vault): keep search tree collapsible * fix(vault): close final review gaps * fix(vault): reveal filtered tree matches * fix(vault): close final review edge cases * fix(vault): preserve concurrent import changes * fix(vault): serialize all vault saves under one cross-window lock Hold the shared import lock for ordinary host/group/key writes and the full import commit path so check-then-write can no longer interleave across windows. Make the lock re-entrant in-window to avoid nested deadlocks, and announce large tree item positions for screen readers. * fix(vault): keep concurrent saves serialized and fix tree ARIA siblings Stop treating same-window concurrent work as nested lock re-entry; nested helpers skip re-acquire only when the outer critical section already owns the lock. Announce treeitem position among true siblings at each level. * fix(vault): require explicit lock handle for nested saves Independent concurrent vault writes always queue on the shared lock. Nested import/deletion helpers continue only when they pass the active lock handle from their outer critical section. * fix(vault): avoid lock deadlocks with encrypt-then-write saves Encrypt outside the shared lock and only acquire it for the final write so importers waiting on pending work cannot deadlock on lock acquisition. Retry plugin commits outside the lock when concurrent edits intervene, and rebase imports onto in-memory host edits when disk is still stale. * fix(vault): release import lock before concurrent-edit retries Drain encrypt work under the lock and full disk writes only outside it. When an import or group deletion is superseded by a concurrent edit, release the shared lock so that edit can finish, then retry. Functional group updates now base on the latest in-memory snapshot while a write is still pending. * fix(vault): tidy import dialog destination and SecureCRT prompts Move import destination settings behind a bottom-left control with its own step, and keep SecureCRT guidance in a dedicated chooser instead of inside the format tile. * test(vault): fix import dialog layout guard test under ESM * fix(vault): simplify import destination footer control Replace the heavy two-line destination card with a single quiet text link that shows the current placement choice. * fix(vault): simplify import destination settings page Drop the nested card and duplicate headings. Show only the three placement choices, finish immediately for preserve, and keep Done only when a group name is needed. * fix(vault): simplify SecureCRT chooser and iconify destination options Remove redundant SecureCRT prompt copy while keeping the two source cards with icons. Add small folder icons to the import-location choices so that page is less plain. * fix(vault): use SecureCRT logo in import chooser header * fix(vault): drop border around SecureCRT import logo * fix(vault): clarify import location footer with icon and label Show a folder icon plus "Import location · current choice" so the control is recognizable without becoming a heavy card again. * fix(vault): remove border from import progress status icon |
||
|
|
495a852b77 |
Support key authentication in host CSV import/export (#2354)
* Support key auth in host CSV files * Harden CSV key credential imports * Resolve CSV credential review findings * Keep CSV credential previews non-destructive * Align CSV credential preview and import * Preserve CSV credential conflicts across aliases * Deduplicate CSV import warnings * Export referenced key file paths in host CSV * Protect imported key passphrases * Preserve aliased CSV key conflicts * fix CSV key credential safety * preserve legacy saved key passphrases * export matching saved key passphrases safely |
||
|
|
d1b8d97c0c | fix: allow explicit MobaXterm import encoding | ||
|
|
783c45801b | handle ambiguous MobaXterm Chinese text | ||
|
|
aa2cb79c9e | fix MobaXterm Chinese import encoding | ||
|
|
9aed2c41d4 |
feat(ai): unify capability registry, harness tools, and agent runtime (#1685)
* feat(ai): unify capability registry, harness tools, and agent runtime Centralize MCP/CLI/Catty tool surfaces in the capability catalog with codegen, move Catty-only harness tools into catalog with local execution, converge mcpServerBridge builtin dispatch via registry, and wire AgentRuntime with vault bridge, permission grants, and Round 2 catalog parity. Co-authored-by: Cursor <cursoragent@cursor.com> * feat(ai): vault host tools, artifact cards, and external agent vault guidance Unify vault host create/import with capability RPC routing, add chat artifact cards with Vault navigation, and align external MCP agents with Catty rules so host creation never falls back to Vault Notes. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ai): address Bugbot findings for streaming, vault bridge, and grants Clear Catty streaming by chat sessionId, read latest vault state via getters on agent mutations, and stack grant persisters so unmounting one AI panel does not break others. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(vault): clear pending openNoteId after chat navigation focus NotesManager notifies VaultView once the one-shot openNoteId request is applied so the id does not stick for the rest of the session. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(vault): serialize vault agent IPC mutations to prevent lost writes Queue vault agent bridge handlers so concurrent hosts.create or note.create tool calls cannot overwrite each other via stale read-modify-write snapshots. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(vault): keep synchronous vault snapshot for agent IPC reads Mirror hosts, notes, and groups in a ref updated immediately on agent writes so serialized mutations see the latest state before React re-renders. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ai): sync Catty MCP sessions and defer runtime cleanup on delete Register terminal sessions with the main process before Catty tool calls, and clear ToolOutputStore only after stopping an active turn when deleting a chat session. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ai): avoid deleting a newer abort controller on late stop Only remove the session abort-controller entry when stop finishes if it still refers to the controller that was stopped. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ai): sync vault snapshot on render and await active turn on stop Refresh vault agent reads when React props change without clobbering in-flight agent writes, and wait for runTurn to finish before clearing ToolOutputStore on session delete. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ai): reload permission grants from storage before auto-approve Re-read persisted grant rules on each approval check so revocations in Settings take effect without requiring a chat hook remount. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ai): sync permission grants to main process immediately on write Push MCP permissionGrantsSnapshot as soon as Always allow persists a rule so the next tool call in the same agent turn sees the grant without waiting for useEffect. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
a493fbfea8 |
Add Markdown import and code block copy to vault notes.
Support bulk .md/.txt import into the current notebook folder and add hover copy buttons on note code blocks in edit and preview modes. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
5e00e998a8 | Add vault drag reorder ordering (#1407) | ||
|
|
1fec5925eb | Refactor large modules and fix runtime errors (#1136) |