* fix(terminal): prevent mid-composition IME keydowns from duplicating voice input
Ignore sentinel mid-composition keydowns (keyCode 0 or Unidentified/Process/Dead/Compose) so xterm.js does not call _finalizeComposition(false) before voice ITN/AI polish finishes, preserve early synchronous commit state so trailing compositionend emits only the minimal diff, and track the last committed composition text for in-place consecutive rewrites.
* fix(terminal): invalidate early IME diff on terminal-mutating keys and keep tests ASCII-only
Address PR #4304 review feedback:
- Narrow sentinel keydown detection so non-empty keyCode 0 events (e.g. iOS UIKeyInput arrows) are not swallowed.
- Suppress early-sync backspace diffing and follow-up in-place rewrites when a mid-composition keydown can mutate terminal state or move the PTY cursor (such as ArrowLeft or Home).
- Escape CJK test fixtures as \uXXXX in imeCompositionRewrite.test.ts to preserve ASCII-only source files.
* fix: resolve dev CJS imports, ligatures empty-line crash, and streamline AI sidebar UX
* fix(ai): ignore nested control keydown events in session manager row
* feat(ai): global AI session manager with cross-scope rebind
Scope-agnostic view over every AI chat regardless of panel scope
(issue #4098 phases 4-5), hosted as a scoped/global toggle inside the
existing session history drawer.
- Global list: title, agent, resolved scope (workspace title / terminal
label / global / dangling), state badge (active / idle / dissociated),
message count, relative time; title-substring search, agent filter,
newest-first ordering and a render batch guard. Titles only, never
message bodies.
- Per-row actions: open/switch (exact-scope chats only; other-scope rows
offer rebind instead of faking activation), rebind to the current
panel (issue #4019 path) or to any open workspace/terminal via an
explicit target picker, confirm-gated per-record delete, and
single-chat export (exportSessionsBackup now takes an optional
session-id subset; import merges by id).
- App-wide open terminals are threaded to every AI panel so the manager
resolves scopes and rebind targets across tabs.
- Deletion safety: no scopeKey is passed, stale pointers of any panel
are repaired by the #4125 validation effect; deleting the last chat
cannot resurrect on reboot (intentionally-deleted ids + migration
marker). No cleanup/eviction semantics are touched (#4015 R2).
* fix(ai): stop active turns before scope rebind
Rebinding a chat while a turn streams into it corrupts streaming state
(the stream targets the old scope while the active map/panel pointer move
underneath it). Both rebind paths — the global session manager and the
/rebind <n> panel command — now await stopStreamingForSession first,
chosen over rejecting the rebind because it cleanly awaits termination
(stopAgentTurn + waitForActiveTurn) and preserves the user's rebind
intent. stopStreamingForSession moves above the /rebind handler to avoid
a TDZ reference; the guard lives in AIChatSidePanelHelpers so both call
sites share it. Also passes the panel scope host ids to the manager for
the 'This panel' rebind target.
* fix(ai): derive session manager rebind targets from all live terminals
The global AI session manager built its app-wide terminal list from
contextsByTabId, which only covers tabs whose AI panel context is
mounted - a live terminal without one was missing as a rebind target.
useTerminalAiContexts now also exposes buildAllTerminalAiInfos over the
full terminal session store (same buildAITerminalSessionInfo per
session, so infos merge seamlessly where a context exists) and threads
it to AIChatPanelsHost as appTerminalSessions.
* fix(ai): preserve host ids on panel rebind and reset stale agent filters
- 'This panel' rebind now carries the viewing panel's scope host ids
(currentScopeHostIds) onto the rewritten scope, so the destination
host association is not orphaned; explicit picker targets already
forwarded their hostIds.
- The agent filter no longer survives its agent: when the filtered
agent's last chat is deleted the filter resets to 'all' instead of
leaving a permanently empty list with a blank select; the select's
built-in 'all' option stays the manual clear affordance.
* fix(ai): clear source workspace views when rebinding a chat
* fix(ai): demote implicit source views when rebinding restored chats
* fix(ai): stabilize appTerminalInfos identity and polish global session manager UI
- Retain appTerminalInfos array identity across structurally equal terminal updates so unrelated tab state churn does not re-render every mounted AIChatSidePanel.
- Replace native <select> elements in GlobalAIChatSessionManager with the shared Radix Select component for consistent dark/light theme rendering.
- Wrap the disabled cross-scope open button in a <span> inside TooltipTrigger (and add type="button" to row action buttons) so hover tooltips fire reliably.
* fix(ai): carry member host IDs on explicit workspace rebind targets
* fix(ai): remove redundant title beside history drawer scope switcher
* fix(ai): guard optional appTerminalSessions in AIChatPanelsHost
* fix(ai): clear persisted source workspace anchors when rebinding chats
* fix(ai): exclude non-exact workspace matches from implicit auto-resume
---------
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
Preserve the original RTL implementation and keep affected panes on the DOM renderer to avoid an oversized WebGL glyph allocation. Unchanged ASCII panes retain their renderer.
xterm.js has no bidi support and draws every cell on its own, so Arabic,
Persian and Hebrew words came out reversed and Arabic letters unjoined
(#4261).
Register a character joiner that marks the parts of each line the Unicode
Bidirectional Algorithm (bidi-js) puts at a right-to-left or number level
in a left-to-right paragraph. Both the WebGL and DOM renderers draw a
joined range as one string through the browser's text engine, which
orders it, shapes the letters and mirrors brackets. The buffer is
unchanged, so selection, copy, search and cursor positions still use the
logical text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Related #4279
When a TUI such as Claude Code enables the Kitty keyboard protocol, Shift+Insert was encoded as an Insert key (CSI 2;2~) instead of pasting. Netcatty always constructs xterm with Kitty support, so this happened even with the user Kitty setting off.
This claims bare Shift+Insert as clipboard paste (the same onPaste path as the paste keybinding) after user/snippet shortcuts and before Kitty/Win32 encoding.
This does not change right-click / context-menu behavior while mouse tracking is active.
Related #4168
On ~1–1.2× displays the 1px rounded accent border around a magnified
pane drops out at the corners, and a box that is not aligned to the
device-pixel grid turns the stroke into a faint, doubled hairline.
Snap the magnified terminal overlay (after the 12px inset) to integer
device pixels, and use a 2px accent stroke when devicePixelRatio is
below 1.5 on both the terminal and side-panel chrome. Higher-DPR
displays keep the existing 1px stroke.
* fix(ai): treat models-list 404 as a warning and send Anthropic Bearer on custom bases
Custom OpenAI-compatible gateways that omit a /models listing were
shown as a hard detect failure on HTTP 404. Treat 404 as a warning.
Official Anthropic stays on x-api-key only; custom Anthropic-compat
bases also send Authorization: Bearer so Agent Plan and similar
proxies authenticate.
* fix(ai): use the versioned Ark Agent Plan messages endpoint
MDXEditor portals the link preview toolbar to document.body by default.
Notes stays retained-mounted and is only CSS-hidden, so the toolbar was
left floating over other vault pages and terminal sessions.
Fixes#4257
* fix(logs): finalize session logs when the app quits without closing tabs
Fixes#4235
* fix(logs): finalize logs when unconnected sessions close
Capture never-connected terminal logs at explicit session removal, including empty buffers, without finalizing logs during runtime remounts. Cover tab close, failed-dialog close, batch close, and workspace close with persistence regressions.
Fixes#4235
* fix(logs): tolerate unavailable finalization IPC
Preserve window close and layout saves when session-log finalization IPC cannot be set up, and clear its timeout on setup failures.
Follow-up for #4235 / PR #4236.
* fix(settings): index later-added settings in search catalog
Fixes#4230
Follow-up after #4231. Settings search still missed later-added
rows such as Appearance "Code font" (代码字体) and System session
log "Add timestamps" (时间戳), which already rendered in their
tabs. Index those destinations and other visible setting rows
that had the same catalog/anchor omission.
* fix(settings): fall back to visible parent when search target is gated
The #4122 budget of 12 only released hidden panes, so 17+ visible
splits still crossed Chromium’s 16-context limit and the 50ms
rebuild avalanched into white panes until the DOM breaker tripped.
Refuse new visible contexts when visible holders fill the cap while
preserving recently hidden holders during the tab-flip grace period.
Cover acquisition limits, missed visibility syncs, and recovery at cap.
Co-authored-by: Codex <codex@openai.com>
* fix(sftp): use remote cp for fresh same-host copies (Fixes#4207)
Ordinary SFTP tasks were marked resumable, which skipped the existing file and directory cp optimizations. Select the non-resumable route only when creating fresh matching-host copies with eligible encodings, keeping transfer-center rows and recursive children consistent. Existing checkpointed transfers retain their saved resumable path; failed cp attempts retain the download/upload fallback.
* fix(sftp): skip same-host directory cp when auto encoding resolves to non-UTF-8
* fix(sftp): preserve dest mode when same-host cp replaces a file
* fix(sftp): skip same-host cp for symlinks and directory merges
* test(sftp): mock missing dest in same-host cp cache fixture
* fix(sftp): expose lstat on session-backed copy clients
Fixes#4230
Settings search uses a static catalog. The SFTP "Enable folder
compression" row was already in the tab but missing from the catalog
and had no anchor, so queries such as 压缩 showed no matches. Index
that destination, plus the skip-unchanged and SSH keep-alive rows in
the same tab that had the same omission.
* fix(host-details): show inherited group proxy and jump hosts
Host editor summaries for HTTP/SOCKS5/command proxy and ProxyJump
chains now display the same values applyGroupDefaults uses at
connect time, without writing inherited settings onto the host
until the user edits them.
Fixes#4187
* fix(host-details): keep custom proxy and empty jump-host overrides
Selecting Custom while a group saved proxy is inherited now keeps a host-owned draft instead of snapping back to that profile. Removing the last hop of a multi-hop inherited chain keeps an empty override so applyGroupDefaults cannot restore the group hops.
* fix(host-details): keep empty override when clearing inherited chain
Clear Chain on an inherited-only jump-host list now stores { hostIds: [] }
instead of deleting the field so group hops cannot snap back.
* fix(system-manager): show all CPU cores in the overview list
The overview CPU card hardcoded cpuPerCore.slice(0, 12), so a 16-thread
host showed "16 核" at the top but only C1–C12 below. Render every
reported core and allow the list to scroll when it overflows.
Fixes#4183
* ci: retrigger lint-and-test after plugin-contract runner shutdown
* feat(autocomplete): add zh-CN descriptions for zip, unzip, make, nano
Cover 32 missing Fig descriptions, generate zh-TW, add batch coverage tests, and record source and semantic checks.
* fix(autocomplete): correct zip, unzip, and make semantics
Limit zip -9 to the compression level, warn that unzip -0 is a suspect upstream option, and describe make -N as the Apple/NeXT compatibility extension.
* fix(autocomplete): simplify unzip -0 warning and correct NeXT note
Keep the -O gbk version caveat in the research record and describe Next/NeXT as a capitalization difference.
* feat(autocomplete): complete remaining common command descriptions
Add 177 zh-CN descriptions for python, python3, node, vim, sort, awk, and sed; generate zh-TW, cover the batch with real Fig specs, and record one deferred shared node key.
* fix(autocomplete): correct sed n and sort parallel semantics
Add the automatic-print condition to sed n, remove the universal CPU default from sort --parallel, and remove duplicated adopted-entry sections from the source record.
* fix: repair macOS terminal setup and align autocomplete details
- Read OSC 7 setup payloads through base64 stdin so BSD/macOS works
- Keep the FIDO askpass socket path within the Unix sun_path limit
- Align autocomplete descriptions in a shared fixed column
- Fix an invalid optional-parameter declaration and lint warnings
- Harden macOS-sensitive OSC 7, SFTP, temp-dir and privacy tests
* feat(autocomplete): add zh-CN descriptions for file and text utilities
Cover ln, stat, wc, cut, uniq, tee and xargs with 70 localized
descriptions. Add coverage and localization tests, preload the new common
specs, and record the upstream wc/xargs wording corrections.
* fix(autocomplete): keep popup scrollbars draggable
Panel mousedown handlers no longer preventDefault across the whole box, so the right-side detail scrollbar and the suggestion list scrollbar can be dragged while padding clicks still preserve terminal focus.
* fix(autocomplete): keep detail panel open while selecting text
Delay row hover clearing so the pointer can move into the right-side detail panel, and allow native text selection there without stealing terminal focus on ordinary padding clicks.
* fix(ui): accent border for terminal pane magnification
* chore: retrigger CI after Actions runner shutdown flake
lint-and-test was cancelled mid-run by runner shutdown (not a product failure) on 42326458479 and 42328660175.
* feat(sftp): add a one-click Duplicate action for files and folders
Duplicate copies the selected entries next to their originals in the same
folder, covering files, folders, and multi-selection. It reuses the existing
transfer queue and the transfer pipeline's "(copy)" naming helper, so progress,
cancel, and error reporting behave like Copy to other pane.
The target name is resolved before the transfer starts. Resolving through the
batch conflict defaults instead would re-enter processTransfer for a task that
is still marked in flight and stall the copy.
Adds the action to both the list and tree context menus, plus translations for
en, es, ru, zh-CN, and zh-TW.
Closes#4132
* fix(sftp): keep Duplicate safe around navigation rows and reserved names
Hide and ignore the tree's synthetic ".." row: duplicating it resolved the
source to an ancestor directory and could walk the copy into its own output.
The transfer hook also drops "." / ".." inputs for duplicate batches, and the
same-pane handler filters them defensively.
Pick duplicate names around destinations already reserved by a queued or paused
transfer. Those rows have no file on disk yet, so stat-only naming returned the
same "(copy)" path and the follow-up active-path check turned the second
one-click duplicate into a conflict dialog. The naming helper now accepts an
occupied-path predicate fed from the active transfer set.
* fix(sftp): block stale entry menus on parent navigation
---------
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>