Commit Graph
55 Commits
Author SHA1 Message Date
Can Celik b431a063e2 fix: keep the macos server running when its terminal quits (#5236)
* fix: keep the macos server running when its terminal quits

refs #4920

* test: cover the macos server leaving its launchd job

refs #4920

* test: wait for the launcher to exit before checking the detached server

refs #4920
2026-10-15 20:19:09 +03:00
JJ Liebig dec3156a6f fix: recover endpoint connections promptly after wake (#5249)
* fix: recover endpoint connections promptly after wake

refs #4721

* test: wait for asynchronous endpoint pipe closure

refs #4721
2026-10-14 00:54:10 +02:00
JJ Liebig 87e5c13c60 fix: cancel and clean up endpoint connection attempts (#5247)
* fix: cancel and clean up endpoint connection attempts

refs #4721

* fix: keep probe teardown scoped to its bridge

refs #4721

* fix: preserve nonblocking bridge output and simplify cleanup

refs #4721
2026-10-13 21:24:34 +02:00
Eric YueandCan Celik be0e73f724 fix: reject oversized canonical input on macos (#4988)
refs #4950

Co-authored-by: Can Celik <ogulcancelik@gmail.com>
2026-10-11 23:39:48 +03:00
Can Celik 642134ac74 fix: save sessions before agents die during macos restart (#5092)
* fix: save sessions before agents die during macos restart

refs #4414

* fix: keep macos shutdown detection ordered across handoff

refs #4414

* fix: avoid aliasing the macos notify block

refs #4414

* test: make macos shutdown ordering tests deterministic

refs #4414
2026-10-11 23:37:52 +03:00
JJ Liebig 4f296c295b fix: preserve windows shell working directories (#5062)
refs #4472
2026-10-08 00:01:30 +02:00
JJ Liebig d46cb1bad7 fix: preserve windows sessions during shutdown (#5057)
refs #5013
2026-10-07 21:29:35 +02:00
Can Celik a124eed73c refactor: route all pane key encoding through libghostty (#5017)
* test: add input transparency conformance harness

* test: cover split host replies in input conformance harness

* fix: let libghostty encode every key sent to panes

* refactor: read live keyboard modes only from libghostty

* fix: wait for split input sequences instead of typing their fragments

* refactor: drop unused keyboard protocol argument from pane key encoding

* test: fix windows-only keyboard mode tests after libghostty mode refactor

* test: measure windows key record transparency against the keyboard layout

* fix: forward windows punctuation and altgr chords that produce no character

* test: expect libghostty kitty encoding in the windows conpty probe and cover release, alternate, text and modifyOtherKeys passthrough

* ci: lint windows-only test code in the cross-platform windows check

* refactor: delete herdr's own key encoder

* test: expect xterm modifyOtherKeys 2 encoding for shifted letters in the windows gauntlet

* refactor: read windows input through one native console reader

* refactor: parse sgr mouse reports once and map pixel reports without rewriting them

* refactor: decode framed input once instead of re-framing it in the client

* fix: keep macos alt, non-us kitty keys, text releases and reply-tail recovery correct after the libghostty switch

* fix: stop waiting for host replies the terminal never sends

* fix: deliver shifted punctuation releases after shift is let go

* fix: never type super, hyper or meta chords into panes that cannot read them

refs #4356

* test: replay reporter captures for fixed split-read and key-release issues

refs #4856
refs #4025
refs #4184

* fix: forward f1, f2 and f4 from kitty keyboard hosts

refs #4403

* fix: send pixel mouse reports to unfocused panes and only when the host supports them

refs #4750

* fix: treat 0x08 as backspace when the terminal's erase key is ctrl+h

refs #3244

* test: fix macos lint and keep the pixel mouse server test unix-only

* fix: deliver legacy alt+escape on macos instead of dropping it

* fix: address review findings on super+enter, held key releases and the pixel mouse probe

* test: expect super+enter to stay out of plain windows panes

* test: wait for the host pixel mouse mode instead of reading the channel once

* fix: send ctrl+shift+letter to plain shells as its control byte

* fix: encode each key under one keyboard mode snapshot

* fix: keep ime text intact and stop inventing key releases for committed text

* fix: release held key reports on focus loss and never drop held-key leases

* fix: send ctrl chords on non-latin layouts as their physical key

* fix: match non-latin ctrl chord releases after ctrl is let go

* fix: drop super chords before the windows conpty fallback in plain panes
2026-10-07 04:53:29 +03:00
Can Celik 950d012cf0 fix: keep agent sessions while the agent is suspended or backgrounded (#4964)
* fix: keep agent sessions while the agent is suspended or backgrounded

refs #1647
refs #1033

* fix: drop a suspended agent's session when a new one of its kind takes over

refs #1647
2026-10-05 22:33:44 +03:00
Can Celik c4653a4f10 fix: keep the server running on hangup and log why it stops (#4965) 2026-10-05 19:21:31 +03:00
Can Celik fff6c820aa refactor: extract libghostty-vt binding into ghostty-vt workspace crate (#4661)
* refactor: extract libghostty-vt binding into ghostty-vt workspace crate

* fix: build libghostty-vt into each build's out dir
2026-09-27 00:06:29 +03:00
Can CelikandJJ Liebig c411883ec6 feat!: replace the custom graphics api with optimized native kitty rendering (#4561)
* feat!: replace the custom graphics api with optimized native kitty rendering

* fix: enable safe kitty optimizations automatically

---------

Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
2026-09-24 20:59:48 +03:00
Can Celik 1c6397b1cd fix: reuse ssh authentication and add machine recovery commands (#4490)
* fix: reuse ssh authentication and add in-app mfa recovery

refs #3763

* refactor: move ssh recovery to machine cli

refs #3763
2026-09-22 19:12:29 +03:00
Can Celik 3602c757e0 fix: refresh forwarded ssh agents after reconnect (#4443)
refs #1931
2026-09-21 15:22:46 +03:00
Can CelikandJJ Liebig 0ff0f27e22 fix: preserve session layouts across shutdown and restore failures (#4400)
* fix: preserve session layouts across shutdown and restore failures

refs #4320

* test: update subscription fixture for pane restore errors

---------

Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
2026-09-21 00:29:45 +03:00
c00a62dda1 fix: preserve delayed mouse reports with confirmed keyboard input (#4247)
* fix: preserve delayed mouse reports with confirmed keyboard input

refs #3480

* fix: capture geometry before replaying buffered mouse input

refs #3480

---------

Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
2026-09-20 16:10:16 +02:00
Can Celik 266b8e3802 fix: preserve macos services across logout (#4202)
refs #4100
2026-09-15 21:37:49 +03:00
JJ Liebig 9db1eed391 fix(windows): normalize pane launch cwd casing (#4199) 2026-09-15 17:17:47 +02:00
Can Celik c77af1892f fix: clean up idle ssh bridges and back off flapping connections (#4083)
* fix: clean up idle ssh bridges and back off flapping connections

* chore: keep ssh liveness smoke tooling local
2026-09-14 03:55:53 +03:00
Can Celik 6075d25f47 fix: keep plugins working after client-only updates (#4077) 2026-09-13 23:37:26 +03:00
JJ LiebigandOgulcan Celik 8996fc54fe fix: support preinstalled windows remote hosts (#3661)
* fix: support windows hosts in saved ssh machines

refs #3651

* fix: keep windows ssh bridge writes blocking

refs #3651

* fix: close saved windows ssh bootstrap input

refs #3651

* refactor: simplify remote bridge helpers

refs #3651

* refactor: isolate remote bridge platform behavior

refs #3651

* fix: close captured ssh input under windows consoles

refs #3651

* test: remove redundant remote command assertions

refs #3651

refs #3701

* test: handle framed ssh commands in machine setup

refs #3651

---------

Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com>
2026-09-09 00:08:42 +03:00
Can Celik 62431dbd03 fix: reduce idle ssh cpu without dropping final output (#3728)
* fix: stop polling idle ssh uploads on unix

* fix: preserve ssh output during idle bridge cancellation

* test: exercise active ssh upload cancellation
2026-09-08 00:35:48 +03:00
Can CelikandJonathan Liebig e7d8220788 fix: preserve sessions after interrupted pane exits (#3418)
* fix: preserve sessions when pane shells are signaled

refs #3415

* fix: preserve shutdown checkpoints across platforms

refs #3415

---------

Co-authored-by: Jonathan Liebig <jonathan.liebig@gmail.com>
2026-09-07 15:14:46 +02:00
Can Celik 9e9bc8a144 feat: manage multiple ssh machines from one client (#3670) 2026-09-06 02:27:06 +03:00
JJ Liebig 6f57f2f62c fix: resolve Windows plugin pane launch paths (#3666)
* fix: resolve Windows plugin pane launch paths

refs #3024

* test: compare resolved Windows plugin probe paths

refs #3024

* test: compare resolved Windows plugin working directories

refs #3024

* test: wait for Windows plugin fixture completion

refs #3024
2026-09-05 21:56:17 +02:00
JJ Liebig 50ce4ec2dd fix: run the full applicable test suite on windows (#3660)
* fix: run the full applicable test suite on windows

* test: remove redundant test shell assignment

* test: make endpoint and metadata fixtures deterministic

* test: tolerate exited servers during windows probe cleanup
2026-09-05 21:39:32 +03:00
JJ Liebig ec745235a9 fix(windows): preserve LF paste order (#3582)
refs #3172
2026-09-03 19:03:47 +02:00
Can Celik d08e44686d fix(client): detach when terminal geometry is unavailable (#3531)
refs #3519
2026-09-02 16:09:19 +03:00
Can Celik 207be3c771 refactor: render the shell in the client (#3487)
* feat: add opt-in client-rendered shell

* feat: add client-owned shell mouse controls

* feat: complete client-owned shell chrome

* feat: add client-owned shell settings and notifications

* feat: run client shell custom commands

* feat: render popup terminals in client shell

* feat: add client-owned scrollback and copy mode

* fix: preserve client worktree trust defaults

* feat: render startup diagnostics in client shell

* feat: render onboarding in client shell

* feat: render product announcements in client shell

* feat: render release notes in client shell

* feat: render mobile switcher in client shell

* feat: render kitty graphics in client shell

* fix: preserve client shell lifecycle coherence

* refactor: route client shell commands through endpoint connections

* refactor: make the client-rendered shell the default

* refactor: remove monolithic launch mode

* refactor: complete client-rendered shell cutover

* perf: retain client pane surface updates

* perf: scale retained pane surface updates

* perf: remove remote pane input latency

* test: make client shell checks platform-independent

* fix: prevent client timer starvation

* test: fix client shell platform gates

* test: accept retained surfaces in cross-area checks

* test: make client mode assertions platform-neutral

* fix: badge only outdated integrations
2026-09-01 15:48:22 +03:00
JJ Liebig 5158adab10 fix(windows): launch powershell agent shims with arguments (#3455) 2026-08-31 23:22:40 +02:00
akbashandakbash-bot e3c3d44358 fix(cli): exit quietly when output pipes close (#2996)
refs #2994

Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
2026-08-19 20:39:24 +03:00
JJ Liebig 1ac44afcc0 fix(windows): strip elevated terminal title decoration (#2632) 2026-08-10 21:49:41 +03:00
Can Celik 2863b71513 feat(windows): support remote attach to unix hosts (#2329)
* feat(windows): support remote attach to unix hosts

* fix(remote): preserve unix bridge behavior
2026-08-05 19:34:24 +03:00
Can Celik df2cb2c3a5 fix(windows): detect agents across git bash exec boundaries (#2170)
refs #2107
2026-08-01 21:25:20 +03:00
Can Celik 0732039eaf fix: preserve windows sessions after ssh logout (#2098)
* fix: preserve windows sessions after ssh logout

refs #2008

* chore: document windows wmi safety

refs #2008
2026-07-30 23:39:03 +03:00
Ogulcan Celik 61f6400675 fix: repaint after transient terminal resizes 2026-07-26 15:05:28 +03:00
joonhwanandOgulcan Celik 6cfaa079a9 feat: switch IME to ASCII in prefix mode on Windows (Korean IME) (#1823)
* feat: switch IME to ASCII in prefix mode on Windows

Extend switch_ascii_input_source_in_prefix to Windows: detect IME state
via WM_IME_CONTROL and toggle to ASCII with SendInput for the Korean IME.
Other IME languages are detected and left unchanged.

refs #1802

* docs: clarify Windows (Korean IME) support for prefix ASCII switching

Follow-up to the Windows prefix ASCII switch, which extended
switch_ascii_input_source_in_prefix to Windows but left the surrounding
text describing macOS only.

- Settings row label: "(macOS)" -> "(macOS/Windows)", plus its test.
- Generalize the Windows behavior wording to "switches the IME to
  English (ASCII) input" in the config-reference.json entry and the
  model.rs doc comment, and state that Windows support is currently
  limited to the Korean IME.
- Add a :::caution aside noting the Korean-IME-only limitation to the
  en/ja/zh preview docs, keeping the three translations in sync.

refs #1802

* fix: warn when prefix IME toggle injection is incomplete

SendInput can queue fewer events than requested (for example when blocked
by UIPI), which would otherwise leave the IME silently stuck in ASCII or
native mode. Log a warning with the sent and expected counts so the failure
is diagnosable.

refs #1802

* fix: guard prefix IME restore and correct open-status naming

Address maintainer review on the Windows prefix ASCII switch:

- Restore only when safe: store the foreground window at switch time and,
  before toggling back, require that the same window is still focused and
  the IME is still in English. This stops restore from toggling another
  application or overriding a manual return to Hangul during prefix mode.
- Report injection success from send_vk_tap and only arm restoration when
  the initial toggle landed; on a partial injection retry the dropped
  key-up so a key is not left logically held down. The injection policy is
  split into send_vk_tap_with(inject) so the success, partial, and failure
  branches are unit-tested without the real SendInput.
- Correct the WM_IME_CONTROL sub-command naming: 0x0005 is IMC_GETOPENSTATUS
  (IME open state), not IMC_GETCONVERSIONMODE. Behavior is unchanged; the
  constant, comments, and tests now describe the open-status read.

refs #1802

* fix: bound IME open-status read with a timeout

The prefix IME switch reads IMC_GETOPENSTATUS via WM_IME_CONTROL, which
crosses into the terminal-emulator process. A plain SendMessageW would block
herdr's client thread until that process responds, indefinitely if it hangs.
Read through SendMessageTimeoutW with SMTO_ABORTIFHUNG and a short timeout
instead; on timeout the switch is skipped and restore does nothing, so a hung
host process can no longer freeze prefix-mode entry or exit.

refs #1802

* fix: preserve windows ime restoration after partial injection

refs #1802

---------

Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com>
2026-07-25 20:52:45 +03:00
Ogulcan Celik c1f7b6f331 fix: preserve lone escape input boundaries
refs #541
2026-07-18 02:51:29 +03:00
Ogulcan Celik e0758c3211 feat: harden named agent cli workflows
refs #1525
2026-07-17 23:59:56 +03:00
Ogulcan Celik a723dc8852 fix(windows): prevent remaining subprocess console flashes
refs #1468
2026-07-17 16:03:47 +03:00
Ogulcan Celik e907e6a366 fix(windows): hide agent manifest curl windows
refs #1468
2026-07-16 20:16:23 +03:00
Ogulcan Celik 947328fa79 feat(macos): support agent environment hints
refs https://github.com/ogulcancelik/herdr/discussions/679
2026-07-16 02:40:39 +03:00
Ogulcan Celik 220b99a9fa fix: support custom command keybindings on windows
refs #1041
2026-07-05 20:19:13 +03:00
ppggffandOgulcan Celik 2bc1724c2d fix: switch prefix ASCII input source on the foreground client (#1016)
* fix: switch prefix ASCII input source on the foreground client

The macOS prefix ASCII-switch ran in the headless server, whose
TISCopyCurrentKeyboardInputSource read is a stale per-process cache
(refreshed only via a main-run-loop notification the server never pumps),
so prefix could leave the terminal on the wrong input source.

Forward it to the foreground client, like clipboard: sync_prefix_input_source
emits AppEvent::PrefixInputSource as an intent; the server forwards it to the
foreground client and the monolithic app applies it in-process via
RealPrefixInputSource, which pumps its main run loop before the stale TIS read.
Key it on Mode::wants_ascii_input so multi-level prefix commands keep ASCII
until returning to the terminal, and restore the IME for rename text entry.

Adds ServerMessage::PrefixInputSource to the already-unreleased protocol 15.

refs #774

* fix: keep prefix input-source switch out of the headless server process

An App-internal drain (the exhaustive drain at the top of
handle_api_request, reachable from prefix-key runtime mutations) can
consume a queued PrefixInputSource intent before the server's
forwarding drain sees it, applying the TIS switch in the headless
server process and stranding the restore state. Gate the in-process
switch on App.local_input_source_switch, disabled by the headless
server alongside the other local side effects, so a swallowed intent
degrades to a skipped switch. Widen the forwarding-bypass maintenance
test to the handle_internal_event_with_prefix_sync wrapper.

refs #774

* docs: clarify prefix input-source comments and flag docs

refs #774

* fix: bump protocol for prefix input source

refs #774

---------

Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com>
2026-07-05 03:25:47 +03:00
Ogulcan Celik 26db26e416 fix: keep remote sessions alive across disconnects 2026-06-30 19:49:55 +03:00
Ogulcan Celik ef0b4bc6e2 fix: support agent env hints
refs #679

related #699
2026-06-20 03:15:21 +03:00
Ogulcan Celik 3c2b46d24a feat: add native windows beta support 2026-06-07 16:29:44 +03:00
sf-jin-kuandCan Celik f5e66b251f feat: switch input source during prefix mode (#434)
On macOS, opt-in under [experimental], temporarily switch the host input
source to the current ASCII-capable layout while prefix mode is active so
prefix commands register even when a CJK IME is composing, then restore the
previous input source when prefix mode exits or is cancelled. No-op when the
current source is already ASCII-capable, on non-macOS platforms, or when any
input source call fails. Pane text input is unaffected.

Also pin next_resize_poll in next_loop_deadline_includes_selection_autoscroll_deadline
so the selection autoscroll deadline stays the earliest; the default resize
poll could otherwise beat it and flake the assertion.

refs #400

Co-authored-by: Can Celik <ogulcancelik@gmail.com>
2026-06-03 19:13:01 +03:00
Ogulcan Celik 659badf106 fix: avoid agent detection from runtime arguments
refs #238
2026-05-21 22:17:37 +03:00
Ogulcan Celik 5be7d07018 fix: cap clipboard image reads 2026-05-20 14:40:01 +03:00