* test(macos): show Touch Bar updates are sent on every tab title change
TouchbarService sends `window-set-touch-bar` on every tab title change, and
each message makes the main process replace every segment of the Touch Bar's
NSSegmentedControl. On macOS 26 that control is drawn with SwiftUI on every
Mac, Touch Bar or not, and each replacement leaves observation state behind
that makes the next one slower. After days of title updates the main process
freezes for seconds at a time.
The test changes a tab title 20 times a second for 2.5 seconds and expects
at most 3 updates; today it gets 50. It also expects a way to turn the
updates off. Both fail until the next commit.
Adds an `electron` stub (ipcRenderer records what is sent) and `Platform`
to the unit-test module hooks so the service can load under `node --test`.
* fix(macos): stop Touch Bar updates from freezing the app after long uptime
On macOS 26 the Touch Bar's NSSegmentedControl is drawn with SwiftUI, on
every Mac whether it has a Touch Bar or not. Each time its segments are
replaced it runs a layout pass whose observation state keeps growing, so the
pass gets slower with every update. Tabby replaced the segments on every tab
title change, and after a few days the main process spent seconds per update,
freezing input in every window.
- Send Touch Bar state at most once a second.
- In the main process, replace the segments only when they change; a tab
switch now only moves the selection.
- Add hacks.disableTouchBar (Settings > Window > Disable Touch Bar) to skip
creating the control at all.
* fixup
---------
Co-authored-by: Eugene <inbox@null.page>
* Recognize fragmented sudo prompts across SSH packets
* test(auto-sudo): run the prompt matcher and middleware tests from test:unit
The two test files added with the fragmented-prompt matcher were matched by no CI glob, so they
never ran in CI. The test:unit script now also runs tabby-auto-sudo-password/test/*.test.{ts,mjs}:
promptMatcher.test.ts loads through the shared TypeScript hooks and middleware.test.mjs keeps its
own loader, which stubs tabby-terminal and tabby-ssh as well.
Also drop AutoSudoPasswordMiddleware.loadPassword(), which nothing called; handlePrompt() uses the
password storage service directly.
* test: list every unit test location in test:unit
Four open pull requests each add their own test pattern to this line. Writing the complete list
in all of them makes the change identical, so they merge in any order without a conflict. A
pattern that matches nothing on a given branch is accepted by Node 22 and 26 test runners.
* cleanup
* fix(core): prevent concurrent command palettes (#11880)
* fix(core): prevent concurrent command palettes
* test: list every unit test location in test:unit
Four open pull requests each add their own test pattern to this line. Writing the complete list
in all of them makes the change identical, so they merge in any order without a conflict. A
pattern that matches nothing on a given branch is accepted by Node 22 and 26 test runners.
* fix(core): keep pane drag drop zones alive with focus-follows-mouse (#11811)
With focusFollowsMouse, mousemove was calling focus()/layout() during a
Ctrl+Shift pane drag, which rebuilt drop zones after tabDragActive$ had
already fired. Those new zones never became active, so the drop never
landed. Skip focus while a tab drag is active (same idea as the
spanner-resize guard), and make tabDragActive$ a BehaviorSubject so any
zones that still remount still see the current drag (#11800).
* fix(ssh): evict disconnected sessions from the multiplexer (#11874)
* Avoid caching disconnected and destroyed SSH sessions
* test(ssh): run the multiplexer tests under the SSH test glob
The repository's only SSH test runner is `node --experimental-strip-types --test tabby-ssh/test/*.test.ts`,
so the `.mjs` file was never executed by `yarn run test:ssh-term` or CI. Rename it to `.test.ts` and add the
type annotations and lint pragma the TypeScript test files carry; the transpile-and-evaluate approach stays,
because Node's type stripping cannot load the decorated service directly.
* fixup
---------
Co-authored-by: Eugene <inbox@null.page>
* fix(ssh): handle final-tab teardown without unhandled SendError (#11873)
* Make SSH teardown idempotent and stop resizing closed shells
* fixup
---------
Co-authored-by: Eugene <inbox@null.page>
* fix(sftp): preserve remote files during upload replacement (#11900)
* fix(sftp): isolate temporary files for uploads
* fix(sftp): preserve remote files during upload replacement
* fix(sftp): initialize upload handle for lint
* cleanup
---------
Co-authored-by: Esir98 <282511431+Esir98@users.noreply.github.com>
Co-authored-by: Eugene <inbox@null.page>
---------
Co-authored-by: Eugene <inbox@null.page>
Co-authored-by: Bennett Payoyo <75754746+Yahiro025@users.noreply.github.com>
Co-authored-by: Haohong Lin <1605058857@qq.com>
Co-authored-by: Esir98 <282511431+Esir98@users.noreply.github.com>
* Avoid caching disconnected and destroyed SSH sessions
* test(ssh): run the multiplexer tests under the SSH test glob
The repository's only SSH test runner is `node --experimental-strip-types --test tabby-ssh/test/*.test.ts`,
so the `.mjs` file was never executed by `yarn run test:ssh-term` or CI. Rename it to `.test.ts` and add the
type annotations and lint pragma the TypeScript test files carry; the transpile-and-evaluate approach stays,
because Node's type stripping cannot load the decorated service directly.
* fixup
---------
Co-authored-by: Eugene <inbox@null.page>
With focusFollowsMouse, mousemove was calling focus()/layout() during a
Ctrl+Shift pane drag, which rebuilt drop zones after tabDragActive$ had
already fired. Those new zones never became active, so the drop never
landed. Skip focus while a tab drag is active (same idea as the
spanner-resize guard), and make tabDragActive$ a BehaviorSubject so any
zones that still remount still see the current drag (#11800).
* fix(core): prevent concurrent command palettes
* test: list every unit test location in test:unit
Four open pull requests each add their own test pattern to this line. Writing the complete list
in all of them makes the change identical, so they merge in any order without a conflict. A
pattern that matches nothing on a given branch is accepted by Node 22 and 26 test runners.
* Preserve SSH forwarding write order and half-close semantics
* Subscribe before awaiting TCP fixture connection events
* fix(ssh): leave closing a failed remote-forward channel to the bridge
The remote-forward socket kept its own error handler that called `channel.close()` next to the new
bridge, which already closes the channel when the failed socket closes. Two native closes raced on
one channel and the first one's rejection was not awaited or caught. Keep the warning, drop the
duplicate close. The X11 and local-forward paths only close a channel before a bridge exists, so
they are unchanged.
* test(ssh): wait for stream state instead of sleeping in the bridge tests
The bridge tests asserted in-flight state after fixed 20-30 ms sleeps, which a loaded CI runner can
miss. Wait for the condition instead: the first native write being entered, the next chunk landing
in the paused socket's read-ahead buffer, and output reaching the peer after the channel closed.
What each test proves is unchanged.
* ET client protocol natively in TypeScript
Uses tabbys existing SSHSession
Eternal Terminal connection profile (host, user, ports, auth via an SSH profile)
Quick-connect with user@host from the profile selector or the CLI
Forward the local SSH agent to the remote session
Local and remote port forwarding (per-profile + live)
Native terminal scroll-back
Connect via an ET jump host
* Squashed 6 commits:
Fixed nonce desync - budget now runs before encrypt()
stdout/stderr capped at 64 KiB in bootstrap.ts
connection.ts: fixed fd leak on failed handshake/reconnect attempts
connection.ts: 10s connect timeout, and better handle cannot be resumed
connection.ts: dispose of stale readers in attach()
connection.ts: write packet reports drops
port fwd: validate inbound PORT_FORWARD_DESTINATION_REQUESTs against
port fwd: only connect to ::1/127.0.0.1 (seems upstream is the same),
removeForward now also tears down live tunnelled sockets
etSession.ts: ping targets the jump host when one is configured;
INITIAL_RESPONSE timer cleared on settle/destroy + keepalive reset on
any inbound packet + dropped-input surfaced once on resume
fixed kill()/destroy() teardown
byteReader.ts: timeout timers cleared on failure/dispose
quickConnect no longer yields NaN ports+ bare IPv6 handled
ports validated (1–65535) and range expansion capped at 1024
the reverse tunnels declared in INITIAL_PAYLOAD
remote-forward removal now explains it needs a reconnect
Tab/modal/pug: showPortForwarding() null-guard + click handler CSP fix
failed sessions destroyed so their listeners + timers don't leak
* Squashed 7 commits:
getProfiles() return a copy before mutation to avoid direct config writes
refactored portForwarding forget() to operate per role with strict socket identity checks
Send returns boolean and ensures closed flag and local socket cleanup on drop
ensured always an error listener on addLocalForward so we can handle server errors and clean up any stale forwards.
added UnrecoverableSessionError to stop endless reconnect attempts if recovery keeps failing
add warning in the forwarding UI if you're not binding to a loopback address, isLoopbackBindAddress()
quick-connect ports only accept values between 1 and 65535 in parsePortOrDefault
changed ByteReader to pause if backlog hits 8MB and resume below 2 MB, but it will never stop reading for too long
set limit so only up to 256 sockets can be opened from peer-initiated destination connections
Changed resolveAgentPath() so it chooses SSH_AUTH_SOCK first, no matter the platform
Got rid of old connect-error listeners on named pipes to prevent issues with duplicate DESTINATION_RESPONSE events
getProfiles() now clones before override, avoids direct config writes
portForwarding forget() operates per role with strict socket identity checks
Send now returns boolean, cleans up sockets on drop to prevent silent tunnel corruption
addLocalForward always attaches error listener to net.Server, removes forward on errors
New UnrecoverableSessionError ends reconnect loop after unrecoverable failures
* bugs fixed (4 squashes):
a protobuf tag varint of exactly 2^64−1 was accepted and Number() conversion lost the wire-type bits; tags and WIRE_LEN lengths are now rejected when wider than 32 bits, 11-byte varints are no longer silently accepted, and values above 64 bits are rejected
dispose() in bytereader no longer serves post-dispose reads from buffered bytes (socket-failure draining is deliberately preserved)
quickConnect user@[ crashed on undefined.substring(...); parsing moved to a dependency-free module that never throws and never yields a non-finite port
Invalid port now reports the whole range token in tunnelSpec
Error containment: malformed packets are dropped with a warning inside handlePacket (session + port-forward handler) instead of tearing down the connection
All reconnect paths now reliably clean up and handle permanent status errors by ending the session
Fatal integrity failures now raise UnrecoverableSessionError and terminate the session instead of retrying
Keepalive now only clears probe on inbound traffic, with interval and dead-link detection improved
Clean EOF now properly flushes before closing, and only errors destroy the connection
Local write queues over 8 MiB close the socket to prevent unbounded growth
Concurrent handshakes are avoided using a handshakeInFlight flag
Modal profile editing binds to a new activeForwards list, ensuring UI consistency with declared tunnels
* Sorted protobuf tag/length precision and oversized varints
Better malformed packet error containment
ByteReader disposal improvements
Fix quickConnect ']' crash
Improved tunnelSpec error messages
Sorted double connect() rejection
shutdown() during handshake socket leak (pendingHandshake)
* Split 3 merged alias entries in yarn, exclude local fuzz harness
* Fix comma
* Address lint error in bootstrap.ts
* Add popups
* Move ET messages that corrupt the terminal
to toast messages instead
* As requested, I moved Eternal Terminal plugin out of Tabby core and
left only the SSH APIs needed by tabby-et
* fix(linux): query direct child processes without table-parser
* fix(linux): close tabs when ps cannot list child processes
getLinuxChildProcesses() rejects when ps is not procps: busybox ps (Alpine) answers
"ps: unrecognized option: ppid" with exit status 1, and TerminalTabComponent.canClose() awaits the
result without a catch, so closing a tab would have thrown instead of closing it. The PTY proxy now
logs that failure and reports no children, which is what the previous ps-node based code returned
on such systems. getLinuxChildProcesses() itself still rejects, as its tests require.
* fix(electron): translate Backquote in global hotkeys
* fix(electron): keep registering global hotkeys after an invalid accelerator
globalShortcut.register() throws on an accelerator Electron cannot parse, which aborted the loop
and left every hotkey after it unregistered. Log and continue with the remaining specs.
* fix(web): register @angular/compiler before other @angular packages
tabby-web-container's preload registered @angular/compiler after
@angular/cdk and @angular/cdk/clipboard. Because the module argument to
Tabby.registerModule is evaluated eagerly, requiring @angular/cdk/clipboard
pulls in @angular/common before the compiler has run.
@angular/common and @angular/cdk are shipped as partially compiled
(\u0275\u0275ngDeclare*) fesm bundles and this webpack config does not run the
Angular Linker over them, so they rely on the JIT fallback, which reads
ng.\u0275compilerFacade - published by @angular/compiler when it is evaluated:
Error: The injectable 'PlatformLocation' needs to be compiled using the
JIT compiler, but '@angular/compiler' is not available.
This aborts the whole bundle, leaving window.bootstrapTabby undefined, so
every plugin then fails with 'Attempted to require @angular/common' and the
web UI stays blank. Affects tabby-web-container 1.0.197-nightly.1 and
1.0.231-nightly.0; 1.0.189-nightly.2 (Angular 12) is unaffected.
Registering @angular/compiler first publishes the facade before anything
else is required.
* fix(web): expose window.pluginModules to the plugin-provided services
tabby-core's ConfigService.enabledServices() iterates over
window['pluginModules'] to collect providers contributed by plugins - this
is what ThemesService uses to apply the current theme. entry.ts only kept
pluginModules as a local variable, so the global was never set and
bootstrapping threw:
TypeError: window.pluginModules is not iterable
at ConfigService.enabledServices (tabby-core/dist/index.js)
at ThemesService.applyThemeVariables
Publish the array on window before building the root module.
* fix(web): tag plugin modules with their name
loadPlugins()/loadPlugin() returned the module from webRequire() as-is, but
bootstrap() reads `packageModule.pluginName` and tabby-core keys
ConfigService.servicesCache by that field:
this.servicesCache[module.pluginName] = module.\u0275inj.providers...
Since pluginName was never set, every plugin landed on the single key
"undefined" and each one overwrote the previous, leaving enabledServices()
with only the last loaded plugin's providers. Symptomatically the SSH
connection type disappeared from the "new connection" menu once tabby-telnet
started loading after tabby-ssh.
It stayed hidden because enabledServices() returns true for services it does
not recognise, so only plugins that consult the cache for a decision broke.
Tag the module in both entry points.
---------
Co-authored-by: gaoyifeng <work@gyf.name>
The settings profile list hardcoded folder/folder-open icons, ignoring the icon configured on a profile group. Render the configured icon (and color) like the profile selector does, falling back to folder/folder-open when no icon is set.
Fixes#11911
* feat(terminal): show desktop notifications and progress reported via OSC 9, 777 and 99
Handle iTerm2 (OSC 9), rxvt (OSC 777) and kitty (OSC 99) notification
sequences, plus ConEmu / Windows Terminal progress (OSC 9;4), which takes
over from output-based progress detection while reported. Notifications
are only shown when the terminal isn't focused and can be turned off in
the terminal settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(terminal): parse OSC sequences as a stream across output chunks
Replace the OSC middleware's search-and-rebuffer approach with a small
state machine that keeps its state between chunks:
- an ESC at the end of a chunk is held back, so an OSC whose `ESC ]` is
split across two chunks is no longer missed
- only the payload of the OSC codes handled here (9, 52, 99, 777, 1337)
is buffered, in linear time and up to 8 MiB; other sequences stream
straight to the frontend
- like xterm.js, an OSC ends at BEL or ESC and is aborted by CAN / SUB
- OSC 52 clipboard queries no longer clear the clipboard
Report OSC 9;4 progress with its state, including indeterminate (3),
which tab headers and the taskbar now show. Reported progress is kept
for 15 seconds without updates instead of 5, and output-based progress
detection resumes afterwards.
For kitty notifications (OSC 99), answer capability queries, honor the
occasion (`o`) and click actions (`a=focus,report`), support `p=close`,
and limit pending chunked notifications.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fixup
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Eugene <inbox@null.page>
Tabby always handles right-click itself (context menu, paste or copy).
When an app enables mouse tracking (e.g. Claude Code, tmux, vim with
mouse=a), xterm also reported the right-click to it, and apps that
paste on right-click inserted the clipboard a second time.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
setAsDefaultProtocolClient runs `xdg-settings set default-url-scheme-handler`, and xdg-utils 1.1.3 sets the handler for text/html too on GNOME, Cinnamon, MATE and LXDE. Register the scheme with xdg-mime instead.
* fix(core): save recovery state before closing the last tab's window
* fix(core): keep recovery active when browser window closure is refused
* fix(core): close the window even if the final recovery save fails
A rejected saveTabs() must not leave an empty window open; log it and close as before.