Commit Graph
3259 Commits
Author SHA1 Message Date
Aram Drevekenin 24f2173fbc fix: deadlock with blocking panes (#5152)
* fix: deadlock with blocking panes

* rustfmt

* add pr
2026-05-08 18:25:37 +02:00
Aram Drevekenin e927b2b659 fix: occasional stall when querying host terminal (introduced in 0.44.1) (#5149)
* fix(client): unwedge termwiz on unrecognized CSI sequences

* rustfmt

* add pr
2026-05-08 09:51:20 +02:00
divens cc86e31b84 fix(windows): bump windows-sys to 0.59 (#5139)
The workspace `windows-sys` constraint was pinned to 0.52 while the
Windows source uses APIs and namespaces from 0.59 (e.g. WriteFile in
Win32::Storage::FileSystem). CI built fine because Cargo.lock pinned
0.59, but downstream `cargo install`/`cargo binstall` did fresh
resolution and selected 0.52, breaking the build for users on Windows.

Align the manifest with the code:
- Bump workspace dep `windows-sys` from 0.52 to 0.59.
- HANDLE is now `*mut c_void` instead of `isize`: replace
  `handle == 0` / `!= 0` with `is_null()`, initialise HANDLE locals
  with `std::ptr::null_mut()`, and pass `null_mut()` as the
  hTemplateFile argument to CreateFileW.
- Pass the process HANDLE through the exit-monitor thread as `usize`
  (raw pointers are not Send; OS handles are safe to use cross-thread).
- Note: HPCON is still `isize` in 0.59, so its zero-init is unchanged.
2026-05-06 17:02:10 +02:00
Aram Drevekenin 5ef8176c43 Independent tab sizes (#5133)
* feat: allow independent tab resizing

* rustfmt

* add pr
2026-05-05 16:07:04 +02:00
Aram Drevekenin f2e02cf1af bump changelog after release 2026-05-05 09:20:55 +02:00
Aram Drevekenin 8a0594f8eb fix: when publishing, publish current branch rather than hardcoded main (#5127)
* fix: when publishing, publish current branch rather than hardcoded main

* add pr
2026-05-04 09:55:15 +02:00
Aram Drevekenin b5e39d5424 Fullscreen resize fixes (#5117)
* fix: properly handle resize while pane is in fullscreen

* fix: re-update fullscreen after closing editor pane

* rustfmt
2026-05-01 11:42:04 +02:00
Aram Drevekenin 9149537583 fix: buffer pty processing while waiting for host query reply (#5113)
* fix: block pty byte processing while waiting for host terminal reply

* rustfmt

* add pr
2026-04-30 18:15:06 +02:00
Simoyd 71e388a2e2 fix(windows): stop reusing terminal pane ids (#5082)
Prevent late ClosePane events from closing newly spawned panes by making Windows terminal IDs monotonic. This matches the Unix backend and avoids stale pane-id collisions after a pane is closed and reopened.
2026-04-29 15:39:38 +02:00
Aram Drevekenin 0126a19f48 Update CHANGELOG.md 2026-04-29 15:07:35 +02:00
Ivan Smoliakov 50bac0807f fix: incorrect interpretation of unicode keys (#5110) 2026-04-29 15:06:49 +02:00
Aram Drevekenin 79c0e20887 Implement DECQRM for CSI2031 (#5111)
* implement DECQRM for CSI2031

* add pr
2026-04-29 14:12:05 +02:00
Aram Drevekenin 227142dd56 Support CSI2031 (dark/light theme switching) + remove STDIN cache to avoid stale color queries (#5105)
* initial phase 1 implementation

* various fies

* some fixes

* fix fragmented stdin cases

* some fixes

* renaming

* guard against old clients

* implement csi 2031

* allow toggling theme with actions

* rustfmt

* fix: finalize trailing characters in ansi parser as well

* add pr
2026-04-28 17:14:59 +02:00
Aram Drevekenin de23ade4d6 upgrade rustls-webpki (#5106) 2026-04-28 16:07:05 +02:00
Aram Drevekenin 5ab8b6870c docs(changelog): duplicate char fix 2026-04-22 15:10:27 +02:00
TMYandAram Drevekenin 902e0bbd66 fix(web-client): prevent IME input text repetition (#4975)
* fix(web-client): prevent IME input text repetition

Fix bug where composing multi-character strings via IME (e.g. Chinese input method) would write the entire string N times for N characters.

Previously, parse_stdin sent the entire input buffer as raw_bytes for each KeyEvent parsed from that buffer. When IME composes "你好" (2 chars), InputParser creates 2 KeyEvents, but both carried the full "你好" bytes, causing it to be written twice.

Now, when multiple events are parsed from one buffer, each Char KeyEvent carries only its own UTF-8 bytes. Single-event buffers (most ASCII input) remain unchanged.

Fixes #4974

* fix: guard per-char raw_bytes with modifiers check

Only use per-character UTF-8 encoding for unmodified Char events in multi-event buffers. Modified keys (e.g. Ctrl+C) retain the original buffer to preserve correct VT bytes. Also clarify the comment.

* test(web-client): cover IME raw byte handling

* rustfmt

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-04-22 15:09:25 +02:00
Aram Drevekenin 2897ab4898 fix: lost web characters (#5080)
* fix: lost web characters

* add pr
2026-04-21 09:17:53 +02:00
Thomas Linford 7d647f7b78 fix: kitty keyboard restore on error path + 2026 DECRPM state 3 handling (#5058)
* fix: kitty keyboard cleanup on error path + 2026 DECRPM state 3 handling

lib.rs: handle_error now exits kitty keyboard protocol (ESC[<1u) before
printing the backtrace, matching the normal exit path. Previously the
kitty keyboard mode was left active on crash, corrupting subsequent
terminal input.

stdin_ansi_parser.rs: synchronized_output_from_bytes now treats DECRPM
state 3 (permanently set) as enabled, matching states 1 and 2. State 3
is a valid "supported and on" response that was previously falling through
to None (treated as unsupported).

* docs: update changelog

* refactor(client): unify terminal teardown/setup sequences

- Extract named constants for all terminal escape sequences
- Add terminal_teardown_message() helper used by all three exit paths,
  fixing several pre-existing inconsistencies in the process:
  - handle_error was missing RESET_STYLE and SHOW_CURSOR
  - remote client had kitty keyboard exit after EXIT_ALTERNATE_SCREEN
    instead of before
  - goodbye path had goto positioned in the alt screen before exit
  - RESET_STYLE/SHOW_CURSOR are now sent after EXIT_ALTERNATE_SCREEN
    so they take effect in the normal screen
- Replace write() with write_all() throughout; drop redundant let _ =
  on unwrap() calls

* docs: update changelog
2026-04-20 21:32:34 +02:00
Aram Drevekenin aa29cbaf66 Some idle CPU and disk/io fixes, new CommandChanged plugin Event (#5063)
* initial implementation

* fix mouse cpu spam

* prevent excess metadata write and prune sessions on startup

* consolidate CommandChanged and PaneCommandChanged

* tests

* rustfmt

* add pr
2026-04-17 14:08:48 +02:00
divens 0d8ebaa234 fix(windows): skip modifier re-encoding for Char keys in cast_crossterm_key (#5014)
PR #4967 added VT modifier encoding for non-Char keys but the guard
condition also matched Char keys, re-encoding Ctrl+C from [0x03] to
CSI u sequence \x1b[3;5u which shells don't understand. Skip the
encoding block for Char keys since they already handle modifiers.
2026-04-15 09:54:38 +02:00
Aram Drevekenin a8372a09cd bump development version 2026-04-08 12:59:55 +02:00
divensanddivens 442cb15724 fix(ci): pin WiX CLI to v6.0.2 to avoid v7 OSMF EULA gate (#5012)
WiX v7 introduced a mandatory EULA acceptance that breaks unattended
CI builds. Pin the dotnet tool install to 6.0.2 to match the extension.

Co-authored-by: divens <[email protected]>
2026-04-07 16:43:36 +02:00
Aram Drevekenin f2af4fe5e3 HOTFIX: remove riscv as it's breaking the release v0.44.1 2026-04-07 15:05:41 +02:00
Aram Drevekenin 120b649c48 chore(release): v0.44.1 2026-04-07 14:47:27 +02:00
Aram Drevekenin 7faac6f4ae Minor fix before patch version (#5011)
* bump patch version

* fix: preserve row background when scrolling

* add pr
2026-04-07 11:57:07 +02:00
Aram Drevekenin 985cca716e docs(changelog): osc52 report pr 2026-04-07 11:20:46 +02:00
Michael HoangandMichael Hoang b8057186b5 feat(zellij-server): report OSC 52 clipboard support over DA1 (#4545)
As Zellij always handles OSC 52 from inner programs and then forwards
it appropriately (`copy_command`, `copy_clipboard`), I think it makes
sense to unconditionally report OSC 52 support.

Co-authored-by: Michael Hoang <[email protected]>
2026-04-07 11:19:23 +02:00
Aram Drevekenin 93c7ef5249 Fix pty race when opening new panes (#5010)
* fix: race condition when starting panes

* rustfmt

* add pr
2026-04-07 08:53:35 +02:00
Aram Drevekenin 060b7f41a0 docs(changelog): underline reset fix 2026-04-06 15:10:59 +02:00
Kószó Attilaandkazimazi 9bf9bafa1b fix(ansi): reset bold should not entail reset underline (#4962)
Co-authored-by: kazimazi <[email protected]>
2026-04-06 15:10:13 +02:00
Aram Drevekenin 4d0115b136 docs(changelog): update --name pr 2026-04-06 10:35:29 +02:00
divensanddivens 2b3ae1e69c fix: respect --name flag when creating new panes (#4979)
* fix: respect --name flag when creating and renaming panes

Three issues fixed:

1. Pane creation: --name was silently discarded for default shell panes
   because use_terminal_title was true. Now user-provided names take
   priority. Also pass initial_pane_title as pane_name to TerminalPane
   constructor (was hardcoded to empty string).

2. CLI rename without --pane-id: was routed through PaneNameInput which
   appends to existing name. Now uses a dedicated RenameActivePane action
   that fully replaces the name, working for any name length including
   single characters.

3. Interactive rename: entering rename mode preserves the existing name
   for editing (append/backspace). Esc reverts to the name before rename
   mode was entered.

Adds 28 tests covering rename semantics, interactive editing, undo,
OSC title interaction, and a wire-level IPC round-trip test.

* refactor: route active-pane rename via Option<PaneId>

Replace the dedicated Action::RenameActivePane variant with an
Option<PaneId> on the existing Action::RenamePaneByPaneId. route.rs
dispatches None to the server-internal ScreenInstruction::RenameActivePane
and Some(id) to the existing RenamePaneWithPaneId path.

Drops all proto/conversion boilerplate for the removed variant: plugin
API additions, IPC tag 137, and both directions of the wire conversion.

---------

Co-authored-by: divens <[email protected]>
2026-04-06 10:34:23 +02:00
Aram Drevekenin d52e1aa2b8 docs(changelog): update recent PRs 2026-04-03 10:24:20 +02:00
Satoru HigaandAram Drevekenin 27a825ebdc fix: position host cursor for CJK IME even when app hides cursor (#4951)
* fix: position host cursor for CJK IME even when app hides cursor

When apps like Claude Code (ink/React library) hide the cursor during
rendering, Zellij's render_cursor() was not sending a CUP sequence to
the host terminal. This caused IME composition candidates to appear at
the wrong position, breaking CJK input in these apps.

Change cursor_coordinates() to return the cursor position unconditionally
(as long as it is within bounds) along with a bool indicating visibility.
render_cursor() now positions the host cursor even when the app has hidden
it, so the IME subsystem can read the correct cursor position.

* add test

* rustfmt

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-04-03 10:21:34 +02:00
divensanddivens cbe0237b1e fix(windows): encode modifiers in raw bytes for non-Char keys (#4967)
On the native console input path, crossterm captures modifier flags
from INPUT_RECORD but the raw bytes written to the PTY don't include
them. This causes inner applications to never see ALT, SHIFT, or CTRL
modifiers for keys like Enter, Tab, Backspace, arrows, and function
keys.

Encode modifiers using standard VT conventions:
- Simple keys (Enter, Tab, Backspace): ALT uses ESC prefix, other
  modifiers use CSI u encoding
- CSI letter-final keys (arrows, Home, End): xterm modifier parameter
- CSI tilde keys (PageUp, Delete, F5+): modifier before tilde
- SS3 keys (F1-F4): convert to CSI with modifier

Co-authored-by: divens <[email protected]>
2026-04-03 10:04:41 +02:00
0532949bbd fix(web-client): use base URL when switching sessions (#4981)
* fix(web-client): use base URL when switching sessions

Session switch redirected to /{session_name} instead of
{base_url}/{session_name}, breaking reverse proxy setups.

Use getBaseUrl() to construct the redirect URL, consistent with
how auth.js and connection.js already handle base URL.

Fixes #4980

Co-authored-by: Copilot <[email protected]>

* fix(web-client): encode session name in redirect URL

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* docs: update changelog
---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Co-authored-by: Thomas Linford <[email protected]>
2026-04-02 12:05:51 +02:00
Aram Drevekenin 1411b2d9ad Fix bce and other issues (#4992)
* fix bce and other issues

* rustfmt

* add pr
2026-04-02 11:54:15 +02:00
Thomas Linford 6542afabd8 fix(e2e): stabilize tests and support Apple Silicon local dev (#4952)
- cross-compile musl binary on macOS via cargo-zigbuild, with
arch-independent symlink so snapshots are stable across x86_64 and aarch64

- kill_running_sessions() now calls stop_zellij() instead of
start_zellij(), eliminating 3s startup per test

- prevent steps from firing prematurely by tightening completion conditions
and adding re-send logic for garbled keys
2026-04-01 12:41:07 +02:00
Aram Drevekenin 7c68623580 Move from native-tls to rustls in the remote client (mirrors the web server) (#4972)
* native-tls -> rustls

* add/update tests

* rustfmt

* add pr
2026-03-31 20:19:50 +02:00
Nitin GuptaandAram Drevekenin 50c029afaf Preserve scrollback for partial scroll regions starting at top (#4941)
* Preserve scrollback for partial scroll regions starting at top

When a partial scroll region starts at row 0 (the top of the viewport),
lines scrolled off the top were silently discarded via viewport.remove(0)
instead of being transferred to lines_above (the scrollback buffer).
This affected both add_canonical_line and rotate_scroll_region_down.

Applications like Codex CLI use partial scroll regions to push rendered
content into terminal scrollback (via DECSTBM + newlines). In tmux,
these lines are preserved in the scrollback buffer and accessible via
copy-mode scrolling. In Zellij, they were lost, causing mouse wheel
scrolling to show only stale pre-application content.

Transfer lines to lines_above when scroll_region_top == 0 and alternate
screen is not active, matching the behavior of tmux.

* add selection handling to CSI S, add matching handling for CSI M, add tests

* add pr

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-03-31 16:28:07 +02:00
Aram Drevekenin 22ace8e54f Proper error when providing layout name with a tab (#4958)
* proper error when providing layout name with a tab

* rustfmt
2026-03-30 20:34:12 +02:00
Aram Drevekenin 00c6b0f549 Error on socket paths that are too long (#4957)
* error on socket paths that are too long

* add pr
2026-03-30 16:43:01 +02:00
Aram Drevekenin 8ce05f0bbd Layout string flag (#4956)
* allow sending a stringified layout with --layout-string

* add --tab-id to all the things

* fix windows tests

* add pr
2026-03-30 16:02:09 +02:00
Aram Drevekenin 16beceaa0a docs(changelog): recent windows fixes 2026-03-28 10:40:20 +01:00
divensanddivens d12b75800c fix: resolve Windows compilation warnings (#4890)
- Consume unused CompilationResult from embed_resource::compile in build.rs
- Gate std::io::prelude import with #[cfg(unix)] since it's only used by
  daemonize_web_server which is unix-only

Co-authored-by: divens <[email protected]>
2026-03-28 10:38:37 +01:00
Hiro ec0834f4f2 fix(windows): normalize temp socket paths (#4923) 2026-03-28 10:37:00 +01:00
Aram Drevekenin 608cc9905d Support OSC-99 desktop notifications (#4931)
* initial implementation

* tests

* fix: always report to zellij, only report to app if it wants a report

* rustfmt

* fix: always report capabilities to panes requesting them

* rustfmt

* add pr
2026-03-28 09:19:54 +01:00
Aram Drevekenin 802c96f5fc CLI focus-pane-id and are-floating-panes-visible actions (#4926)
* add zellij action focus-pane-id

* zellij action are-floating-panes-visible

* fix e2e tests

* add pr
2026-03-27 16:23:14 +01:00
Aram Drevekenin 2134deb5d5 docs(changelog): riscv64 binaries 2026-03-27 08:33:58 +01:00
Bruno Verachten 62f0bb361c ci: add riscv64 to release binaries (#4913)
* ci: add cross-compilation test for riscv64

* ci: add riscv64 to release binaries

* ci: switch riscv64 to musl target, consistent with other Linux targets

* ci: remove separate cross-compile workflow (not needed per reviewer)
2026-03-27 08:32:51 +01:00