1143 Commits
Author SHA1 Message Date
Aram Drevekenin 333d7898a8 Run keybinding improvements (#5701)
* add ORIGIN_PANE_ID to Run commands started from a keybinding

* RunInBackground

* add pr
2026-10-09 16:14:47 +02:00
Aram Drevekenin b1033be2a3 Improved mouse handling (#5697)
* configurable mouse bindings

* feat(bars): reorder tabs with mouse drag, clickable status-bar shortcuts with hover effects

* fix tests

* add pr
2026-10-09 11:59:23 +02:00
Aram Drevekenin 9dacbc1982 allow dangerously disabling certificate on non-localhost (#5694)
* allow dangerously disabling certificate on non-localhost

* add pr
2026-10-08 11:26:00 +02:00
8LWXpgandAram Drevekenin b24a7a1e3e Add support for mouse horizontal scroll (#4860)
* rebase on upstream/main

* test: implement scroll_left/scroll_right on mock panes

* remove faux handling for left/right and add tests

* add pr

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-10-07 19:16:33 +02:00
Aram Drevekenin 3cfd57f89a fix(resurrection): stop saving layouts that fail to reload, and attach to live sessions regardless (#5690)
* fix(resurrection): stop saving layouts that fail to reload, and attach to live sessions regardless

* add pr
2026-10-07 14:52:11 +02:00
Myah MitchellandAram Drevekenin 6af3a36eb8 feat(plugin-api): let a plugin give its layout space back while empty (#5590)
* feat(plugin-api): let a plugin give its layout space back while empty

A plugin mounted in a layout as a bar keeps the row the layout reserved
for it even when it has nothing to draw, so an empty bar shows as a blank
line. Nothing in the plugin API could give that row up: HideSelf
suppresses the pane and brings it back through add_tiled_pane, which
re-inserts it by splitting rather than at its layout position, and
CloseSelf does not come back at all.

SetSelfCollapsed takes the pane out of the constraint solve without
taking it out of the layout. The pane keeps its size constraint while it
is out, so a Fixed(1) bar is still Fixed(1) when it rejoins and expanding
restores exactly what the layout asked for, while constrain_spans makes
its neighbors grow over the space in the meantime.

Collapsed panes are tracked separately from panes_to_hide, which
fullscreen overwrites wholesale, so a collapse survives entering and
leaving fullscreen. They are also left out of the viewport offset, since
a pane holding no space must not shrink the viewport, and their state is
dropped when the pane closes so a reused pane id does not arrive already
invisible.

* test(tab): cover collapsing a pane out of the layout and back

Pins down what the collapse is for: the neighbors take the space, the
collapsed pane keeps its size constraint so expanding restores the layout
exactly rather than approximately, and the collapse outlives a fullscreen,
which rebuilds the hidden set from scratch.

Also covers the two ways it should do nothing: a second collapse of an
already collapsed pane, and a pane id that is not in the tab. Closing a
collapsed pane drops the state, so a reused id does not come back
invisible.

* fix(screen): keep one deferred collapse per pane instead of a queue

A plugin sends this whenever its content comes and goes, so a plugin
with no pane in any tab would otherwise leave an entry behind on every
change, all of them replayed the next time a tab is created. Only the
most recent word on a pane means anything, so drop the earlier one.

* fix(tab): keep a collapsed pane's geometry current across a relayout

Being filtered out of the constraint solve is what stops a collapsed pane
from holding space, but it also means nothing writes geometry to it. That
was fine while the tab kept its shape and wrong the moment it did not: the
pane was left describing a display area that no longer existed.

Worse than stale, because the solver reads the layout tree back off where
the panes currently sit. A one-row bar collapsed in a 121x20 tab that then
became 118x23 stayed at y 19 in a tab whose last row was 22, so the next
solve was handed a tree that did not match the screen and gave up. The bar
came back three rows above the bottom, at a width wider than the tab, and
its neighbor never gave the row back.

Let collapsed panes take part in the resize and the relayout, then collapse
them again over the result, which is what fullscreen already does a few
lines above for the same reason.

* docs(changelog): note the plugin collapse command

Links the tracking issue rather than a pull request, since no pull
request is open yet. Wants updating to the pull request URL once there
is one, to match every entry in the released sections.

* fix(tab): give a collapsed pane's row back to the viewport after a relayout

A relayout solves with the collapsed panes taking part, and the layout
offsets the viewport while they are still there. Collapsing them again
afterwards handed their rows back to the panes around them, but not to the
viewport, so a collapsed bar went on holding its row out of it until the
next resize. Fullscreen reads the viewport, so it would not cover that row
either.

Offset the viewport again once the collapsed panes are gone, the same as
resize_whole_tab already does.

* refactor(tiled-panes): keep the hidden pane bookkeeping in PanesToHide

Fullscreen and collapse both hide tiled panes, and each needs to undo only
what it hid. Until now that was done by keeping collapsed panes in a set of
their own and rebuilding panes_to_hide from both sources whenever either
changed, which every caller had to remember to do.

panes_to_hide is now a PanesToHide struct that tracks the two reasons
separately: panes beneath a fullscreen pane, and covered panes such as a
plugin that collapsed itself. set_fullscreen and unset_fullscreen only
touch the first, set_covered and unset_covered only the second, so a
covered pane stays hidden across a fullscreen without any rebuilding, and
the fullscreen pane itself is never hidden.

add_to_hidden_panels and remove_from_hidden_panels had no callers and
wrote straight into the set, so they are gone.

* fix(plugin-api): collapse the slot being rendered for a shared plugin

set_self_collapsed sent env.plugin_id, which for a shared plugin is the
instance and not any of its panes, so a shared plugin such as the bundled
bars could not collapse at all. Resolve the pane through self_pane_id like
the other self commands do, and list SetSelfCollapsed in is_self_command so
a shared plugin can only use it while a slot is current.

* feat(plugin-api): let a shared plugin collapse a slot by id

The other self commands have a slot form that names the pane outright, so
a shared plugin can use them from update or pipe, where no slot is current
and the self form is refused. set_collapsed_slot does the same for
set_self_collapsed, with the ownership check and response the other slot
commands give.

* fix: resurrection, covering selectable panes, mouse clicks, closing, paneinfo

* rebuild assets

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-10-06 13:23:29 +02:00
Lucca HuguetandAram Drevekenin 7554d23b03 fix: preserve relative pane order when reapplying tiled layouts (#5687)
* fix: preserve relative pane order when reapplying tiled layouts

* fix: cli action timeout

* fix flaky test

* rustfmt

* add pr

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-10-06 11:18:06 +02:00
Aram Drevekenin 201c1593da Interactive configuration, popups, notifications, right-click menu (#5685)
* ui components

* right click menu + popups

* settings screen

* various fixes

* presets in config

* zellij prompt - ui elements in the cli

* context menu shortcuts and toggle, keybindings in popups, info popups + zellij prompt notify

* smart config writing and some leftovers

* keybindings/right-click/config editors

* some wrapups

* feat(plugins): add prompt() plugin API for zellij:prompt, dialog forms, and Text labels in widgets

* theme editors

* upstream by-id action types, config env for new panes only, smaller saved menu config, web right-click, example config

* upstreamify

* rustfmt

* fix windows and theme editor layout

* add pr
2026-10-05 18:46:12 +02:00
Aram Drevekenin 1dbc292398 fix: screen surface stability (#5683)
* fix: tiled panes stability

* fix floating panes stability

* additional general fixes

* add pr
2026-10-05 16:47:26 +02:00
Myah Mitchell b1d228f55a fix(screen): keep sending events to suppressed plugin panes (#5680)
* fix(screen): keep sending events to suppressed plugin panes

A plugin that hides itself (hide_self, hide_pane_with_id or hide_slot)
moves into the tab's suppressed panes. Event delivery only looked at the
tiled and floating panes, so a hidden plugin stopped receiving ModeUpdate,
TabUpdate, PaneUpdate and InputReceived, and could never learn that it
should show itself again.

Include suppressed plugin panes when updating input modes and when picking
the plugins for a broadcast event. Render targeting and the client visible
plugins report still use get_plugin_ids, so a suppressed plugin is not
rendered.

* docs(changelog): note suppressed plugins receiving events
2026-10-05 11:15:45 +02:00
ZykinoandZykino ef497e1ae3 NestedListItem::new require Text instead of &str (#5611)
Part of the change was done with `ast-grep run -p 'Text::new($A)' -r 'Text::from($A)' --update-all`

Co-authored-by: Zykino <[email protected]>
2026-09-30 19:26:19 +02:00
JackGrenceandAram Drevekenin f39617a4db fix: preserve display width when erasing wide characters (CJK) (#5657)
* fix: preserve display width when erasing wide characters

Calculate end-of-line padding from the retained row's display width instead of character indices, ensuring erased wide characters are replaced with enough spaces to cover all their screen columns.

Add regression coverage for wide characters, including erasing from the second half of a character.

* some additional correctness fixes

* rustfmt

* add pr

* fix flaky test

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-09-28 15:26:22 +02:00
Aram Drevekenin 208a0da5e9 Resource usage optimizations (#5662)
* shared instance plugins

* reduce needless allocations and share memory

* fix: read buffer bug

* idle plugin fixes and optimizations

* trim allocator for glibc on pane close

* fix flaky integration tests

* refactor: naming

* rustfmt

* add pr
2026-09-28 10:58:12 +02:00
Thibault SaunierandAram Drevekenin fc400dfef9 feat(web): add WebSocket heartbeat to prevent false disconnections (#4633)
* feat(web): add WebSocket heartbeat to prevent false disconnections

Idle WebSocket connections are often silently closed by network
intermediaries (e.g. Cloudflare's 100s idle timeout), causing false
"connection lost" messages even though the session is still alive.

Keep the control WebSocket alive by sending a protocol-level Ping
every 30s and closing the connection if no Pong is received within
45s. Browsers reply to Pings automatically below the JS layer, so
this keep-alive survives JS event-loop blocks and tab throttling.

* add some cleanups

* rustfmt

* add pr

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-09-25 13:45:16 +02:00
Aram Drevekenin 53051a1a32 fix: resize state and correctness (#5656)
* fix: resize state and correctness

* rustfmt

* add pr
2026-09-25 11:39:39 +02:00
Tyler KellerandAram Drevekenin 2fce032cce fix(kitty-graphics): zlib-compress images forwarded to the host terminal (#5608)
* fix(kitty-graphics): zlib-compress images forwarded to the host terminal

`emit_kitty_transmit` sent every image to the host as uncompressed RGBA
base64 (`f=32,t=d`), about 20x the size of a PNG the application sent,
and re-sent it on every tab switch, pane split and resize step. Compress
the cached host payload with zlib and tag the transmit with `o=z`, which
the kitty protocol defines as part of its base feature set.

Measured with a headless client at 429x77 (8x17 px cells): a 121 KB PNG
went from 2.4 MB to 163 KB on the wire, a 943 KB PNG from 19.9 MB to
1.9 MB, with no measurable change in server CPU.

Fixes #5596

* fix: conditional zlib compression depending on outer terminal support

* rustfmt

* add pr

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-09-25 10:33:28 +02:00
Aram Drevekenin 3e470a43dc fix: stop host terminal replies from leaking into the shell prompt (#5655)
* fix: stop host terminal replies from leaking into the shell prompt as text

* add pr
2026-09-24 18:52:13 +02:00
Aram Drevekenin 34e75e991f fix: do the right thing when multiple plugin panes exist on the edge (#5653)
* fix: do the right thing when multiple plugin panes exist on the edge

* fix: only strip the first layer

* add pr
2026-09-24 16:28:03 +02:00
Myah MitchellandAram Drevekenin 0591ca5432 feat(nested-sessions): report a guest's input mode and key bindings to its host (#5589)
* refactor(plugin-api): share the keybinding protobuf conversions

The conversion between a keybinding table and its protobuf form was written
out four times: once each way for the ModeUpdate and InitialKeybinds events.
Collect them into `keybinds_to_protobuf` and `keybinds_from_protobuf`.

Decoding now drops a binding whose key is missing instead of unwrapping it,
so a malformed or foreign payload can no longer panic the conversion, and a
mode whose key fails to convert costs only that binding rather than every
binding in the mode.

* feat(nested-sessions): carry input mode and keybindings over the protocol

A session hosting a nested session has no way to learn what that session is
doing, so its plugins cannot show hints for the session the user is actually
typing into. Add the three messages that carry it:

- GuestModeUpdate, sent by a guest whenever its input mode changes, so a host
  always knows which of the guest's bindings currently apply.
- RequestGuestKeybinds and GuestKeybindsUpdate, a query and its answer, for
  the far larger keybinding table. Keeping the table behind a query means it
  is fetched once by whoever wants it rather than pushed at every host.

The table travels as an encoded plugin-API payload in an opaque bytes field.
Describing keybindings natively here would mean restating the whole Action
schema in this contract, which the codegen compiles with only its own include
path. Reusing the existing payload also means a host and a guest built from
different Zellij versions exchange whatever both understand and silently drop
the rest, which is the behavior this wire needs.

An input mode is written under the name InputMode::from_str reads, so adding a
mode needs no change to this contract and an unknown mode is rejected rather
than misread.

Peers advertise the new HintReporting capability, so each side can tell
whether the other can take part before asking it anything.

* feat(plugin-api): expose nested session mode and keybinding events

Plugins running in a host session can see that a pane holds a nested guest
session, but they have no way to learn what that guest is doing. A status bar
in the host therefore keeps showing the host's own hints while the user is
descended into the guest, which is the wrong keybinding table for the keys the
user is actually pressing.

Add two events and one command covering that gap:

  - Event::NestedSessionModeUpdate reports a guest's input mode as it changes.
  - Event::NestedSessionKeybinds delivers a guest's full keybinding table.
  - PluginCommand::RequestNestedSessionKeybinds asks a guest pane for that
    table, which arrives asynchronously as the event above.

Both events carry the pane the guest runs in and the guest's session name, so
a plugin watching several nested panes can tell them apart. Keybindings are
requested rather than pushed because the table is large and most plugins never
need it.

* feat(nested-sessions): report guest input mode and keybindings to the host

Wire the nested session hint events end to end.

A guest announces the HintReporting capability during the handshake and, from
then on, emits a GuestModeUpdate frame whenever its input mode changes. The
mode is reported on every change rather than only while the host is descended,
so the host already holds the right mode the moment focus arrives and the
status bar does not lag behind the descent.

The host turns each such frame into Event::NestedSessionModeUpdate. It answers
PluginCommand::RequestNestedSessionKeybinds by writing a RequestGuestKeybinds
frame into the guest pane; the guest replies with its keybinding table plus its
current mode, and the host forwards the table as Event::NestedSessionKeybinds.

Requests to guests that did not advertise HintReporting are dropped rather than
written, and frames from panes whose guest is not currently live are ignored,
matching how the other guest-to-host frames are handled.

Both events and the command require the ReadApplicationState permission, the
same gate ModeUpdate uses.

* test(nested-sessions): cover guest mode and keybinding reporting

Unit tests over the contract check that every input mode survives the round
trip under its own name, that a mode name the reading side does not know is
rejected rather than guessed at, and that a keybinding table keeps its modes,
keys and actions across the wire. The undecodable and empty payload cases are
covered too, since a host and a guest may be built from different versions.

Integration tests drive two real sessions bridged through a pane: both sides
advertise hint reporting during the handshake, the guest answers a keybinding
request with a populated table plus its current mode, and the guest reports
each mode change while the user is descended into it.

* test(nested-sessions): drop unknown capabilities without losing known ones

A peer built from a newer Zellij can advertise capabilities this side has
never heard of, so pin down that they are ignored individually rather than
invalidating the whole advertisement.

* feat(nested-sessions): carry the guest's base mode alongside its input mode

A host plugin that only knows a guest's current mode cannot tell which of the
guest's bindings are inherited from its base mode. Zellij's own hint rendering
leans on that distinction: bindings the base mode already advertises are
inherited by every other mode through `shared_except` groups, so repeating them
in each mode is noise. Without the guest's base mode a host plugin either
suppresses the wrong bindings or suppresses none.

A guest with a non-Normal base mode, such as an unlock-first config, is where
this shows: assuming Normal there hides the wrong half of its bindings.

The base mode rides along on the existing mode message, so a guest that has not
switched modes yet still reports one, resolved the way the rest of Screen
resolves it (the configured default mode is the base). It stays optional on the
wire, so a name the reading side does not recognize costs only the
inherited-binding distinction rather than the whole message.

* feat(nested-sessions): report the guest's mode when the handshake completes

A guest only pushed its input mode when that mode changed, so a host that
had just picked up a nested session learned nothing about it until the user
happened to switch modes inside it. A host plugin has no other way to tell
which of its panes holds a session worth asking for keybindings, which left
it unable to act on the feature at all in the common case of a guest sitting
in its starting mode.

Send the report once on contact as well, and reuse the same client mode
lookup the keybinding answer already did.

* docs(changelog): note the nested session hint reporting events

* fix(nested-sessions): drop guest keybindings on control characters

Nothing a guest says is authenticated. Its frames travel in the terminal
stream of the pane it runs in, so any program with that pane can write them,
including a keybinding table claiming a binding on a raw control character.
A host that draws those bindings puts their keys on its own screen, where a
control character is a terminal escape in the host's output rather than a
key anyone could press.

Drop them where the guest's payload is decoded, so no host plugin inherits
the problem. Zellij spells the control keys that do exist as their own
BareKey variants, so a Char holding one describes no binding worth keeping.

* test(nested-sessions): expect hint reporting in the announce ack

The host now advertises HintReporting alongside NestedControl when it
acknowledges a guest, so the assertion on the exact capability list had to
follow.

* fix(plugin-api): drop only what has no protobuf form when writing keybindings

keybinds_to_protobuf failed the whole table on the first key or mode it could
not represent, so one unrepresentable binding cost the caller every binding:
a ModeUpdate that failed to convert entirely, and a nested session's answer
that reached its host as an empty table indistinguishable from a session with
no bindings at all.

Drop the individual mode, key or action instead, which is what the reading
half already does and what the writing half already did for actions. A table
now survives the trip between builds minus whatever they do not have in
common.

* fix(nested-sessions): keep a host's view of the guest fresh across a reconfigure

A reconfigure rewrites a session's keybindings and base mode without going
through change_mode, and keybindings are otherwise only ever sent in answer
to a request. A host that had already asked once therefore kept drawing the
table the guest had before its config was reloaded, with no way of noticing
it had gone stale, and would not have picked up the new base mode until the
user happened to switch modes inside the guest.

Report both from reconfigure, next to the shortcut broadcast that already
happens there. Answer a keybinding request from the requesting client's own
table too, since a reconfigure with write_to_disk unset rebinds only the
client that asked: the mode in the same reply already came from that client,
so the two halves now describe the same thing.

* fix: adjust protocol + API

* Update CHANGELOG.md

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-09-24 14:43:03 +02:00
Aram DrevekeninandLucca Huguet 81f56e1aed Yazelix fixes (sixel/kitty correctness, explicit-swap-layout change rather than toggle, border styling) (#5630)
* fix: sixel image reaping/id-reuse

* fix: kitty scaling issues

* fix: stacked pane ordering

* feat: apply tiled/floating swap layout by name

* border styling

* fix tests

* fix: complete Yazelix feature validation (#5631)

* fix: retire client-ids instead of reusing them

* distributions

* rustfmt

* fix tests

* update changelog

* fix tests and race

---------

Co-authored-by: Lucca Huguet <[email protected]>
2026-09-24 09:26:20 +02:00
Thomas Linford f19b2ce822 fix(plugins): don't copy embedded plugin assets onto the heap (#5622)
ASSET_MAP stored the builtin plugins as include_bytes!(..).to_vec(), so the first access copied all of them (~17.6 MiB) onto the heap for the lifetime of the server. This stores &'static [u8] instead.

Server with one pane and one client on macOS: 45 MB -> 28 MB.
2026-09-23 13:15:36 +02:00
Marcio Granzotto RodriguesandAram Drevekenin 474ea0cef6 feat: forward OSC 7 (working directory) to parent terminal (#4867)
* feat: capture OSC 7 working directory on Grid and expose via Pane trait

Add osc7_payload field to Grid, handle the b"7" OSC sequence in
osc_dispatch, expose it via a Grid accessor, add osc7_payload() to
the Pane trait (default None), and implement it on TerminalPane by
delegating to the Grid. Follows the has_bell/consume_bell pattern.

* feat: forward OSC 7 from focused pane to parent terminal on render

* fix: validate OSC 7 URI and clean up state on client disconnect

Reject URIs containing control characters (< 0x20 or 0x7f) to prevent
injection into the parent terminal when the URI is re-emitted via OSC 7
forwarding. Also remove per-client OSC 7 forwarding state in
remove_client() to avoid stale entries accumulating after disconnect.

* style: fix formatting in OSC 7 tests

* fix: add control char test, clear osc7 on reset, doc comment

- Add test for control character rejection in OSC 7 URIs
- Clear osc7_payload in reset_terminal_state() (RIS/\ec)
- Add doc comment on osc7_payload() getter

* fix: address PR review feedback

- Reject C1 control characters (U+0080..U+009F) in OSC 7 URIs using
  char::is_control() instead of byte-level check
- Reject entire OSC 7 if any param segment has invalid UTF-8 instead
  of silently dropping bad segments
- Avoid String allocation in render hot path by comparing borrowed
  &str, only allocating when the value actually changes
- Add test for C1 control character rejection

* fix: integrate OSC 7 forwarding with upstream CWD tracking

* add some more tests

* docs: update changelog

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-09-14 18:26:14 +02:00
Oli Treadwell (he/him) a162323384 fix: correct typos in docs and code comments (#5599) 2026-09-09 19:16:46 +02:00
Aram Drevekenin e839bfffa5 docs(changelog): update release 2026-08-28 11:24:18 +02:00
Thomas Dickson f4d38d6510 fix(plugins): release a CLI pipe when the plugin handling it crashes (#5537)
apply_pipe_message_to_plugin sends UnblockCliPipes on every success path,
including the path for old plugins that do not export `pipe`, but not when
the call into the plugin fails. When a plugin traps while handling a pipe
message, both call sites in wasm_bridge only log and call handle_plugin_crash,
which paints a loading-indication error on the pane and does not unload the
plugin. The (plugin_id, client_id) entry therefore stays in PendingPipes and
the `zellij pipe` client blocks until the plugin is unloaded or the session
ends.

Move the body to apply_pipe_message_to_plugin_inner and have the wrapper
release the pipe on any error before re-returning it, so neither call site
can forget.

Adds a regression test driving a fixture-plugin branch that panics while
handling a pipe, asserting UnblockCliPipeInput is emitted at crash time
rather than at teardown.
2026-08-28 10:20:24 +02:00
Aram Drevekenin a9bd448e66 feat: allow starting a session with an initial command (#5543)
* feat: allow starting a session with an initial command

* add pr
2026-08-26 15:00:45 +02:00
Aram Drevekenin 910339e219 fix: update modes for tabs on switch (#5535)
* fix: update modes for tabs on switch

* add pr
2026-08-25 15:26:27 +02:00
Aram Drevekenin e4b7a39931 fix: allow setting an explicit theme hue rather than guessing (#5536)
* fix: allow setting an explicit theme hue rather than guessing

* add pr
2026-08-25 15:24:04 +02:00
Aram Drevekenin 4845e07fe5 fix: visibility events to plugins on floating pane toggles (#5534)
* fix: visibility events to plugins on floating pane toggles

* add pr
2026-08-25 14:56:47 +02:00
Aram Drevekenin 4669f37cff fix: save room for title in fixed-size layout panes (#5533)
* fix: save room for title in fixed-size layout panes

* add pr
2026-08-25 11:23:46 +02:00
Aram Drevekenin a6dbdad8ae feat: allow opting-out of scroll mode sync (#5532)
* feat: allow opting-out of scroll mode sync

* add pr
2026-08-25 11:02:57 +02:00
Aram Drevekenin b0bd3e1e7f fix: fullscreen floating pane editor (#5528)
* fix: fullscreen floating pane editor

* add pr
2026-08-24 20:14:58 +02:00
Aram Drevekenin d8e58e4f14 fix: focus event handling from external in web (#5527)
* fix: focus event handling from external in web

* add pr
2026-08-24 18:05:38 +02:00
Aram Drevekenin 8e627fe643 fix(kitty): apply reported pixel dimensions to existing ptys and clear images of collapsed stack members (#5526)
* fix(kitty): apply reported pixel dimensions to existing ptys and clear images of collapsed stack members

* add pr
2026-08-24 16:11:12 +02:00
Aram Drevekenin ca316433a3 fix: various snotifications issues introduced in 045 (#5523)
* fix: variou snotifications issues introduced in 045

* add pr
2026-08-24 15:21:43 +02:00
Aram Drevekenin 69954b5b6c fix: don't require nested reading of env var to detect nested sessions (#5522)
* fix: don't require nested reading env var to detect nested sessions

* add pr
2026-08-24 10:45:17 +02:00
Aram Drevekenin bf8d23a4f7 bump development version 2026-08-20 11:12:34 +02:00
Aram Drevekenin 070b9c3d1c Fixes before 045 (#5492)
* fix: keep single-pane tabs when serializing, stop the busy-spin on IPC disconnect, and make client-less CLI actions either work or fail loudly

* fix: some tab closing/ordering issues

* test: integration coverage for OSC 133 selection, scroll retention, paste-read opt-in, theme actions, and input fragmentation

* rendering-width regression tests

* fix: forward alt+mouse events into a guest pane the client is descended into

* fix: alt + [] delay in non-kitty

* allow disabling mouse hover tips while keeping the other effects

* more osc133 actions

* fix: base mode race when changing keybinding presets

* fix compilation warnings

* make releases drafts and remove diagnostic logging

* add pr
2026-08-20 08:04:12 +02:00
Aram Drevekenin 8c5bc6f0b3 Implement host focus gained/lost and missing notifications (#5485)
* implement host focus gained/lost and missing notifications

* add pr
2026-08-17 13:37:17 +02:00
Aram Drevekenin 98a0837077 feat: allow opting-in to reading paste buffer (default false) (#5472)
* feat: allow opting-in to reading paste buffer (default false)

* add pr
2026-08-13 10:19:13 +02:00
Teddy Tennant a9db5664be fix(clipboard): don't kill copy_command processes that own the selection (#5458)
* fix(clipboard): don't kill copy_command processes that own the selection

The reaping added in #4298 kills the copy_command process if it is still
running one second after the copied text was written to its stdin. X11 and
Wayland clipboard helpers are supposed to keep running: they own the
selection and serve it to whoever pastes it, so killing them empties the
clipboard.

Wait for the process instead of polling it with a deadline. Commands that
exit on their own are still reaped as soon as they do, so the zombies #4298
was about don't come back.

* docs(changelog): add PR
2026-08-12 12:26:33 +02:00
Valentyn KitandAram Drevekenin c428ae93b9 fix(scroll): keep scroll position when leaving scroll mode (#5299)
* fix(scroll): keep scroll position when leaving scroll mode

Leaving Scroll mode for Normal or Locked snapped the active pane back to
the bottom. Switching panes requires leaving Scroll mode, so that reset
is what prevented keeping a pane scrolled while working in another.

It is also redundant: the scroll keymap already binds an explicit
ScrollToBottom on exit, so users who want to follow live output keep it,
while a plain exit now preserves the scroll position. Output is still
buffered while a pane is scrolled and replayed when scroll is cleared,
so the buffer-overwrite protection is unaffected.

* fix(scroll): re-enter scroll mode when focusing a scrolled pane

Focusing a scrolled pane now switches the client into Scroll mode, and
focusing an unscrolled one returns it to Normal. Only the Normal<->Scroll
pair is synced, so a client in another mode is left alone.

* fix(scroll): re-enter scroll mode on focus-last-pane too

Cover the FocusLastPane action added in #4241 with the same focus-to-scroll
sync as the other focus moves, so landing on a scrolled pane via focus-last
behaves like landing on it via MoveFocus.

* fix(scroll): sync the default mode with scroll, cover mouse focus

Follow imsnif's review on #5299. The focus sync now switches between Scroll
and the configured default mode read from default_mode_info instead of a
hardcoded Normal, so unlock-first sessions (default Locked) return to Locked
rather than Normal. It also fires on mouse focus changes (click, click-through,
focus-follows-mouse) by hooking the existing active-pane diff in
handle_mouse_event, not only keyboard focus moves.

Tests parameterize the focus-sync assertion over the default mode (Normal and
Locked) and add a mouse-click variant.

* cover some more cases

* sync also on mouse scroll

* rustfmt

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-08-11 15:51:55 +02:00
6343be42c6 fix(stack): scrollback truncation when adding a stacked pane in list mode (#5403)
When `stacked_pane_list` is on and the user adds a stacked pane, the classic
in-grid stack path first collapses the pre-existing pane to `Fixed(1)` and
then `focus_pane` fires `reapply_pane_frames`, which sends `resize_pty!` to
the collapsed pane at 1 row. The stack-list groupify pass (invoked later
during `render`) then extracts the pane to `suppressed_panes` and resizes it
back to the visible size, issuing a second `resize_pty!`. The two rapid
WINCH events cause the shell (nushell, pwsh, bash, …) inside the pane to
redraw its prompt twice, overwriting previously-visible rows of output.
The grid data is preserved in `lines_above`, but the visible viewport ends
up mostly blank — the user sees only the pre-existing rows that had already
scrolled off, giving the impression of a truncated buffer.

Sync stacked-pane-list mode right after the classic mutation, before
`focus_pane`. `groupify_all` moves the collapsed member into
`suppressed_panes` first, so the subsequent `reapply_pane_frames` (which
only iterates `tiled_panes`) never sends a 1-row `resize_pty!` to that
shell. The pane is then resized once to the visible size via
`resize_stack_list_hidden_members`.

Regression test asserts that after adding a stacked pane in this mode, the
pre-existing pane is in `suppressed_panes` and the new visible member has
non-fixed row dimensions — proving groupify happened before any classic
`reapply_pane_frames` step.

Co-authored-by: divens <[email protected]>
Co-authored-by: Aram Drevekenin <[email protected]>
2026-08-11 09:10:54 +02:00
Fabien CulpoandAram Drevekenin f42ca3c79c feat: select OSC 133 command output on triple click (#5460)
* feat: select OSC 133 command output on triple click

* performance: avoid scanning the whole buffer

* make osc 133 command selection and word separators configurable

* add pr

---------

Co-authored-by: Aram Drevekenin <[email protected]>
2026-08-10 17:28:50 +02:00
Aram Drevekenin 3239d37b40 Native web mobile UI (#5441)
* initial chrome

* mobile state

* feat(mobile-web): implement browser→server actions (fit toggle, single-pane fullscreen, pane/tab focus) with fullscreen-truth reconciliation

* panning

* remove mobile plugin

* fix first load race

* improve web handshake

* rustfmt

* cleanups

* moar cleanups

* add bundle asset check to ci

* fix(mobile-web): tab-scope co-presence, yield single-pane to desktop clients, fix render-mode desync

* make mobile use no-ui fullscreen

* client side welcome screen for mobile

* attach web clients to first tab on tiles surface

* fix: opening new pane in mobile single mode no longer exits mobile single mode

* mobile chrome light theme support

* fix server races and flaky tests

* rustfmt

* fix flakes

* add pr
2026-08-05 15:32:53 +02:00
Aram Drevekenin 34e7491548 fix: allow building without bundled plugin assets (#5433)
* fix: allow building without bundled plugin assets

* add pr
2026-08-03 13:54:55 +02:00
Aram Drevekenin c3c7e65965 fix(sixel): only advertise capability if host terminal supports it (#5432)
* fix(sixel): only advertize capability if host terminal supports it

* add pr
2026-08-03 09:58:42 +02:00
Aram Drevekenin 0e6e440402 Support the Kitty Image Protocol (#5428)
* initial implementation - kinda working

* tests and fixes

* fix bounds

* tests and compatibility fixes

* fix: cursor scroll, clears, deletes, key tolerance, and host id range

* fix: keep images alive across resize, relayout and history scroll

* anchor to lines, not pixels

* fix image/text alignments

* config to allow disabling

* fix pinned pane issue

* never let host graphics replies reach the keyboard parser

* fix nested session

* properly handle fullscreening a pane

* rustfmt

* cleanup of ignored test

* add pr
2026-07-31 19:19:49 +02:00
Aram Drevekenin 0ed2edea0c fix(build): remove manpage, honor CARGO_TARGET_DIR, add cargo argument passthrough, remove clippy (#5426)
* fix(build): remove manpage, honor CARGO_TARGET_DIR, add cargo argument passthrough, remove clippy

* add pr
2026-07-30 16:50:12 +02:00
Aram Drevekenin ea07e2d5b6 Nested session handling (#5417)
* fix: theme query and updated pixel dimensions

* add no-ui-fullscreen key/action/capability

* protocol core

* integration test harness

* fix integration tests

* fix flaky tests

* nested ui (dimming) and directional focus initial implementation

* integration tests for nested ui dimming and directional focus

* initial full screen nesteed implementation

* fix: keep hidden floating panes hidden across nested no-ui fullscreen

* fix integration tests

* no ui fullscreen integration tests

* hardening behavior/tests

* fix(nested): re-derive descend/dim on host tab switch and new-tab so clicking dimmed chrome ascends

* initial modal implementation

* initial ui improvements

* fix integration tests

* improve nested selection ui

* nested session modal refactoring and tests

* improve integration test speed somewhat

* some ui adjustments

* simplify full/auto nested session handling

* hints in compact-bar

* guest stdin leak fix

* allow floating panes to be fullscreen

* make nested session handling configurable

* protocol reannounce

* refactor: naming confusion

* improve ux somewhat

* rustfmt

* merge fixes

* improve integration test rate limiting (fix ci)

* add pr
2026-07-27 18:24:37 +02:00