mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-16 20:11:08 +00:00
0e02bbc2fbbd67f92bbc5a99ea81d5e439d84d1d
1947
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0e02bbc2fb |
[codex] Persist vault host sort mode (#1021)
* Persist vault host sort mode * Harden vault host sort persistence tests |
||
|
|
affd9217e2 | Fix session log capture after reconnect (#1020) | ||
|
|
7b4a349e3f |
[codex] Guard unsupported legacy SSH groups (#1023)
* Guard legacy SSH DH groups * Align legacy SFTP algorithms |
||
|
|
7dc5ab5035 |
[codex] Use terminal cwd when opening SFTP (#1024)
* Use terminal cwd when opening SFTP * Clear stale terminal cwd for SFTP open |
||
|
|
3e8965f9a9 | Fix pr987 (#1010) | ||
|
|
23a27bf544 | Handle missing streamed tool call ids (#1007) | ||
|
|
86a815ad46 |
[codex] Optimize terminal tab switching (#1003)
* Optimize terminal tab switching * Reduce themed tab switch repaint workv1.1.7 |
||
|
|
cb4fb091aa |
[codex] Fix browser loading of shared rule files (#1002)
* Fix local shell browser import * Fix command blocklist browser import |
||
|
|
b30696c98b | Clean up dead code and duplicated helpers (#1001) | ||
|
|
6b8f05c65a | Merge branch 'codex/fix-russian-settings-sync-icon' | ||
|
|
64dd3a4a2f | Fix settings sidebar icon clipping | ||
|
|
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> |
||
|
|
b9f3bfa8bb |
Add i18n russian (#991)
* add i18n russian * Added the Russian translation * Complete Russian SFTP transfer translations * Add Russian reconnect menu translation --------- Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com> |
||
|
|
b7ec3c12f7 | Handle ConPTY controls in Mosh password prompts (#1000) | ||
|
|
d20a18b862 | Fix AI code block rendering fallback (#983) | ||
|
|
ff6b4a4625 |
Broadcast pasted terminal input (#927) (#996)
* Broadcast user paste to terminals * Use workspace session id for context paste broadcast * Consume paste broadcast suppression before toggle check |
||
|
|
5a94b4cf39 |
Preserve Unicode session log names (#988) (#998)
* Preserve Unicode session log names * Harden Windows session log name handling |
||
|
|
3963cd4af9 | Fix remote path completion cwd (#993) | ||
|
|
5b2a048917 | Add transfer target path actions (#997) | ||
|
|
2414cb00e4 | Keep terminal tab after remote exit (#994) | ||
|
|
03f980e939 | Add reconnect terminal context action (#995) | ||
|
|
ac819fd4fd | feat(workspace): add focus sidebar drag reorder (#992) | ||
|
|
fb9400a5fb |
fix #984: After running the clear command, the inline session log will be cleared (#990)
Co-authored-by: yuzifu <yuzifu@TB16PGen5.Info> |
||
|
|
7da983a56c |
ci: auto-bump Homebrew tap on stable release tags (#938) (#976)
After the GitHub Release is published, push an updated Cask to binaricat/homebrew-netcatty so `brew install binaricat/netcatty/netcatty` stays current within minutes of the release. Stable tags only — prerelease tags (v1.2.0-rc.1 etc.) are skipped to keep brew users on stable. Implementation: - New script .github/scripts/bump-homebrew-cask.sh computes SHA-256 of the arm64 + x64 DMGs already downloaded by the release job, sed-patches the Cask file in the tap repo, sanity-checks the result parses as Ruby, and pushes the bump. Idempotent on re-run when checksums match. - New homebrew-tap job in build.yml runs after the release job on the same stable-tag gate, downloads the macOS artifact bundle, then runs the bump script with HOMEBREW_TAP_TOKEN. Requires HOMEBREW_TAP_TOKEN secret with contents:write on binaricat/homebrew-netcatty. With the secret missing the job will fail fast at the env-var check with no side effects (no push attempted). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>v1.1.6 |
||
|
|
344b226ce8 |
Fix #969: auto-fill saved password into PAM-style keyboard-interactive prompts (#974)
* Fix #969: auto-fill saved password into PAM-style keyboard-interactive prompts Servers running stock PAM Linux configurations (most distros) only advertise `keyboard-interactive` as their auth method, not `password` — so even when the user has saved a password on the host, Netcatty was popping a modal asking them to type it again. Every connect ended up being a two-password flow: one to dispatch, one in the modal. The shared `createKeyboardInteractiveHandler` factory now recognizes the classic "PAM-wrapped password" challenge (a single prompt with `echo === false`) and finishes it with the saved password directly, skipping the modal. Real multi-prompt or echo-visible challenges (2FA / OTP / security questions) still go to the modal as before, and a wrong-password auto-fill on the first attempt falls back to the modal on the retry so the user can correct it. Also consolidated startSSHSession's inline keyboard-interactive handler — which duplicated ~45 lines of the factory logic without the auto-fill fix — to use the factory with progress callbacks. The chain / SFTP / port-forwarding bridges already went through the factory and pick up the auto-fill for free. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Address Codex review: only auto-fill prompts that mention a password The previous heuristic ("single prompt + echo=false + saved password → auto-fill") would also fire for OTP / Duo / hardware-token challenges, which are single hidden-echo prompts too. That would burn one auth attempt per reconnect on those servers and could trip pam_faillock / pam_tally2 lockout policies before the user ever saw the modal. Add a prompt-text gate: auto-fill only when the prompt contains a known password keyword (Latin "password" / "passwd"; CJK "密码" / "口令"). Custom-localized prompts that don't match fall through to the modal, which is the same behavior as the pre-#969 baseline — strictly no worse than before. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Address Codex review (round 2): exclude OTP vocabulary from auto-fill The previous PASSWORD_PROMPT_PATTERN matched anything containing "password" / "passwd" / "密码" / "口令", which still let through OTP shapes that happen to include those words: "Enter your one-time password", "动态密码" (Chinese for "dynamic password" = OTP), "动态口令", "一次性密码", etc. Add an OTP/MFA vocabulary check that runs before the password keyword check. Any prompt containing OTP terminology (one-time, OTP, verification, passcode, token, 2FA, two-factor, MFA, Duo, 动态, 一次性, 验证码, 令牌, 双因素, 多因素, 短信验证, 手机验证) is disqualified from auto-fill even if it also matches the password keywords. Tests cover both English "One-time password" and the three common Chinese OTP phrasings, plus a regression guard that normal sudo-style password prompts still auto-fill. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
86e47b5f9e |
Fix #972: stop false "fingerprint changed" warnings on every SSH connect (#973)
The host-key verifier was misclassifying connections as `changed` in three situations that had nothing to do with a real key rotation: 1. Records imported from the system `~/.ssh/known_hosts` (or older builds) landed in localStorage without a `fingerprint` field. The verifier then re-derived the fingerprint from the stored `publicKey` blob on every connect — a brittle path that produced a different value than ssh2 if anything about the serialization differed by even one byte. 2. `classifyHostKey` had a loose "single candidate with unknown / empty keyType → changed" heuristic. Any imported record whose keyType failed to parse would be promoted to a rotation warning the first time the server presented a real algorithm, even though the user had never actually trusted any fingerprint for that algorithm. 3. A host that genuinely had multiple algorithms (e.g. one stored ssh-rsa record plus a live ssh-ed25519 handshake) was being reported as `changed` instead of `unknown`, even though we had no comparable record for the algorithm the server presented. Tabby (`tabby-ssh/src/session/ssh.ts`) and OpenSSH both treat case (3) as a first-time prompt rather than a mismatch; this change brings Netcatty in line with that model. Changes: - `domain/knownHosts.ts` ports `fingerprintFromPublicKey` to TS and adds `normalizeKnownHost` / `normalizeKnownHosts` so the renderer can backfill legacy records on hydration. Pure-JS SHA-256 keeps the migration synchronous so it can run inline in `useVaultState` without async plumbing. - `application/state/useVaultState.ts` runs the migration on hydration and on cross-window storage events. When anything changes on hydration the migrated list is written back to localStorage so the next launch starts clean. - `components/KnownHostsManager.tsx` populates `fingerprint` at import time instead of leaving it for the verifier to re-derive. - `electron/bridges/hostKeyVerifier.cjs` simplifies `classifyHostKey` to fingerprint-first, then strict (host, port, keyType) match for the changed branch, then fall through to `unknown`. Two existing tests that locked in the loose heuristic are updated to assert the new (safer) behavior, and a new test covers the multi-algorithm first-encounter case. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
37012da26a |
Use shadcn Button for the settings gear in the top tab bar (#967)
Follow-up on #966 which added `hover:bg-accent` to the existing raw `<button>` element. That element is `h-full w-10`, so the new hover fill spanned the entire title-bar height — a giant vertical accent strip instead of the small icon-button highlight we wanted. Replace the raw element with the same shadcn `Button variant="ghost" size="icon" h-6 w-6` that every other icon on the same row already uses. Wrap it in a centered container that keeps the title-bar height for window-control alignment and carries `app-drag` so the empty space around the icon still drags the window; the button itself stays `app-no-drag`. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>v1.1.5 |
||
|
|
0fd6a8c31d |
Add hover background to settings gear in top tab bar (#966)
Hovering the gear icon in the top tab bar left no visual response while every other icon on the same row (AI, theme toggle, sync) lights up on hover with the accent fill. The gear button is a raw `<button>` rather than the shadcn `Button variant="ghost"` because it spans the full title-bar height to align with the window controls, so it never picked up the ghost variant's `hover:bg-accent`. Adds the matching `hover:bg-accent` class so the gear behaves the same as its neighbours. The inline `color` style for the resting state stays in place; the accent fill on hover is what was missing. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
10af904681 |
Bring Duplicate / Copy Credentials to Pinned + Recently Connected menus (#965)
The right-click menu on host cards in the Pinned and Recently Connected sections only exposed Connect / Edit / Pin-Unpin / Delete, while the canonical "All hosts" listing also offers Duplicate and Copy Credentials. There is no reason to omit those two for hosts you've pinned or recently opened — the underlying handlers are already wired up. Add the missing entries in the same order as the All-hosts menu so the three context menus stay visually identical. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
b02b83f225 |
Place per-host statusbar tooltips below their triggers (#964)
The copy-host-address, broadcast and focus-mode buttons sit on the per-host statusbar directly under the top tab bar. With the default top-side tooltip placement, hovering any of them paints the tooltip on top of the tab title above (the visible "Copy host address …" covering "Rainyun-114.66.26.174" in the bug report screenshot). Drop the tooltips on the bottom side instead, matching the HoverCardContent panels already used for the CPU/Memory/Disk stats buttons on the same bar. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
bca5d63a4e |
Fix #919: harden built-in Telnet handshake for legacy gear (#963)
* Fix #919: harden built-in Telnet handshake for legacy gear The built-in Telnet client failed to advance past the welcome banner on some older switch firmware (HP ProCurve 2610 reported in #919) and, in the same session, leaked snippets of subnegotiation payloads into the terminal display as random-looking characters. Three independent correctness gaps in the old implementation, all rolled into one PR: 1. The negotiation parser was stateless per chunk. An IAC sequence split across TCP frames either dropped the lone IAC (lost command) or, for IAC SB...IAC SE blocks whose terminator landed in the next frame, fell through to "skip IAC SB and treat the rest as data" — spilling the subnegotiation payload (TERMINAL-TYPE strings, environment data) into the user's terminal as garbage. 2. The client was purely reactive — it only ever responded to options the server raised. Quite a bit of legacy equipment waits for the client to commit to SUPPRESS-GO-AHEAD / TERMINAL-TYPE / NAWS before it will continue past its banner, so connections silently hung at "Press any key to continue" forever. 3. Outbound user input was never IAC-escaped, so any 0xFF byte the user pastes (or that an alternate input encoding emits) would be read by the peer as the start of a command and eat the following byte. Approach: - New `electron/bridges/telnetProtocol.cjs` owns RFC 854 framing as a pure module. `createTelnetParser` is a stateful machine that buffers any partial command (lone IAC, IAC + verb, unterminated SB) across feeds and replays it once the rest arrives. Emits clean stream bytes, option commands and complete subnegotiations through callbacks. `escapeIacForWire` doubles 0xFF bytes on the way out with a cheap fast-path for the common (no 0xFF) case. - `terminalBridge.cjs` flips telnet handling into a lazy mode: until the peer sends an IAC byte the connection is plain passthrough, so raw-TCP-on-port-23 services are not corrupted by the protocol layer. Once the protocol activates, we proactively request DO SUPPRESS-GO-AHEAD, WILL TERMINAL-TYPE and WILL NAWS, and track those in a `requestedOptions` Set so the peer's acknowledgement does not trigger another reply (the classic negotiation loop). - TERMINAL-TYPE is now advertised as "XTERM-256COLOR" (upper-case); legacy boxes that case-sensitive-match termcap names recognise it. - Resize-driven NAWS subnegotiations now only fire after the protocol has actually activated, so a passthrough session is never poisoned. - Outbound writes for telnet sockets convert strings to UTF-8 buffers and run them through `escapeIacForWire`, so paste of binary content and non-ASCII input encodings round-trip safely. Tests: - 17 unit tests in `telnetProtocol.test.cjs` cover normal data, option commands, subnegotiation (including IAC IAC inside payload), every cross-frame split point (lone IAC, IAC + verb, mid-SB), the specific regression that previously leaked SB payload as data, ordering of data vs command callbacks, and the IAC escape helper. - Existing 18 telnet auto-login tests still pass, exercising the end-to-end socket → parser → renderer path. Full suite: 825 / 0 / 3. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Address review: per-direction Telnet negotiation tracking RFC 858 §"Default Specification" treats WILL/WONT and DO/DONT as two independent option streams. The first revision of this PR used a single `requestedOptions` Set keyed by option byte, which incorrectly swallowed a peer's independent request on the opposite direction whenever we had our own request still pending for the same option. Concrete failure mode (highlighted by code review on the PR): we send `DO SGA` and the peer simultaneously sends `DO SGA` asking us to enable SGA on our outgoing side. The old check matched the peer's DO against our pending DO and returned silently, leaving the peer's request unanswered — strict implementations would either time out or proceed in the wrong mode. Fix: split pending requests into `pendingDoRequests` (we sent DO, awaiting WILL/WONT) and `pendingWillRequests` (we sent WILL, awaiting DO/DONT). Acknowledgement matching is now direction-aware; the peer's independent request on the orthogonal direction is treated as a fresh negotiation and replied to. While in there, the related bug uncovered by reviewing this code: when the peer's `DO NAWS` acknowledges our own `WILL NAWS`, we previously just dropped it on the floor — but the actual window-size SB payload needs to follow the WILL handshake either way (whether the DO is an acknowledgement of our WILL or an independent fresh request). The negotiator now always pushes the size subnegotiation on `DO NAWS`. Refactor: the negotiation policy lives in a new `createTelnetNegotiator` factory inside `telnetProtocol.cjs`, separate from the parser. That keeps `terminalBridge.cjs` thin and — more importantly — makes the policy directly unit-testable. 13 new tests cover the bidirectional-collision regression, the missing NAWS follow-through, fresh vs ack handling for each verb, the canonical handshake sequence, unsupported-option WONT/DONT replies, the TERMINAL-TYPE SEND→IS roundtrip, and the 80×24 fallback for invalid sizes. Total: 30 parser+negotiator unit tests, 18 existing telnet auto-login integration tests, full suite 838 / 0 / 3. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
67c5571df5 |
Fix #958: highlight IPv6 + allow editing built-in keyword rules (#962)
Two changes addressing both halves of #958: 1. IPv6 highlighting The built-in 'URL, IP & MAC' rule only shipped URL, IPv4 and MAC patterns, so compressed IPv6 addresses such as 2001:11:22:33::5 or fe80::d2dd:bff:fe79:f2bb were never highlighted. Add an IPv6 regex covering full and compressed forms (including ::1 and leading-/trailing- :: variants) and merge it into the same 'ip-mac' rule's patterns. The normalizer's existing "fill missing defaults" path means existing users pick this up on next start with no migration step. 2. Editable built-in rules Add an optional `customized` flag to KeywordHighlightRule. When false / absent, normalize re-syncs the rule's label/patterns with the shipped defaults (so future default-pattern upgrades reach users automatically). When true, normalize keeps the user's label/patterns/color/enabled verbatim, allowing built-ins like 'ip-mac' to be tailored. SettingsTerminalTab: - Pencil icon now appears on built-ins too. Editing one routes through the same dialog and flips `customized` on save. - The pattern field becomes a Textarea so multi-pattern built-ins (e.g. 'error' ships seven spellings) can all be edited in one go. - A per-rule "↺" reset icon appears on customized built-ins and restores the shipped label/patterns while preserving the user's color/enabled. - The footer's "Reset to default colors" button is broadened into "Reset built-ins to defaults", restoring every built-in to shipped label/patterns/color and clearing `customized`. Tests: New domain/keywordHighlight.test.ts (6 tests) covers IPv6 matches for both #958 examples plus loopback and full-form, IPv4/MAC still match, normalize migrates legacy non-customized 'ip-mac' to include IPv6, normalize preserves customized patterns, and normalize keeps user custom rules verbatim. Full suite: 808/0/3. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
ea5320d94a |
Fix #954: unify Tooltip styling + replace native selects (#961)
* Fix #954: unify Tooltip styling + replace native selects Replace native HTML title= tooltips and native <select> dropdowns with the existing Radix-based Tooltip / Select components so they share the app's rounded styling, theme tokens and i18n pipeline. Adds a global TooltipProvider in AppWithProviders so every descendant Tooltip works without a per-file Provider wrapper. Scope (driven by the issue #954 examples and "全部都处理" follow-up): - TerminalLayer toolbar: Add Terminal / Split View / SFTP / Scripts / Theme / AI Chat / Move panel / Close panel. - TopTabs middle bar: quick switcher, more tabs, AI assistant, theme toggle, settings; window-control buttons (min/max/close), tray close and hotkey reset/disable have their native title dropped per the user's explicit opt-out ("可以不用Tooltip,直接全局禁用 原生title 属性"). - AI panels: AIChatSidePanel session history / new chat / delete, ConversationExport, AgentSelector, ChatInput attach / expand / permission, ModelSelector, ProviderCard, ai-elements/tool-call. - SFTP: SftpSidePanel header, SftpBreadcrumb, SftpFileRow, SftpPaneToolbar, SftpTabBar, SftpTransferQueue. - Settings: SettingsPage close, SettingsAppearanceTab theme/accent swatches, SettingsFileAssociationsTab edit/remove, SettingsSystemTab crash-log paths and global hotkey reset. - Host vault: HostDetailsPanel (clear / suggestions / show-password / key path / browse key), GroupDetailsPanel, KnownHostsManager, ConnectionLogsManager, KeychainManager, SyncStatusButton, CloudSyncSettings, LogView, QuickSwitcher, ScriptsSidePanel, Terminal status bar copy-host + broadcast/focus, ZmodemProgressIndicator. - Terminal subcomponents: HostKeywordHighlightPopover, TerminalComposeBar, TerminalConnectionDialog, TerminalSearchBar. - Editor: TextEditorPane (subtitle, search, wrap, promote-to-tab). - TrayPanel session rows and port-forwarding rows. Native <select> migrated to custom Select component: - SerialConnectModal (data bits, stop bits, parity, flow control) - SerialHostDetailsPanel (same four fields) - HostDetailsPanel backspace behavior - GroupDetailsPanel backspace behavior - SettingsTerminalTab local shell picker - terminal/ThemeSidePanel font weight Hardcoded English strings extracted to i18n. New keys for both en and zh-CN: terminal.layer.*, topTabs.*, ai.chat.* (sessionHistory, attach, collapse, expand, enableAgent), zmodem.*, settings.shortcuts. resetToDefault. Inline help text on SnippetsManager package-name input removed because the same hint is already shown in a visible <p> below the input. Existing per-file <TooltipProvider> wrappers (SnippetsManager, ScriptsSidePanel, SelectHostPanel, RuleCard, HostDetailsPanel proxy section) are left in place — they nest harmlessly under the global provider and stay self-sufficient for component tests. Tests: - tsc clean for changed files (pre-existing repo-wide errors unrelated to this PR). - All 802 tests pass (3 skipped pre-existing). - HostDetailsPanel.proxyProfile.test and TextEditorPane.test updated to wrap with TooltipProvider, matching the runtime context now needed by the migrated components. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Fix #954: wrap Settings + Tray windows with TooltipProvider Settings and the tray panel mount as separate Electron windows with their own React root in index.tsx, so they do not inherit the global TooltipProvider added under AppWithProviders. After the unified Tooltip migration, any settings tab that used a Tooltip (Appearance, Application, FileAssociations, System, Shortcuts, Terminal, AI ProviderCard, AI ModelSelector) — and TrayPanel — threw "Tooltip must be used within TooltipProvider" and rendered nothing. Wrap both branches with TooltipProvider at the same level as ToastProvider in index.tsx. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
ffd3111b71 |
Fix #957: persist SSH known-host trust across app restarts (#960)
useVaultState hydrates knownHosts asynchronously — its init awaits the
decryption of hosts, keys, identities and proxyProfiles before reading
knownHosts from localStorage. The state is briefly [] at boot even when
localStorage has saved entries.
The host-key verifier introduced in
|
||
|
|
b0949f1a1e |
feat(sftp): add drive switcher dropdown for local Windows panes (#953)
* feat(sftp): add drive switcher dropdown for local Windows panes On Windows, the SFTP breadcrumb's first segment (drive letter) now shows a dropdown to switch between available drives. This makes it easy to navigate across drives without manually editing the path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(sftp): probe drives async to avoid blocking main process fs.accessSync in the listDrives IPC handler could stall the Electron main process for seconds per disconnected mapped drive or empty optical drive. Use fs.promises.access with Promise.allSettled so the 26 probes run in parallel without blocking the event loop. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com> |
||
|
|
84416d04bf |
[codex] Fix issue 957 long paste display (#959)
* Fix long paste display artifacts * Fix serial line mode pasted chunks * Narrow long paste display cleanup scope * Strip only matched paste echo highlights * Honor paste scroll setting through xterm paste |
||
|
|
109d0a7ab7 |
feat(terminal): add copy-host-address button to per-host statusbar (#951) (#952)
Adds a small clipboard-copy icon next to the host label / status dot in the terminal pane's statusbar. Clicking copies the host's hostname (IP or DNS name — what users called "machine IP" in #951) to the clipboard and surfaces a toast. The button only renders for non-local SSH/serial/telnet sessions — local shells don't have an addressable hostname so showing it would be confusing. Placed in the pane statusbar (not the top tab) because the statusbar is per-host: a workspace pane carries exactly one host, so the button always identifies the right address. Top tabs in a workspace can share multiple panes / hosts and would be ambiguous. Visual treatment matches the surrounding stats buttons: 10px icon, inline with the existing host label + status dot, opacity-60 → opacity-100 on hover, `title` attribute for the tooltip to match the pattern of the CPU/MEM/disk stats triggers right next to it. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>v1.1.4 |
||
|
|
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 (
|
||
|
|
311f44525b | Fix AI export menu theme colors (#944) | ||
|
|
b4e185e1c6 |
fix(terminal): restore right-click paste in mouse-tracking TUIs (#941) (#946)
When a TUI app enables SGR mouse tracking (opencode, tmux with `mouse on`, vim with `set mouse=a`, etc.), Terminal.tsx attaches a capture-phase contextmenu listener that calls stopImmediatePropagation. The original purpose is to bypass xterm.js's own right-click handler — which calls textarea.select() and dismisses TUI popup menus — but stopImmediatePropagation also kills the bubble that React's onContextMenu delegation relies on, so TerminalContextMenu's handleRightClick never fires. Result: with `rightClickBehavior` set to "paste" (or "select-word"), right-click silently does nothing inside any mouse-tracking TUI. Menu mode still works because Radix opens via pointerdown (not affected by the contextmenu capture block). Middle-click paste works because its auxclick listener in createXTermRuntime is also unrelated to contextmenu. Fix: have the capture handler itself dispatch the user's chosen right-click action when it intercepts the event. terminalContextActions already exposes onPaste / onSelectWord; mirror them into a ref so the once-bound capture handler can call the current implementation without re-binding on every action identity change. 'context-menu' mode is intentionally not handled in the capture path — Radix's pointerdown listener opens the menu independently. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
92dd898eb4 |
Fix #931: let users pick a CJK font + per-font smart pairing (#940)
* feat(fonts): add CJK font pairing composition module Introduces composeFontFamilyStack() which builds the xterm fontFamily CSS string at runtime from: - the user's primary Latin font - an explicit CJK font (TerminalSettings.fallbackFont) if set - otherwise a per-Latin-font recommended CJK pairing - a hardcoded system CJK fallback stack - a Nerd Font icon fallback stack - the universal monospace generic 14 unit tests cover composition order, deduplication, OS defaults, quoting, and recommendation override behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * refactor(fonts): expose raw Latin families and add CJK-coverage entries - TERMINAL_FONTS[].family no longer bakes in the CJK fallback stack; composition is deferred to runtime via composeFontFamilyStack(). - Drops withCjkFallback helper from this module and its caller in lib/localFonts.ts. - Adds 6 CJK-coverage primary fonts to the dropdown: Sarasa Mono SC/TC, Maple Mono CN, LXGW WenKai Mono, Microsoft YaHei UI, PingFang SC. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(terminal): compose font-family stack with user-configurable CJK fallback resolvedFontFamily now passes through composeFontFamilyStack(), which prepends the user's TerminalSettings.fallbackFont (if set) ahead of the per-Latin-font recommended CJK pairing and the system fallback stack. The platform argument is derived from navigator.platform inside the useMemo, so the same Latin font may pair with PingFang SC on macOS and Microsoft YaHei UI on Windows out of the box. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(settings): add CJK font picker to terminal settings Adds a new "CJK font" select row right under the main font selector in the Terminal settings tab. Bound to TerminalSettings.fallbackFont (an already-existing-but-unused field), so this needs no schema or sync payload change. Default value "Auto" leaves fallbackFont empty, which lets the new per-Latin-font pairing in cjkFonts.ts pick a CJK font automatically. Selecting any explicit option (Sarasa Mono SC, PingFang SC, Microsoft YaHei UI, etc.) takes precedence over the per-font pairing. Includes en + zh-CN i18n strings. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(sync): cover fallbackFont round-trip + legacy payload tolerance Four new test cases verify cloud-sync compatibility for the new CJK font setting: - buildSyncPayload includes fallbackFont when set - buildSyncPayload omits fallbackFont when unset - applySyncPayload writes incoming fallbackFont to TERM_SETTINGS - applySyncPayload from a legacy client (no fallbackFont) does NOT wipe the local value — critical for old-to-new upgrades Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(fonts): add font availability detection (canvas + document.fonts API) Three-layer detection used by isFontInstalled(family): 1. Known @fontsource-bundled families (e.g. JetBrains Mono) always count as installed. 2. document.fonts.check() — picks up @font-face and system-loaded fonts. 3. Canvas width measurement against serif / sans-serif / monospace fallbacks; only counts if the target font produces a width that differs from ALL three generics for a probe string. detectInstalledWithContext is a pure function taking an injected measurement context, which keeps the canvas / DOM behind a seam and lets the logic be unit-tested without a browser. 11 tests cover quoted-family parsing, the three-generic-fallback rule, bundled short-circuit, and document.fonts.check fast-path. Results are cached per process; clearFontAvailabilityCache() invalidates. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(fonts): filter dropdowns to fonts actually installed on this machine Layer 3 of #931 added Sarasa Mono SC / Maple Mono CN / Microsoft YaHei UI / PingFang SC etc. to the terminal font dropdown, but users who don't have these installed would still see them and pick them — resulting in "I changed the font and nothing happened" confusion. This commit filters both dropdowns through isFontInstalled(): - TerminalFontSelect: drops any built-in or system-discovered font that detection can't render. If filtering would leave fewer than 4 fonts (detection misfire safety net), shows the full list. - TerminalCjkFontSelect: keeps the "Auto" sentinel always, drops concrete CJK choices that aren't present on this machine. Both selects always keep the currently-selected value visible — even when the underlying font is missing — so users can read and clear their setting without surprise. Also expands `npm test` globs to pick up infrastructure/config/*.test.ts and lib/*.test.ts, which previously matched no patterns and meant the new cjkFonts and fontAvailability suites were silently excluded from CI runs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(fonts): never recommend proportional CJK fonts for terminal use The previous PingFang SC / Microsoft YaHei UI / Hiragino Sans GB choices were proportional sans-serif fonts whose CJK glyphs aren't designed to fit a terminal's 2x cell grid — the rendered Chinese ended up visibly wider than its allocated cells, breaking grid alignment (reported on macOS with PingFang SC selected as the CJK font). Changes: - TerminalCjkFontSelect: drops PingFang SC / Microsoft YaHei UI / Hiragino Sans GB from the dropdown. Legacy explicit selections still surface as a synthetic "not recommended" option so users can see and re-pick. - CJK_SYSTEM_FALLBACK_FONTS: monospace-only list. Sarasa Mono SC/TC, Maple Mono CN, LXGW WenKai Mono, Noto Sans Mono CJK SC, Source Han Mono SC, NSimSun, SimSun. Proportional fonts removed. - PER_FONT_CJK_PAIRING: every entry now points at a true monospace CJK font. Cascadia / Consolas / Menlo etc. all recommend Sarasa Mono SC, which the next commit bundles via @font-face. - getDefaultCjkFallback: Windows = SimSun (always installed, monospace); macOS = Sarasa Mono SC (will be bundled); Linux = Noto Sans Mono CJK SC. A regression test enforces that no per-OS default is a known proportional font. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(fonts): bundle Sarasa Mono SC as the universal CJK monospace Previous commit removed proportional CJK fonts (PingFang SC, etc.) from the picker and switched per-OS defaults to true monospace, but macOS ships NO system-installed monospace CJK font — leaving macOS users with a broken default unless they manually install Sarasa or similar. This commit closes that gap by bundling Sarasa Mono SC as an @font-face webfont, so the recommended pairings and macOS default "just work" out of the box. Details: - public/fonts/SarasaMonoSC-Regular.woff2 (~4.8 MB): subsetted from be5invis/Sarasa-Gothic v1.0.37 SarasaMonoSC-Regular.ttf (24 MB). Covers ASCII, Latin-1, common punctuation/symbols, CJK Unified Ideographs main block, Hiragana/Katakana, halfwidth/fullwidth, box-drawing — the everyday-Chinese coverage that matters for a terminal. Rare CJK Ext-A/B/historical chars fall through to the system fallback stack. - public/fonts/SarasaMono-LICENSE.txt: OFL-1.1 verbatim, required by the license. - index.css: @font-face declaration with font-display: swap so the user doesn't see a flash of nothing while the woff2 loads. - KNOWN_BUNDLED_FAMILIES: "Sarasa Mono SC" added so the dropdown availability filter doesn't hide it. Installer impact: ~+4.8 MB (vs current ~100-200 MB Electron baseline). The font replaces what would otherwise have been "Chinese chars look broken in the terminal" for every macOS user without a manually installed CJK monospace font. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(fonts): use Local Font Access API as the authoritative install check document.fonts.check() turned out to be unreliable as an installed-font signal in Chromium — it returns true for any syntactically-valid family name regardless of whether the font is actually installed, as a deliberate fingerprinting-mitigation. The previous detector took it as a positive signal and ended up keeping uninstalled fonts in the dropdown (reported by a macOS user seeing dozens of fonts they don't have). This commit pivots the detection chain: - lib/localFonts.ts: getAllSystemFontFamilies() exposes the unfiltered set of installed family names from queryLocalFonts(), reusing the same underlying call as getMonospaceFonts() via a shared cache. - lib/fontAvailability.ts: drops the document.fonts.check fast-path. Adds setSystemFamilies() / hasAuthoritativeData(). When the set has been populated, isFontInstalled answers from membership lookup directly — no canvas guessing. Canvas remains as a fallback for environments where the Local Font Access API is unavailable or permission is denied. - application/state/fontStore.ts: during initialize(), runs the monospace-only query and the full-system-families query together, then pipes the result into fontAvailability. - TerminalFontSelect: with authoritative data, drops the "if filtered list is suspiciously small, show all" safety net. Empty would now really mean empty (highly unlikely since Sarasa Mono SC is bundled). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(fonts): drop PingFang SC / Microsoft YaHei UI from primary dropdown Step 1 of this PR removed proportional CJK fonts from the CJK fallback picker but left them in BASE_TERMINAL_FONTS, so PingFang SC and Microsoft YaHei UI were still selectable as the *primary* terminal font. Picking PingFang SC as primary produced visibly bloated Latin character spacing (xterm.js samples cell width from the primary font; the wide proportional 'M' inflates every cell), reported by a macOS user in the same thread that opened #931. Both entries are removed from BASE_TERMINAL_FONTS. A new infrastructure/config/fonts.test.ts asserts that no known proportional CJK font name (including PingFang TC/HK, Microsoft YaHei variants, Hiragino Sans GB, Heiti SC/TC) is ever shipped in TERMINAL_FONTS as a primary choice. Migration for users already saved to one of the removed ids: useSettingsState rewrites STORAGE_KEY_TERM_FONT_FAMILY to the default (Menlo) on read when it sees a deprecated id, so the bad value also stops getting carried into cloud-sync uploads. Per-host fontFamily overrides are NOT migrated automatically — they still gracefully fall through to the dropdown's first entry via the existing getFontById fallback; users can re-pick from the host settings UI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(fonts): drop Comic Sans MS — it's a proportional handwriting font Same symptom as the PingFang SC / Microsoft YaHei UI removal: Comic Sans MS was historically in the primary font dropdown labeled "Casual, non-traditional terminal font", but Comic Sans is a handwriting-style proportional sans-serif. Picking it as the terminal primary inflates cell width and spaces every Latin character far apart (reported in the same #931 thread). - BASE_TERMINAL_FONTS: comic-sans-ms entry removed. - DEPRECATED_PRIMARY_FONT_IDS: gains comic-sans-ms so existing selections silently migrate to Menlo on read. - fonts.test.ts: the proportional-font ban list now also covers Latin proportional fonts (Comic Sans MS, Arial, Helvetica, Times New Roman, Georgia, Verdana, Trebuchet MS, Tahoma) so the test catches any future mislabeled body-text font from being added to the terminal dropdown. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(fonts): keep monospace ahead of CJK fallbacks in composed stack Addresses codex P1 review comment on PR #940 (https://github.com/binaricat/Netcatty/pull/940#discussion_r3216017737). The previous behavior of withCjkFallback() had monospace immediately after the primary family, before any CJK fallback. composeFontFamilyStack had moved monospace to the very end, which means: when the primary font isn't installed on the user's machine (common for Layer 3 CJK choices that aren't bundled and not present on a given OS, or for any built-in id like cascadia-code on a Linux system without it), CSS per-glyph fallback resolves Latin glyphs from a CJK font's full-width Latin variants before ever reaching monospace generic. That breaks xterm.js's fixed cell-grid alignment. The composed stack now reads: <primary>, monospace, <userFallback>, <recommended-cjk>, <system-cjk-stack>, <nerd-font-stack> Per-glyph CSS fallback behavior: - Latin → primary if installed → monospace generic. Cell width stays consistent. - CJK → primary (no) → monospace (no Chinese glyphs) → walks into CJK fallbacks. - Nerd PUA → falls past all of the above into the Nerd Font stack. Updates the position-invariant tests and adds a regression test that explicitly asserts monospace appears before every CJK family in the output stack. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(fonts): dedupe Local Font Access API calls under concurrent init Addresses codex P2 review on PR #940: https://github.com/binaricat/Netcatty/pull/940#discussion_r3216246xxx fontStore.initialize() runs getMonospaceFonts() and getAllSystemFontFamilies() in Promise.all; both internally called queryAllSystemFontsOnce(), whose cache check (`if (cache) return`) was only useful once the result had been written. Concurrent callers both passed the empty-cache check and fired their own queryLocalFonts() request — two real Local Font Access API invocations on cold start, with the risk of one succeeding while the other was denied (leaving the authoritative set unset). Fix: cache the *in-flight promise itself*, so subsequent callers await the same single invocation. The first await populates the family-set cache as a side effect, and the resolved promise keeps returning the same value to every subsequent caller. Adds lib/localFonts.test.ts with three regression tests: - concurrent getMonospaceFonts + getAllSystemFontFamilies = 1 API call - sequential repeats also reuse the resolved promise - missing API returns null authoritative set (canvas fallback signal) Exports __resetLocalFontsCacheForTesting() so each test gets a fresh module-level state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(fonts): retry LFA on transient failure + notify on availability changes Two follow-up fixes from codex P2 review on PR #940: 1) queryAllSystemFontsOnce() previously kept its in-flight promise even when queryLocalFonts threw. Subsequent callers reused the cached empty result for the rest of the session, so any transient failure at boot (permission state not ready, AbortError, etc.) permanently blinded the rest of the app to installed fonts. Catch now clears queryPromise so the next caller retries. Regression test added. 2) TerminalCjkFontSelect.visibleOptions and TerminalFontSelect .visibleFonts were memoized on [value] / [fonts, value] only, but the filter calls isFontInstalled() which reads module-level systemFamilies — a value that arrives asynchronously after the initial render. The memos never recomputed when authoritative availability data landed, so the dropdowns could continue showing stale "filtered" results until the user changed selection. fontAvailability now exposes subscribeFontAvailability() and getFontAvailabilityVersion() (monotonic counter bumped on setSystemFamilies / clearFontAvailabilityCache). Both selects subscribe via useSyncExternalStore and include the version in their memo deps; tests cover subscriber notification and version monotonicity. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(fonts): migrate host/group deprecated font ids + localize CJK labels Two follow-up fixes from codex review on PR #940: P2 — Host/group level font migration ==================================== The earlier deprecated-id migration only rewrote STORAGE_KEY_TERM_FONT_FAMILY, so hosts and group configs that had explicitly opted into a now-removed font id (e.g. pingfang-sc, microsoft-yahei, comic-sans-ms) kept `fontFamily` set with `fontFamilyOverride=true`. After the dropdown entries were dropped in 9f2bd282/c9b622d8, those records silently fell through to the first font in the registry (Menlo) while the override flag still read "true" — users saw a host claiming a custom font but rendering the global default with no way to tell what happened. Fix: - infrastructure/config/fonts.ts gains migrateDeprecatedFontOverride(), a structurally-shared helper that drops fontFamily and clears fontFamilyOverride when the id is deprecated. - sanitizeHost now runs it on every host load. - domain/groupConfig.ts grows sanitizeGroupConfig(); useVaultState applies it both on initial load and on cross-tab storage events. - Existing decrypt → sanitize → encrypt round-trip in useVaultState means the migrated values are persisted back to localStorage and propagate through cloud sync naturally. Tests: two each in domain/host.test.ts and domain/groupConfig.test.ts covering deprecated-id reset and untouched-valid-id preservation. P3 — Localize CJK font option labels ==================================== TerminalCjkFontSelect previously hardcoded Chinese option labels ("Auto · 按主字体智能搭配", "Sarasa Mono SC (更纱黑体 简)", etc.) and the synthetic "not recommended" warning. Non-Chinese locales saw a mixed-language UI despite the rest of the setting going through i18n. OPTIONS now references i18n keys; the component looks them up via useI18n(). Both en and zh-CN locales gain matching keys, including `...option.legacy` with `{font}` interpolation for the synthetic "not recommended" item that surfaces saved-but-removed values. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(fonts): also sanitize group configs on the write/import path Addresses codex P2 review on PR #940: https://github.com/binaricat/Netcatty/pull/940#discussion_r3216314xxx The previous commit ( |
||
|
|
478e148b40 |
Drop noisy [XTerm] renderer=... boot log
The line printed once per terminal session and offered no diagnostic value beyond what window.__xtermRenderer already exposes for ad-hoc introspection. Keep the detection + retry + window publish; just stop polluting the console. Rename logRenderer → trackRenderer to match the now-narrowed responsibility. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>v1.1.3 |
||
|
|
231fb9c74c |
Merge pull request #936 from binaricat/fix/stable-use-terminal-backend
Stabilize useTerminalBackend return identity |
||
|
|
8870eb4de9 |
Stabilize useTerminalBackend return identity
The hook returned a fresh object literal every render. The 26 methods inside were already useCallback([])-stable, but the wrapping object was not — so every consumer's effect with `terminalBackend` in deps (e.g. cwd polling, lifecycle wiring, write-to-session) re-ran on every parent render even though nothing semantic had changed, and ESLint flagged the one site that depended on a property access (`terminalBackend.onHostKeyVerification`) because it could not prove that path safe. Wrap the return in useMemo with all stable callbacks listed as deps so the object is computed once and cached for the hook's lifetime. Switch the host-key-verification effect's dep to the now-stable `terminalBackend`, clearing the warning at the root rather than patching it locally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
c9114eb198 |
Merge pull request #935 from binaricat/fix/906-ghost-text-after-tab
Fix ghost text duplicating glyphs after Tab completion (#906) |
||
|
|
938d1ef48b |
Fix ghost text duplicating glyphs after Tab completion (#906)
The reliability gate at handleInput's adjustToInput call froze the ghost at its last show()-time tail in any path where the typed buffer becomes unreliable (Tab pass-through to shell, history recall, cursor moves). When the user kept typing into that gap, the next render advanced the cursor past the ghost's anchor while the ghost text stayed put — a → -accept then pasted the stale tail on top of the just-typed glyphs (e.g. "systemctl s" + typing "t" → screen showed "systemctl sttop firewalld"). Add GhostTextAddon.applyKeystroke so the ghost can evolve its own currentInput off raw keystrokes (printable / Backspace / Ctrl-W), seeded by whatever the last show() captured from the live xterm reading. handleInput now uses the existing adjustToInput on the reliable path (preserves multi-char paste re-alignment) and routes single-keystroke events through applyKeystroke on the unreliable path, fixing the visual misalignment and the duplication-on-accept in one shot. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
52c097d9f8 |
Merge pull request #928 from binaricat/binaricat/fix-issue-920
Sync AI/UI settings and fix multi-display settings window placement |
||
|
|
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> |
||
|
|
3a233a3279 |
Merge pull request #934 from binaricat/claude/suspicious-bohr-32d9f2
Fix WebDAV Basic Auth for non-ASCII passwords (Hetzner #891) |