Commit Graph

37 Commits

Author SHA1 Message Date
Ogulcan Celik ffb6c8967d test: make client mode assertions platform-neutral 2026-09-01 15:39:57 +03:00
Ogulcan Celik 4ab8bb53bc perf: retain client pane surface updates 2026-09-01 15:39:57 +03:00
Ogulcan Celik f02a432faa refactor: complete client-rendered shell cutover 2026-09-01 15:39:57 +03:00
Ogulcan Celik 2db663b27b refactor: remove monolithic launch mode 2026-09-01 15:39:57 +03:00
Ogulcan Celik 21425a00c2 refactor: make the client-rendered shell the default 2026-09-01 15:39:57 +03:00
Ogulcan Celik 47e71b6686 fix: preserve client shell lifecycle coherence 2026-09-01 15:39:57 +03:00
akbash 8fe09d5ddf fix: preserve multiline paste in terminal attach (#3056)
refs #3054

Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
2026-08-21 15:16:43 +03:00
akbash 1b56601630 fix: honor mouse capture config in terminal attach (#2995)
refs #2992

Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
2026-08-20 02:07:16 +03:00
Can Celik b660cad804 fix(client): handle remote terminal hangup (#2827)
refs #2424
2026-08-15 15:03:59 +03:00
David Heinemeier Hansson 350f001320 feat: keep the outer terminal window title in sync with the session (#2627)
* feat: keep the outer terminal window title in sync with the session

Herdr emulates the terminals in its panes, so an OSC 0/OSC 2 title
written inside a pane stops at Herdr and never reaches the terminal
Herdr itself runs in. That outer title is what window managers read for
title bars, tab bars, and group bars, so it kept showing whatever the
shell or ssh happened to leave behind.

Add `ui.window_title`, rendered from {hostname}, {workspace}, {tab},
{pane}, and {terminal_title}, and push it to the foreground client
whenever it changes. It renders on the server, so {hostname} names the
machine the panes actually run on rather than the machine a thin remote
client runs on, and it is gated on a pending render so an idle loop
never pays for it.

A title is only remembered as delivered once a foreground client takes
it, so the first client to attach is written to rather than skipped.
`client.window_title.set` still wins over the configured title, and
clearing it now hands the title back to `ui.window_title` instead of
only "herdr".

* fix: deliver the outer window title to a newly attached client

ClientConnected assigns the foreground client directly rather than going
through promote_client_to_foreground, so clearing the sent-title cache
there missed the case that matters most: attaching a second terminal to a
running session. The title was usually unchanged, so the sync returned
early and the new terminal kept whatever its shell or ssh had left.

Key the cache on the client that received the title instead of relying on
every foreground assignment to invalidate it.

* perf: keep hidden pane output off the window title path

Output from a hidden or background pane sets needs_render without setting
needs_full_render, and the retained render plan then skips presentation
for it entirely. Syncing the title on needs_render meant every coalesced
hidden-output tick still formatted, sanitized, and allocated a title that
could not have changed, against the hidden-source early exit AGENTS.md
requires.

Every input to the title is app state, which always requests a full
render, so gate on that instead. The one exception is the focused pane's
own terminal title, which arrives through PTY parsing, so ask for a full
render when that changes and the configured title uses it.

* fix: only cache a window title a client writer received

* fix: carry an api set window title across a live handoff

* fix: make outer window title updates event-driven

---------

Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com>
2026-08-11 03:04:12 +03:00
akbash ca1af383a8 fix(client): avoid abort on terminal hangup (#2427)
* fix(client): avoid abort on terminal hangup

refs #2424

* test(client): gate PTY integration on unix

refs #2424

---------

Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
Co-authored-by: Can Celik <ogulcancelik@gmail.com>
2026-08-09 17:45:40 +03:00
Matt Coles b4112743cf fix(client): restore terminal on sighup and sigterm
Enable termination-signal handling so SIGHUP and SIGTERM follow the graceful
quit path and restore terminal state. Log handler registration failures and
add PTY coverage for direct SIGHUP and server EOF restoration

Co-authored-by: Matt Coles <macols@amazon.com>
2026-07-31 00:46:01 +03:00
Ogulcan Celik 3e8f9df14e fix: improve config diagnostic delivery 2026-07-10 17:28:31 +03:00
Ogulcan Celik e713949ca5 test: wait for client frame before crash assertion 2026-07-05 03:00:45 +03:00
Ogulcan Celik 8b74fb8a12 feat: emit placement mutation events 2026-06-29 20:39:54 +03:00
Ogulcan Celik 7f702a7ad0 test: harden pane identity regression coverage 2026-06-14 19:03:16 +03:00
Ogulcan Celik 17544c36ee fix: make macos ci socket tests deterministic 2026-06-14 04:42:50 +03:00
Ogulcan Celik d35c642ef3 feat: add pane move api and cli
refs #299
2026-06-13 01:59:24 +03:00
Ogulcan Celik 4001fd2ec8 feat: improve toast ergonomics
refs #486
2026-06-06 17:42:38 +03:00
Ogulcan Celik fc4e1bbf6b perf: reduce sidebar git polling overhead
refs #353
2026-05-30 23:58:34 +03:00
Ogulcan Celik 420925d141 fix: support scrolling direct agent attaches 2026-05-24 21:30:04 +03:00
Ogulcan Celik 9817820af1 feat: add worktree cli and socket api 2026-05-23 15:19:36 +03:00
Ogulcan Celik 06bcd06a17 feat: use local keybindings for remote attach 2026-05-21 15:17:37 +03:00
Ogulcan Celik 54d3d3b4d4 test: close pty masters before waiting 2026-05-20 23:08:47 +03:00
Ogulcan Celik ed478be983 fix: bridge remote clipboard image paste
refs #205
2026-05-20 02:51:59 +03:00
Ogulcan Celik e7f94a3f35 feat: support hermes agent integration
refs #144
2026-05-19 00:26:05 +03:00
Ogulcan Celik 73dba97521 fix: forward pane cursor shape
fixes #116
2026-05-15 20:53:55 +03:00
Ogulcan Celik ed4253d603 feat: add tmux-style mouse capture config 2026-05-14 02:50:00 +03:00
Ogulcan Celik 4da250ad17 test: update protocol fixtures 2026-05-13 14:51:47 +03:00
Ogulcan Celik 9663028a82 test: disable real sound playback during checks 2026-05-11 16:39:24 +03:00
Ogulcan Celik 9f210e9738 chore: enable clippy linting 2026-05-09 23:16:24 +03:00
Ogulcan Celik 793f127e54 feat(remote): add network-efficient thin client transport
Add SSH stdio remote attach, negotiate terminal-ANSI render encoding, move blit encoding server-side for remote clients, and split control/render writer delivery for safer backpressure.

Fixes #76
2026-05-08 22:20:04 +03:00
Ogulcan Celik b0aa7b2cdd fix: preserve osc8 hyperlinks in client rendering
fixes #73
2026-05-07 21:48:50 +03:00
Ogulcan Celik e9547a8e0d feat: refine live config lifecycle 2026-04-26 17:06:00 +03:00
Ogulcan Celik 3d1ef155bf feat: add live config reload 2026-04-26 02:07:33 +03:00
Ogulcan Celik 3d6f3e7862 test: reduce persistence integration test sleeps and harness duplication 2026-04-22 21:23:18 +03:00
Can Celik 3397e1ce29 feat: add persistent server-client sessions
Make herdr persistent by default.

   Launching herdr now starts or reattaches to a background session
   server. Clients can detach and reattach while panes and agent
   processes keep running. Session mode now supports multi-client attach,
   auto-detect startup, and a thin-client/headless-server split.

   This also refactors the large app, ui, input, pane, config,
   workspace, and persistence modules into smaller focused submodules,
   while preserving behavior and colocating tests with the code they
   exercise.

   Upgrade notes:
   - persistence mode is now the default
   - in-app quit detaches the current client instead of stopping the server
   - use `herdr server stop` to stop the background session
   - use `--no-session` for the old single-process behavior
   - default socket paths now live under the config directory
2026-04-21 16:30:04 +03:00