mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-17 13:01:24 +00:00
daa1d50d82cb074607d92e26e4e2bb7dda9bdf59
66
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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. |
||
|
|
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
|
||
|
|
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> |
||
|
|
69df81613b |
fix(sftp): keep filter input IME-safe during CJK composition (#2746)
* fix(#2745): automated Cursor CLI fix * fix(sftp): reset IME composing guard when filter bar closes If the filter input unmounts mid-composition (filter bar toggled closed), compositionend never fires, leaving filterComposingRef stuck at true and blocking every later onSetFilter commit. Clear the guard when the bar hides. Also drop the now-unused startTransition prop from the toolbar (its only use was the removed deferred filter path). Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): resync filter draft to committed filter when bar closes Resetting only the composing guard left filterDraft diverged from pane.filter when the bar closed mid-composition, so reopening showed stale uncommitted text. Resync the draft to pane.filter on close. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): clear IME composing guard in commitFilterValue Centralize the guard reset so every commit/clear path (composition end, Escape, inline clear button, close button) finalizes the IME session. The inline clear previously left filterComposingRef stuck true, blocking later onChange commits and letting a delayed compositionend undo the clear. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): honor external filter change over stale draft on composition end If navigation (e.g. follow-terminal-CWD) clears pane.filter mid-composition, onCompositionEnd previously re-committed the stale composed draft, overwriting the navigation-clear invariant. Capture pane.filter at composition start and adopt any external change on end instead of committing the stale draft. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(sftp): supersede IME composition when navigation clears filter Navigation can clear pane.filter mid-CJK composition. Adopt that external clear into the draft while composing, arm a supersede latch so the common post-compositionend onChange cannot re-commit the stale draft, and reset composing/supersede state when the filter bar unmounts or a commit path runs. * fix(sftp): supersede IME filter draft when path navigates When the committed filter was already empty before composition, directory navigation sets filter to "" again so pane.filter does not change. Track path at composition start and supersede the draft when the path changes so compositionend cannot re-commit stale IME text. * fix: address Codex review on PR #2746 * fix(sftp): clear IME supersede latch if no post-change arrives After compositionend arms the supersede latch, schedule a macrotask fallback clear so ordinary keystrokes work when the browser never fires the post-composition onChange that would clear it. * fix: use ASCII punctuation in PR comments and tests Replace em dashes with ASCII hyphens in comments/tests. Keep the guarded setTimeout supersede-latch clear from the prior IME fix. --------- 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> Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com> |
||
|
|
2ea5efacba |
fix(plugins): address residual Codex sync secret and backup gaps (#2748)
* fix(plugins): address residual Codex sync secret and backup gaps Retain provider→plugin secret bindings so disconnect can wipe credentials after a plugin is disabled, keep overwritten secrets on failed reconnect, and snapshot live-empty sidecars in protective backups. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(plugins): restore overwritten sync secrets on rejected reconnect Stash prior plaintext and SecretRef id on overwrite, restore them when connect fails, and discard the stash after a successful reconnect so saved provider credentials keep resolving. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(plugins): make sync secret overwrite stash opt-in Only the syncPutSecret path stashes prior plaintext/SecretRef so ordinary secrets.set overwrites do not leave credentials in process memory. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(plugins): host-own sync provider bindings and clear failed stashes Move provider→plugin bindings into a dedicated DB table outside plugin-writable secrets, validate provider namespace ownership, and drop overwrite stashes when replacement writes fail. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(plugins): keep overwrite stash until restore write succeeds Only drop the prior plaintext after encrypt+upsert succeeds so a failed restore can still retry and recover the saved SecretRef. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(plugins): preserve overwrite stash across retries and prefix deletes Do not replace an existing restore stash on later puts, and clear matching stash entries when deleteByKeyPrefix wipes sync credentials on disconnect. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> |
||
|
|
13fa68a720 |
feat(plugins): add sync providers and encrypted sidecar sync (#2713)
* feat(plugins): add sync providers and encrypted sidecar sync
Implement PR 8 of the plugin platform (#2269): namespaced sync Providers
with provider.sync, encrypted-object storage operations, WebDAV through the
shared storage surface, dynamic cloud provider IDs, and non-cascade sidecars
for sync:true plugin settings plus account/CRDT baselines.
Related to #2269
* fix(plugins): wire sync providers and sidecars into production paths
Close PR 8 integration gaps: dynamic plugin provider registry and
getConnectedAdapter createPluginStorage, WebDAV through EncryptedObjectStorage,
cloud payload collect/apply for pluginSidecars, and IPC/preload bridges.
Related to #2269
* fix(plugins): preserve WebDAV auth reuse and resourceId through EOS wrap
encryptedObjectStorageAsCloudAdapter now reports initiallyAuthenticated when
config exists (matching raw WebDAVAdapter) so getConnectedAdapter reuses the
cached instance, and preserves/refreshes resourceId from the backing adapter
instead of always forcing the default object key.
Related to #2269
* fix(plugins): address Codex PR 8 review findings
Carry pluginSidecars through merge/convergent uploads, lazy-connect before
object I/O with revision-aware writes, fail closed on sidecar collect errors,
expose connectPluginProvider, preserve remote timestamps, and drop deleted
installed-plugin settings from collection.
Related to #2269
* fix(plugins): close remaining Codex P1/P2 sync issues
Lazy stream cancel for inline sync reads, must-not-exist conditional writes,
three-way sidecar merge for local resets, validated apply path for settings,
and merge remote sidecars into convergent uploads.
Related to #2269
* fix(plugins): harden sidecar collect/apply and write verification
Preserve last-known sidecars when the host is offline, apply remote
deletions for installed plugins, force convergent upload on sidecar
divergence, verify plugin object writes, and pick plugin providers in
auto-sync startup checks.
Related to #2269
* fix(plugins): close remaining Codex sidecar/sync path gaps
Include sidecars in auto-sync payload and hash, keep explicit empty bundles,
fail apply when host is offline, require getCapabilities, and carry merged
sidecars into convergent local apply/upload decisions.
Related to #2269
* fix(plugins): close Codex P1 sidecar collect/apply/merge gaps
Treat null host responses as unavailable, persist collected settings into
the non-cascade table, retain decoded convergent payloads, use three-way
sidecar merge for deletions, and fail apply only on operational errors.
Also treat non-empty plugin sidecars as meaningful sync data and re-run
auto-sync when plugin contributions change.
Related to #2269
* fix(plugins): close remaining Codex P1 sidecar and provider gaps
Replay offline-cached sidecars before collect, keep explicit empty
sidecar fields after three-way merge, thread sidecars through convergent
conflict/downgrade materialization, keep gated-off plugin providers from
joining sync as connected, and rebind plugin EOS sessions after runtime
replacement.
Related to #2269
* fix(plugins): separate pending remote sidecars from last-known cache
Replay only host-offline remote applies into the DB, keep last-known as
upload fallback, use contribution reset for deleted settings, probe real
plugin host readiness, rebind storage events for plugin providers, clear
plugin bases on reset, and swallow disconnect rejections.
Related to #2269
* fix(plugins): hydrate retained sidecars and gate missing providers
Materialize installed-plugin settings from retained sidecars before
collect pruning, clear sidecars on setting reset, fail closed when
pending remote replay fails, and only restore plugin providers that are
contribution-available. Also initialize dynamic provider counters on
connect.
Related to #2269
* fix(plugins): surface plugin sync providers and preserve conflict sidecars
Collect live sidecars before convergent conflict apply/upload, include
dynamic providers in status and disconnect paths, and list plugin sync
providers in Cloud Sync settings for connect/disconnect.
Related to #2269
* fix(plugins): per-provider sidecar baselines and safer collect/UI
Merge convergent sidecars against each provider's own baseline, keep
retained settings in sidecars without unvalidated plugin_settings writes,
guard isConnectDisabled for never-connected plugins, and fall back plugin
provider labels/icons in the status popup.
Related to #2269
* fix(plugins): correct plugin provider discovery and sidecar reverify
Read nested contribution metadata for sync provider cards, gate empty-config
connects, enforce single-provider disconnect for plugins, and re-verify after
sidecar-only convergent uploads so baselines track the post-write payload.
Related to #2269
* fix(plugins): refresh sync provider availability from live contributions
Replace the contribution-available provider ID set when plugins change so
disabled or uninstalled sync providers leave the auto-sync ready set and
drop to disconnected with config retained.
Related to #2269
* fix(plugins): preserve sidecars in backups, pending queue, and migration
Attach last-known plugin sidecars to protective local vault backups, fail
operationally when pending/last-known storage writes are rejected, carry
sidecars through convergent migration publish, and reject trailing garbage
on encrypted object parse.
Related to #2269
* fix(plugins): abort conflict collect failures and merge migration sidecars
Rethrow operational sidecar collection errors during convergent conflict
resolution, LWW-union all local/provider sidecars during convergent
migration, re-collect last-known after apply, and prefer live host collect
for protective local vault backups.
Related to #2269
* fix(plugins): restore pluginBridge tests, fix import path, union downgrade sidecars
Correct SettingsSyncTab dynamic import path so production builds resolve,
add ipcMain.on to the plugin bridge test double, union all provider
sidecars on convergent downgrade, keep empty last-known resets, and skip
force-delete when contribution reset validation rejects.
Related to #2269
* fix(plugins): abort backup collect failures and honor empty remote wipes
Only fall back to last-known sidecars when the host is unavailable during
protective backups, treat explicit empty remote sidecar bundles as
authoritative wipes, remove lint-blocking anys from harness tests, and
use a stable equal-timestamp sidecar tie-break.
Related to #2269
* fix(plugins): include sidecars in equality, preserve merge base on reconnect
Compare pluginSidecars in cloudSyncPayloadsEqual for migration freshness,
clear plugin merge state only when account/resource changes on reconnect,
cancel accepted sync read streams on failure, and stop re-connecting the
plugin EOS adapter on every I/O.
Related to #2269
* fix(plugins): drop cached adapters on contribution refresh
Invalidate plugin sync adapters when live contributions change so a
restarted runtime gets a fresh connect, take offline any non-disconnected
missing providers, and latch version-change backups only after cancellation
checks pass.
Related to #2269
* fix(plugins): preserve omitted sidecars and hydrate on plugin enable
Treat missing pluginSidecars as legacy/unsupported in three-way merge
(only explicit empty is a wipe), hydrate retained settings when a plugin
enables, and re-enable retained provider configs when contributions return.
Related to #2269
* fix(plugins): keep newer retained sidecars over older stored settings
When collection merges existing sidecars with plugin_settings rows, prefer
the newer updatedAt so a schema-rejected remote value retained only in
the sidecar table is not overwritten by a stale local setting.
Related to #2269
* fix(plugins): seal plugin provider config and clear base on config change
Encrypt opaque plugin provider configuration before persistence, clear
merge state when reconnect configuration changes, and stream sync objects
below a base64-safe inline threshold so control-plane JSON stays in budget.
Related to #2269
* fix(plugins): seal plugin configs by provider id and hydrate before start
Encrypt plugin provider configuration only for non-builtin provider IDs
so field-name collisions cannot skip sealing, hydrate retained sidecars
before plugin enable starts the runtime, and stop tearing down live
adapters on no-op availability refreshes.
Related to #2269
* fix(plugins): seal scalar configs, safe inline reads, stable config fingerprint
Encrypt any non-builtin plugin configuration JSON shape, enforce the
base64-safe inline read cutoff, and compare reconnect configurations with
order-independent fingerprints so merge bases are not cleared spuriously.
Related to #2269
* fix(plugins): thread sync credentials and harden availability checks
Pass SyncConnectPayload.credential through the object-storage and IPC host
path, treat only null/undefined config as missing, and avoid wiping the
plugin provider availability catalog on transient discovery failures.
Related to #2269
* fix(plugins): unblock schema-required sync connect and scalar configs
Add a JSON config dialog for plugin sync providers that declare a
required configurationSchema, reuse retained configs on reconnect, and
treat falsy scalar configs as present in readiness and adapter lookup.
Related to #2269
* fix(plugins): rebind sync adapters on contribution refresh
Drop cached plugin sync adapters when live contributions still include
the provider so replaced runtimes get a fresh connect, and seal falsy
scalar plugin configs with nullish presence checks end-to-end.
Related to #2269
* fix(plugins): apply sidecars under current declared setting scopes
When a plugin update changes a syncable setting scope, write under the
live declaration and drop the obsolete scope row so collection does not
republish duplicates.
Related to #2269
* fix(plugins): seal config envelopes and stabilize provider counters
Use an unambiguous host-owned sealed-config envelope, initialize
dynamic-provider sequence counters before cross-window decrypt, keep
three-way sidecar deletions during convergent migration, and create the
sidecar table for existing schema-1 plugin databases.
Related to #2269
* fix(plugins): avoid mid-sync adapter drops and sidecar resurrection
Keep plugin adapters across setting-only contribution refreshes and
rebind sessions on ensureConnected; stop preserving local-only missing
plugin sidecars when remote already mentions the plugin; compare configs
with nullish semantics across windows; swallow quick-connect failures
after toasting.
Related to #2269
* fix(plugins): restore remoteKeys for installed sidecar resets
Reintroduce the remote key set used when dropping installed-plugin
settings the remote no longer carries so applyFromSync cannot throw
after replacing the sidecar table.
Related to #2269
* fix(plugins): honor conflict policy and re-key scoped sidecars
Pass preferCloud/preferLocal into three-way sidecar merge, use
per-provider baselines on convergent downgrade so local resets are not
resurrected, and re-key applied settings under the current declared
scope coordinates.
Related to #2269
* fix(plugins): keep strategy on final sidecar merge and block dual legacy
Pass preferCloud/preferLocal through the final verified sidecar merge,
avoid auto-reactivating a retained plugin while another legacy provider
is already connected, cache plugin adapters only after initializeSync,
and preserve explicit null configuration values.
Related to #2269
* fix(plugins): strip plugin avatars and protect last-known sidecars
Do not load plugin-supplied avatar URLs in the main renderer, and avoid
overwriting last-known sidecars with an unmerged remote bundle when the
post-apply collect fails or is non-authoritative.
Related to #2269
* fix(plugins): strip top-bar plugin avatars and stop always-rebind
Hide plugin avatar URLs in the sync status popover, drop always-on
rebindSession for plugin adapters, and read convergent mode from the
local config module when deciding whether to auto-reactivate providers.
Related to #2269
* fix(plugins): use window.netcatty for sync IPC and allow null configs
Read plugin sync and sidecar APIs from the production preload global,
and treat an explicit config property (including JSON null) as present
for readiness and adapter lookup.
Related to #2269
* fix(plugins): close residual Codex P2 sync edge cases
Three-way merge sidecars during v2 convergent migration so local
resets are not resurrected, preserve explicit null plugin configs on
adapter rebuild, rebind EOS sessions after I/O failure for replaced
runtimes, and accept the public inlineObjectBytes limit on readObject.
Related to #2269
* fix(plugins): keep inline read cutoff under control-plane budget
Restore the base64-safe inline cutoff so advertised-size reads cannot
overflow the 128 KiB provider JSON envelope; providers near the public
inlineObjectBytes limit must stream.
Related to #2269
* fix(plugins): harden sidecar empty-vault, hydrate LWW, and credential seals
Close remaining Codex/review gaps for PR8: keep empty sidecar shells from
bypassing upload guards, skip startup hydrate when local settings are newer,
seal/validate durable plugin credential refs, and cover schema 1→2 migration.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(plugins): rebind plugin sync sessions and keep null configs
Address Codex P2 on
|
||
|
|
ea3642cb56 |
fix(#2743): automated Cursor CLI fix (#2744)
Co-authored-by: netcatty-bot <308658023+netcatty-bot@users.noreply.github.com> |
||
|
|
857429f6dc |
fix(terminal): show server name in host info bar (#2732)
* fix(#2708): automated Cursor CLI fix * fix(terminal): let host info bar show label or address Avoid concatenating both into the toolbar; add a setting so users pick vault label or connection address, with the other kept in the tooltip. 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> |
||
|
|
83e0e98795 |
feat(terminal): auto-upload clipboard images on paste (remote sessions, opt-in setting) (#2676)
* feat(terminal): 粘贴时自动上传剪贴板图片(远程会话,设置项控制) - 新增设置项 autoUploadClipboardImageOnPaste(默认关闭):剪贴板含图片时,远程 SSH 会话中粘贴自动通过 SFTP 上传图片到远端 .netcatty-paste-images/ 并输入远端路径,无图则回退普通文本粘贴 - terminalClipboardPaste.ts:图片检查优先于本地文件/文本粘贴;上传失败上报错误提示,不上传时静默回退 - 统一四路粘贴入口:右键/中键(onPaste)、DOM paste 事件(useTerminalFilePaste)、绑定快捷键(createXTermRuntime case "paste") - TerminalBehaviorSettings.tsx 新增设置开关,i18n 补齐 en/ru/zh-CN/zh-TW - syncPayload.ts 设置同步白名单加入新字段 - 测试:terminalClipboardPaste.test.ts 新增 4 个用例(上传/回退/失败上报/本地不受影响) Author: yangheng Model: 42865985-ead4-417f-88a9-12012a3495fe/deepseek-v4-flash * fix(terminal): 剪贴板图片上传异常时上报错误而非静默回退 - clipboardImagePaste.ts:readClipboardImage 抛错视为 no-image(读图失败与空剪贴板无法区分,可安全回退普通粘贴) - terminalClipboardPaste.ts:确认剪贴板有图后上传流程抛异常(如 SFTP 无法打开)→ 上报 upload-failed 错误并停止,与右键菜单路径一致,不再静默粘贴无关剪贴板内容 - 测试:新增「上传抛异常 → 上报 upload-failed 且不粘贴」「读图失败 → no-image」2 个用例,18/18 通过 Author: yangheng Model: 42865985-ead4-417f-88a9-12012a3495fe/deepseek-v4-flash --------- Co-authored-by: yangheng <492238647@qq.com> |
||
|
|
56bef275f5 | fix(settings): converge terminal font size updates | ||
|
|
c6313b8b02 | fix(#2689): automated Cursor CLI fix | ||
|
|
8d2fa19530 |
feat(terminal): add setting to show context menu over fullscreen apps
Add an opt-in "Show menu over fullscreen apps" terminal setting (showContextMenuOverFullscreenApps, default off). When enabled, the right-click context menu opens even while a fullscreen app (tmux, vim, less) holds mouse tracking, instead of the click being passed through to the app. Threaded via a new forceMenuInAlternateScreen flag through the shouldSuppressMouseTrackingContextMenu predicate (single source of truth) and its callers. Default off keeps current behavior unchanged; Shift+ Right-Click still works as the escape hatch when off. - domain/models/terminal.ts: new field + default false - application/syncPayload.ts: include key in synced terminal settings - TerminalContextMenu.tsx: forceMenuInAlternateScreen through predicates + prop - TerminalView.tsx: wire setting to prop - TerminalBehaviorSettings.tsx: toggle row - i18n en/ru/zh-CN/zh-TW: label + description - TerminalContextMenu.test.ts: coverage for the opt-out |
||
|
|
c74cbd4874 | fix(#2639): automated Cursor CLI fix | ||
|
|
1fefb7b1d7 | fix(#2595): automated Cursor CLI fix | ||
|
|
fc7287e328 |
feat(terminal): render Kitty/SIXEL/iTerm inline images
Load @xterm/addon-image in the shared xterm runtime so remote programs can draw real raster images (kitten icat, chafa --format kitty, image previews in file managers and TUIs) instead of ANSI approximations. - domain/terminalInlineImages.ts owns the limits and turns TerminalSettings into addon options; disabled settings resolve to null so the addon is not loaded at all and the terminal keeps advertising no graphics capability. - The addon is loaded right after term.open, before the WebGL renderer, so it patches IRenderService.setRenderer first and its canvas layers survive every DOM <-> WebGL swap (deferred WebGL, soft-hide suspend, context-loss rebuild). It is disposed before term.dispose so bitmaps never outlive their terminal. - Hibernate restores a tab from a text-only snapshot, which cannot carry image data. XTermRuntime.hasInlineImages reads the live image cache, and Terminal degrades such a session to soft-hide: hibernateRuntime takes the soft-hide branch, canFinishHibernate re-checks after every async step, and an eviction request leaves the session soft-hidden. The block lifts by itself once the cache is emptied by a terminal reset or FIFO eviction. - Settings > Terminal > Inline Images exposes the master switch, per-protocol switches (Kitty / SIXEL / iTerm IIP) and the memory limits, translated for en, zh-CN, zh-TW and ru. Protocol switches cloud-sync; the memory limits stay local like the other per-device renderer tuning. Co-authored-by: Wine Fox <fox@ling.plus> |
||
|
|
34c4efb225 |
feat(terminal): add exit auto-close setting (#2394)
* feat: add terminal exit auto-close setting * fix: sync terminal auto-close preference * fix: reveal kept popup after clean exit * fix: use latest terminal exit handler * test: include terminal behavior coverage * fix: reveal all kept command popups |
||
|
|
bdfb6a04fa |
fix(terminal): disable incomplete Kitty keyboard negotiation by default (#2382)
* fix(terminal): disable incomplete Kitty keyboard negotiation by default * fix(terminal): present Kitty keyboard setting normally --------- Co-authored-by: Bowen <878882730@qq.com> Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com> |
||
|
|
6e55d2d498 |
feat(sync): add convergent sync migration (#2254)
* feat(sync): add convergent sync migration * fix(sync): address convergent migration review * fix(sync): normalize CRDT payload entities * fix(sync): invalidate stale provider baselines * fix(sync): harden convergent migration recovery * fix(sync): close migration concurrency gaps * fix(sync): guard seeded provider shrink * fix(sync): preserve undefined legacy fields * fix(sync): guard legacy v2 migration shrink * fix(sync): harden migration apply transaction * fix(sync): reject locked migration initialization * fix(sync): block unbased divergent v1 migration |
||
|
|
dd135ff568 |
feat(vault): optional select-before-connect host click behavior (#2116)
Add a Settings > Appearance vault option that defaults to single-click connect, but can switch to select-then-click-again to connect. Grid mode shows an accent ring on focus; list/tree reuse the hover fill. Groups follow the same pattern when the option is enabled. |
||
|
|
42f2905063 |
feat(terminal): add normalizeTextOnCopy setting for selection cleanup
Expose Settings > Terminal > Normalize terminal text on copy (default on). When off, all copy paths use raw xterm getSelection(); when on, strip display padding and join soft wraps as before. |
||
|
|
1520040b6e |
Add option to hide terminal host information bar (#2125)
* Add option to hide terminal host info bar * Preserve terminal actions and sync preference * Make hidden terminal actions accessible * Fix compact terminal action toggle * Keep compact action menus accessible * Preserve focus for compact terminal actions |
||
|
|
b18f2bc447 |
feat: support Shift+Enter terminal newlines (#2005)
* feat: support Shift+Enter terminal newlines * fix: harden Shift+Enter terminal handling * fix: echo serial Shift+Enter newlines |
||
|
|
90b6e514ef | Address terminal side panel auto-open review feedback | ||
|
|
05231d3fba | Add terminal side panel auto-open setting | ||
|
|
0c8370477c | Unify AI permission auto mode (#1688) | ||
|
|
f191a9b449 |
fix terminal dynamic tab title settings
Add a global dynamic tab title mode, default to agent-only titles, remove the per-host disable control, and keep terminal UI refresh paths in sync with the setting. |
||
|
|
cff74b6e49 | polish terminal and settings UI | ||
|
|
b74b5a442a |
[codex] Add vault notes markdown workspace (#1558)
* Add vault notes markdown workspace * Improve notes tree drag interactions * Harden notes tree move behavior * Refine vault notes interactions * Address vault notes review feedback * Tighten notes tree review fixes |
||
|
|
982569532c |
Sync AI API keys across devices
Sync AI API keys through cloud sync while keeping device-local external tool paths local. Also preserves local AI keys in backups and stops sync if a local encrypted key cannot be read. |
||
|
|
05b713ab18 |
[codex] Add configurable middle-click terminal behavior (#1443)
* Add configurable middle-click terminal behavior * Fix middle-click terminal behavior edge cases |
||
|
|
4459aa4ef3 |
Add terminal zoom disable setting
Adds a Shortcuts setting to disable terminal zoom shortcuts. |
||
|
|
64a6986d01 |
Sync terminal selection AI preference (#1441)
Syncs the terminal selection Add to Conversation preference with AI settings so cloud sync, local backups, restores, and settings-only auto-sync detect the value. Follow-up for #1436. |
||
|
|
1ebcd017bd | Make terminal timestamps per-host | ||
|
|
36267717ac |
feat(terminal): add system manager side panel for processes, tmux, and Docker
Introduce workspace-aware System side panel with remote process/tmux/Docker management, terminal popup for interactive attach, capability warmup, review-hardened IPC, performance optimizations, toast action errors, and SSH channel recovery on reconnect. |
||
|
|
c0efc9d5c1 |
feat(ai): add quick messages with slash command picker (#691)
Closes #691 |
||
|
|
14fe1e3ecb |
feat(shortcuts): add option to skip pinned tabs for number keys
Fixes #1375 by letting Cmd/Ctrl+[1...9] target only work tabs when enabled, while keeping the existing Terminus-style default. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
037b85bd66 |
fix(ui): smooth work-tab chrome transitions and split-pane autocomplete
Replace immersive instant-switch with animated active chrome theme sync so top tabs match terminal sessions immediately on tab click, and clamp autocomplete popups to the active pane so they stay anchored to the cursor in split workspaces. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
4b5993cad6 | fix host sidebar behavior for editor tabs (#1348) | ||
|
|
b1f930a995 |
feat(sftp): 侧栏 SFTP 增加追随终端目录模式 (#1266) (#1310)
* feat(sftp): add follow terminal directory mode for sidebar (#1266) Add a toolbar toggle that keeps the side-panel SFTP browser synced with the linked SSH terminal cwd, inspired by MobaXterm's follow-folder behavior. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(sftp): probe pwd after commands when follow mode lacks OSC 7 Add a deferred getSessionPwd fallback after terminal commands when follow-terminal-cwd is enabled and the shell did not report OSC 7, and fix settings sync hook dependencies. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(sftp): repair follow toggle UI and backend cwd sync fallback Fix SftpPaneView memo skipping follow prop updates, probe fresh pwd when OSC 7 is missing, and broaden linked terminal session resolution for sidebar follow mode. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(sftp): harden follow sync after review findings Reuse shouldFollowTerminalCwdNavigate in production path, re-read connection after async cwd probe, skip redundant navigate on toggle, and only probe pwd when the SFTP side panel is open. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
7d30b19421 | Harden timestamp edge cases | ||
|
|
e3f68e1a3f |
[codex] fix cloud sync master key refresh (#1175)
* fix cloud sync master key refresh * Protect first sync from default settings * Avoid recovery prompt for settings-only sync * Cancel stale syncs after master key changes |
||
|
|
53d3e05bb4 |
Per-agent provider switcher chip in the Catty Agent chat input (#1107)
* feat(ai): provider switcher chip in the Catty Agent chat input Catty Agent currently has no model chip in the chat input — modelPresets is empty for the catty agentId so `hasModelPicker` is false. The provider/model the chat ends up using comes from the global `activeProviderId` / `activeModelId`, which means switching providers requires opening Settings → AI → Providers. Closes the gap surfaced in the original feedback on #1101 (problem 2) and partially addresses #986 (per-context model switching) by going per-agent. State layer adds an `agentProviderMap` (`Record<agentId, providerId>`) alongside the existing `agentModelMap`. Both are written together when the user picks from the new dropdown; together they form a per-agent override that beats the global active provider/model when set. Cross- window sync mirrors the agentModelMap pattern. ChatInput grows a `providerSwitcher` prop carrying the enabled ProviderConfigs, the selected (providerId, modelId), and an onSelect callback. When supplied, the model chip switches from the Cpu glyph to the provider's ProviderIconBadge + `providerName · modelId`, and the popover renders a two-column layout — providers on the left (icon + name + default model caption), that provider's known model(s) on the right. ACP agents (Claude/Codex) are untouched because they plumb their provider through the CLI, not the Vercel AI SDK. AIChatSidePanel resolves `effectiveActiveProvider` / `effectiveActiveModelId` for the catty agent from the per-agent map, falling back to the global selection. handleSend now passes those through to sendToCattyAgent so a provider picked in one Catty session applies everywhere Catty runs. For v1, each provider's right column shows just its configured `defaultModel`. The two-level structure is in place to absorb richer listings (cached /models, manual additions) later without UI surgery — left a note in the popover code. Refs #1101, #986. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * polish(ai): flatten provider picker to a single list Two-level dropdown was theatre — each ProviderConfig exposes exactly one model (its `defaultModel`), so the right column ended up showing the same string already captioned on the left row. Picking a provider implicitly picks its model; one click is enough. Also drops the `p.enabled !== false` filter on the picker list. The user's expectation, confirmed by feedback on the first cut, is that the chat-input list mirrors what Settings → AI → Providers shows. The per-provider `enabled` toggle is an "active-ish" flag, not a visibility gate; hiding disabled providers in the picker silently made everything but the one currently active disappear, which is what the reviewer hit. Pares the popover down to a vertical list — provider icon + name + default-model caption (mono if set, italic "configure default model" hint if not) + a Check on the bound row. Removes the `hoveredProviderId` state along with the right-column rendering since it's no longer driving anything. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * polish(ai): tune provider icon sizes in the chat input Chip icon was sitting at sm (20px badge) and crowded the h-6 toolbar chip alongside the truncated label; popover rows used the same sm, so nothing differentiated the picker from the chip visually. Adds an xs size to ProviderIconBadge (16px badge, 10px glyph, 9px letter fallback) and uses it on the chip. Popover rows step up to md (32px badge, 16px glyph) and the row padding grows accordingly so the larger brand mark has room to breathe — the picker now reads like a list of choices, the chip reads like a status line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ai): keep per-agent override honest in model fallback + chip label Two codex P1/P2 findings on #1107: P1 — When Catty has a per-agent provider override but no per-agent model (agentModelMap['catty'] empty), cattyAgentModelId fell through to the global `activeModelId`. That id belongs to whichever provider was globally active, not the one Catty is now bound to, so e.g. overriding to DeepSeek without a defaultModel happily sent gpt-4o (global) to DeepSeek and produced a wrong-model error. The fallback is now: stored agent model → override provider's defaultModel → empty. Only the no-override path keeps the activeModelId tail; the no-provider send guard catches the empty case for everyone else. P2 — ChatInput's selectedSwitcherProvider used `?? providers[0]` so the chip always displayed *some* provider even when none was actually bound (selectedProviderId missing). The rest of the pipeline (send guard, agentProviderMap) treats that as "no provider", so the chip was lying. Dropped the fallback; when nothing is bound the chip now shows a generic Cpu glyph + "Select provider" label until the user picks one from the popover. Adds `ai.chat.selectProvider` in en / zh-CN / ru. Refs codex review on #1107. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ai): purge per-agent binding when the bound provider is deleted Codex local review (round 2) flagged that a saved Catty model id could outlive its provider. The chain: - catty bound to provider A (DeepSeek): agentProviderMap['catty']='A', agentModelMap['catty']='deepseek-v4-flash' - user deletes provider A - cattyAgentProvider falls back to the global active provider (B, OpenAI) - cattyAgentModelId still returned the saved 'deepseek-v4-flash' - send dispatched the DeepSeek model id to OpenAI → wrong-model error Two layers of fix: 1. **Defensive resolution** (AIChatSidePanel) — cattyAgentModelId now looks at the override provider before trusting the stored model id. If the override is stale (provider deleted), the stored model id is treated as orphan and the resolution falls back to the global active selection just like cattyAgentProvider already does. 2. **Cleanup on remove** (useAIState.removeProvider) — when a provider is deleted, any agent whose agentProviderMap entry pointed at it gets both maps cleared (provider override + saved model). Same rationale: that model id is now meaningless against every other provider. Mirrors the existing activeProviderId cleanup. Adds a small agentProviderMapRef so removeProvider can snapshot which agents to clean up without relying on the captured-at-callback-create state (which would be stale). Refs codex local review on #1107. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ai): include agentProviderMap in settings sync + block empty-model send Codex local review (round 3) found two issues: P2 — `agentProviderMap` was missing from the cross-device sync surface. Added it to the sync key list, the build path, the apply path, and the SyncPayload type alongside the existing `agentModelMap`. Sync tests in `syncPayload.test.ts` now cover the new field on both the build and apply sides. P2 — Provider rows with no `defaultModel` were still clickable in the chat-input picker, so selecting one would save a binding with empty model id; the send path then dispatched an empty model name and the SDK would surface a vague backend error. Two changes: 1. ChatInput disables the row (\`disabled\`, \`aria-disabled\`, dimmed styling, tooltip pointing the user to Settings) when the provider has no \`defaultModel\`. Click is suppressed. 2. AIChatSidePanel \`handleSend\` adds a model-required guard mirroring the existing no-provider guard — surfaces \`ai.chat.noProviderModel\` as an assistant message. Catches stale bindings (e.g. user edited the provider's \`defaultModel\` to empty after binding) before they reach the SDK. Refs codex local review on #1107. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ai): trim whitespace-only model ids + reconcile orphan bindings on sync Codex local review (round 4) found two more leaks: P2 — Whitespace-only `defaultModel` passed the picker's `disabled` gate (which trims) but every other layer (cattyAgentModelId resolution, the send-guard `!sendActiveModelId` check, the SDK call) compared the raw string. A provider whose default model was " " could still reach the SDK and surface a vague backend error. Normalized: trim at the resolution boundary (catty model fallback chain) and trim before the send-guard's existence check. P2 — Sync apply did not reconcile per-agent bindings against the incoming provider set. A payload could change `providers` without shipping a fresh `agentProviderMap`, leaving local overrides pointing to provider ids the synced set no longer includes — the same ghost- binding bug that `removeProvider` already handles for explicit user deletes. Added `pruneOrphanPerAgentBindings()` that runs after every AI settings apply: it walks `agentProviderMap`, drops any entry whose provider id isn't in the current `providers` list, and clears the saved model id for those agents alongside it (mirroring removeProvider cleanup). A new test in `syncPayload.test.ts` exercises the ghost- binding case end-to-end. Refs codex local review on #1107. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ai): notify open AI state of cross-device sync apply in the same window Codex local review (round 4) flagged that `applySyncPayload` writes straight to localStorage but `useAIState` only re-reads on browser `storage` events. Those events only fire in *other* windows — the window doing the apply (the one with the active chat panel) keeps showing pre-sync providers and per-agent bindings until reload. Concrete leak: cloud sync swaps in a new provider set, pruning runs, localStorage is correct, but the open Catty chip still references the ghost provider binding until the user reloads. Extracts the existing `AI_STATE_CHANGED_EVENT` constant + `emitAIStateChanged` helper out of `useAIState` and into a new `application/state/aiStateEvents.ts` so non-React call sites (sync apply, future IPC handlers) can fire it without pulling in the hook. After AI settings apply, `syncPayload.ts` walks every AI key it touched (including the agentProviderMap / agentModelMap that the reconcile step may have mutated even when the payload didn't ship them) and emits a same-window nudge. `useAIState`'s existing local listener routes unknown keys back through its storage handler, so each affected piece of React state rehydrates from localStorage. Adds a regression test in `syncPayload.test.ts` that asserts the expected `netcatty:ai-state-changed` keys are dispatched for the providers + per-agent map keys. Refs codex local review on #1107. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
67448cea65 |
feat(terminal): configurable startup-command delay + multi-line sequencing (#1096)
* feat(terminal): add global startupCommandDelayMs setting Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(terminal): add startup-command line-split and delay-clamp helpers Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(terminal): run multi-line startup commands in sequence with configurable delay Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(terminal): expose startup command delay in Terminal settings Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(terminal): keep startup-command line content verbatim splitStartupCommandLines now only drops blank/whitespace-only lines and normalizes CRLF, but no longer trims each line's content. This keeps a single-line startup command byte-identical to what the user typed (e.g. a leading space for HISTCONTROL=ignorespace is preserved), while still supporting multi-line sequencing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(sync): include startupCommandDelayMs in synced terminal settings Terminal settings sync via the SYNCABLE_TERMINAL_KEYS allowlist; the new startupCommandDelayMs preference was missing, so it wouldn't propagate across devices. Add it (it's a user preference like keepaliveInterval, not device-specific). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
1d50b2c4a1 |
feat(terminal): choose dark/light terminal theme when following app theme (#1094)
* feat(terminal): add per-mode follow-theme resolver and storage keys Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(terminal): persist per-mode follow-theme selections in settings state Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(sync): include per-mode follow terminal themes in cloud sync Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * i18n(terminal): add per-mode follow-theme picker strings * feat(terminal): add type filter and auto option to theme picker * feat(terminal): pick dark/light terminal theme when following app theme Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(terminal): don't flag the auto sentinel as a missing theme in the picker The per-mode follow-theme pickers default to the 'auto' sentinel, which is not a real theme id, so ThemeList's deletedSelectedTheme check classified it as a deleted custom theme and rendered a spurious "Missing Theme" banner above the Auto entry on first open. Exclude TERMINAL_THEME_AUTO from that check. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * i18n(terminal): align zh-CN dark/light wording with app convention Use 深色/浅色 (matching the theme picker section headers and global appearance settings) instead of 暗色/亮色 for the per-mode terminal theme labels, so the picker modal reads consistently. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(terminal): match follow-theme preview fallback to runtime resolution The per-mode preview memos fell back straight to TERMINAL_THEMES[0] when a selection resolved to a deleted theme, while the runtime currentTerminalTheme memo falls back to the manual terminalThemeId first. Mirror the runtime chain so the Settings preview matches the actual terminal for users with a non-default manual theme. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
bf1c95500a |
feat #826: optional Option+←/→ word jump on macOS (#1082)
* feat #826: optional Option+←/→ word jump on macOS Adds a Terminal → Keyboard toggle "Option+←/→ jumps by word" (off by default, synced). When on, a bare Option+Left/Right sends Meta-b / Meta-f instead of xterm's default ^[[1;3D / ^[[1;3C, so readline/zle moves by word without per-host bindkey setup (Termius-style). The key→sequence mapping is a tested pure function; the handler reads the setting live (no reconnect) and runs after kitty mode + autocomplete so it doesn't override them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix #826: gate Option+←/→ word jump to macOS The setting is syncable, so without a platform gate, enabling it on a Mac would also rewrite Alt+←/→ to Meta-b/f on synced Linux/Windows devices, breaking apps/shells that expect the default ^[[1;3D / ^[[1;3C. Pass isMacPlatform() into the mapping so it only applies on macOS; add a test for the non-macOS case. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
b30696c98b | Clean up dead code and duplicated helpers (#1001) | ||
|
|
88732040aa |
fix(terminal): separate prompt after unterminated command output (#987)
* fix(terminal): separate prompt after unterminated command output Add a display-layer prompt line break handler so recognized shell prompts move to the next visual line when the final command output line is not newline terminated. Also add a terminal setting to toggle the behavior, sync support, i18n copy, and focused tests for prompt insertion. * fix review issue * Fix prompt cache initialization * Serialize terminal output writes for prompt breaks * Keep terminal status lines ordered with output * Fix prompt arming without command callback * Keep prompt display breaks out of session logs * Avoid prompt breaks for output suffix matches --------- Co-authored-by: yuzifu <yuzifu@TB16PGen5.Info> Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com> |
||
|
|
92ecd84edf |
Fix #939: per-host SSH keepalive override + cloud-friendly defaults (#947)
* fix(ssh): per-host keepalive override + cloud-friendly defaults (#939, #581)
Issues #939 (cloud / Aliyun sessions silently freezing after 15-20 min idle
because no SSH keepalive packets are sent) and #581 (older routers like
NOKIA / ALCATEL being killed by ssh2 after a few unanswered keepalives) are
in direct tension at the global-setting level: cloud users want keepalive
ON, embedded-device users want it OFF, and any single global default hurts
the other group.
Resolves the conflict by moving keepalive to a per-host setting (mirroring
the existing `legacyAlgorithms` per-host pattern), with cloud-friendly
global defaults:
Domain:
- Host gains `keepaliveOverride?: boolean` + `keepaliveInterval?: number`
+ `keepaliveCountMax?: number`. When override is true, the host's
values are used; otherwise the global TerminalSettings values apply.
Per-field fallback so a host can override interval only or countMax only.
- TerminalSettings gains `keepaliveCountMax: number` so the second knob
(number of unanswered keepalives before declaring dead) is no longer
hardcoded at 3 in the bridge.
- DEFAULT_TERMINAL_SETTINGS: keepaliveInterval bumped from 0 to 30, and
keepaliveCountMax = 10. Cloud LBs / NAT tables stay populated; brief
network glitches don't trip the dead-connection check; an actually
dead session is detected within ~5 minutes. Existing users with 0
saved keep their value (no migration) — they were the #581 router
cohort and their setup still works untouched.
Plumbing:
- domain/host.ts adds resolveHostKeepalive(host, globalSettings) with
five unit tests covering both directions of the override flag and
per-field fallback.
- components/terminal/runtime/createTerminalSessionStarters.ts uses the
resolver when building startSSHSession options.
- electron/bridges/sshBridge.cjs reads keepaliveCountMax from options
(defaulting to 10) at both connection sites (direct + jump host) and
still routes interval=0 through to a fully disabled keepalive
(preserving #581's escape hatch).
UI:
- Settings → Terminal → Connection grows a second input next to the
existing interval: "Max unanswered keepalives".
- Host details panel gains a Keepalive section with a "Override global
keepalive" toggle that, when on, exposes per-host interval +
countMax inputs and an inline hint when interval = 0 (explaining
the implications). Same visual pattern as the existing Legacy
Algorithms section.
Sync:
- keepaliveCountMax added to SYNCABLE_TERMINAL_KEYS so the new global
field rides existing sync infrastructure. Per-host fields ride the
hosts array passthrough automatically (older clients receiving them
ignore unknown fields, per the existing lenient sync contract).
i18n: en + zh-CN strings for the new settings row, the host section
header, and the override toggle / inputs / disabled hint.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(ssh): resolve keepalive per jump host, not just the final target
Addresses codex review on PR #947:
https://github.com/binaricat/Netcatty/pull/947#discussion_r3217027xxx
The first cut only resolved keepalive for the final target host and
forwarded a single interval/countMax pair across the whole start-SSH
call. connectThroughChain in sshBridge.cjs then applied that one pair
to every hop, so a chain like:
router (bastion, needs keepalive=0) → cloud target (needs 30s)
would either kill the router (with cloud-friendly defaults) or fail
to keep the target alive (with router-friendly 0). The per-host
override was effectively useless for bastion hosts.
Fix:
- NetcattyJumpHost gains optional keepaliveInterval / keepaliveCountMax.
- createTerminalSessionStarters runs resolveHostKeepalive() per
jumpHost when building the chain, so each hop carries its own
resolved pair.
- sshBridge.cjs's chain connector reads jump.keepaliveInterval /
jump.keepaliveCountMax for each hop, falling back to the call's
target-level options for backward compatibility with older
serializers that don't yet populate the per-hop fields.
The final target's keepalive path is unchanged — it still reads
options.keepaliveInterval / options.keepaliveCountMax that the
session starter resolves from the target host.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(ssh): per-host keepalive for SFTP + port forwarding too
Follow-up to the maintainer review on PR #947 — terminal SSH was the
only path that honored per-host keepalive overrides. SFTP and port
forwarding share the same NetcattyJumpHost type but their builders
weren't resolving keepalive per-hop, and their bridges hardcoded the
old 10s/3 defaults. Net result: a router-as-bastion in a chain still
got killed when reached via the SFTP file panel or a port-forwarding
tunnel, even though the user had toggled per-host override.
Plumbing:
- useSftpHostCredentials / buildSftpHostCredentials: accept optional
terminalSettings; call resolveHostKeepalive() for the target and
each jump entry; emit keepaliveInterval / keepaliveCountMax in the
returned NetcattySSHOptions.
- useSftpConnections + useSftpState + SftpStateOptions thread the
setting down. SftpSidePanel passes the global terminalSettings prop
it already has from TerminalLayer.
- portForwardingService.startPortForward: accepts terminalSettings
as an 8th argument, resolves per-host (target + each jump), and
populates the bridge payload.
- usePortForwardingState.startTunnel and usePortForwardingAutoStart
forward the new parameter; App.tsx supplies terminalSettings (via
a ref in the once-on-launch auto-start effect so changing global
keepalive later doesn't re-fire it).
Bridges:
- sftpBridge.cjs target connect: now also reads keepaliveCountMax
from options (was hardcoded 3). 10s/3 stays as the bridge-level
fallback to preserve the #669 protection when the renderer hasn't
supplied a value.
- sftpBridge.cjs jump hop: reads jump.keepaliveInterval /
jump.keepaliveCountMax, then falls back to the target-call options
(matches the symmetric SSH bridge change).
- portForwardingBridge.cjs: reads keepaliveInterval /
keepaliveCountMax from the IPC payload; same 10s/3 fallback.
Types:
- NetcattyJumpHost already grew keepalive fields earlier; this
commit also adds them to PortForwardOptions so the IPC contract
is explicit.
End-to-end: a chain `[router-as-bastion, cloud-host]` with the
router host's keepaliveOverride=true / interval=0 now correctly
disables keepalive on the router hop for terminal SSH AND SFTP AND
port forwarding, while the cloud target still gets the resolved
30s/10 default for each path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(ssh): honor explicit keepalive=0 in SFTP + port forwarding bridges
Addresses codex review on PR #947:
- https://github.com/binaricat/Netcatty/pull/947#discussion_r3217448xxx
- https://github.com/binaricat/Netcatty/pull/947#discussion_r3217449xxx
The previous follow-up commit (
|
||
|
|
684c094d40 |
Drop externalAgents from cloud sync (device-local config)
ExternalAgentConfig.command/acpCommand/args/env are OS- and machine-specific (binary paths, .exe suffixes, platform-dependent environment values). Pushing them to other devices either fails to resolve or silently runs the wrong thing. Stop collecting/applying STORAGE_KEY_AI_EXTERNAL_AGENTS and remove the field from the SyncPayload type. apply silently ignores the field on legacy snapshots that still carry it, so existing remote data is safe. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
d84c2cc902 |
Preserve local AI apiKeys when applying synced settings
`collectSyncableSettings` strips device-bound encrypted apiKeys from provider entries and webSearchConfig before upload, but `applySyncableSettings` was writing them back wholesale, silently wiping local credentials whenever any other setting changed on a second device. Merge by id (providers) and by providerId (web search) so a synced payload only overrides the apiKey when it explicitly carries one. Also include `application/*.test.ts` in the npm test glob so the syncPayload tests added in this PR actually run in CI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |