Commit graph

659 commits

Author SHA1 Message Date
Anton
f4e22a2a90
fix(terminal): handle omitted flags in kitty keyboard protocol push sequence (#4334)
The CSI > u sequence (push) should default omitted flags to 0 per the Kitty
keyboard protocol specification. Previously, omitted flags incorrectly
defaulted to 1, causing progressive enhancements to be enabled when they
should remain disabled.

This fix ensures push with no flags (printf "\e[>u") correctly sets flags
to 0, matching the protocol specification and making push behavior
consistent with the existing CSI = u implementation.

Author:    Anton Afanasyev <anton@doubleasoftware.com>
2025-08-08 11:38:18 +02:00
Aram Drevekenin
a3cfa0316f
fix(panes): backspace pane name regression (#4346)
* fix(panes): backspace pane name regression

* docs(changelog): add PR
2025-08-06 11:39:41 +02:00
Aram Drevekenin
b5a893f36a
style: some cleanups (#4329)
* style: some cleanups

* style(fmt): rustfmt
2025-08-01 15:17:44 +02:00
Tanapol Prucksakorn
ee933744dd
performance(server): Improve dump_screen! performance (#2548)
* Pre-allocates `buf` string.
* Uses `trim_end_matches()` instead of regex.

Co-authored-by: Tanapol Prucksakorn <tanapol.pr@gmail.com>
2025-07-22 17:03:44 +02:00
Aram Drevekenin
6af82a9e99
fix(plugins): multiple-select + compact-bar tooltip multiplayer issues (#4312)
* fix: allow stacking panes if root pane is floating

* fix: handle multiple client gracefully in multiple select

* style(fmt): rustfmt

* fix compact-bar tooltip multiuser duplication

* style(fmt): rustfmt
2025-07-22 09:13:41 +02:00
Aram Drevekenin
16d8e6d0ab
fix(plugins): standardize should_focus parameter when launching new plugin via pipe (#4309)
* fix(plugins): standardize should_focus parameter when launching new plugins via pipe

* docs(changelog): add PR
2025-07-21 11:29:27 +02:00
Aram Drevekenin
7d970c7090
fix: stack ordering command (#4308)
* fix: some issues with stacking panes

* cleanups and formatting

* docs(changelog): add PR
2025-07-21 09:40:43 +02:00
Aram Drevekenin
48ecb0e34f
fix(ux): allow pasting and inputing wide-chars in search + tab rename + pane rename (#4303)
* fix(ux): allow pasting to search/tab-rename/pane-rename

* fix(ux): allow setting wide chars (eg. emoji) in tab/pane names

* style(fmt): rustfmt

* docs(changelog): add PR
2025-07-18 17:35:47 +02:00
Aram Drevekenin
44a3c1dae9
fix(grid): account for wide characters when double-triple mouse clicking (#4302)
* fix(grid): account for wide characters when double-triple mouse clicking

* fix(e2e): moar race conditions

* docs(changelog): add PR
2025-07-18 10:05:32 +02:00
Aram Drevekenin
32d4c7114e
fix(tabs): do not send release event to inactive tab (#4300)
* fix(ui): switch left/right in multiple-select to prevent confusion

* fix(mouse): do not send release event to inactive pane

* docs(changelog): add PR
2025-07-17 18:29:04 +02:00
Aram Drevekenin
9fd7a02023
fix(web): change URL when renaming session (#4299)
* fix(web): change URL when renaming session

* style(fmt): rustfmt
2025-07-17 15:48:07 +02:00
Aram Drevekenin
19c159175c
fix(clipboard): reap process of external command (#4298)
* fix(clipboard): reap process of external command

* docs(changelog): add PR
2025-07-17 11:41:17 +02:00
Aram Drevekenin
25390b1616
fix(panes): do not default to tiled pane (#4295) 2025-07-16 17:36:09 +02:00
Aram Drevekenin
403f0a07be
fix(sessions): remove popups from welcome screen (#4294)
* remove popups from welcome screen

* docs(changelog): add pr
2025-07-16 11:43:18 +02:00
Aram Drevekenin
d4f5975527
fix(plugins): forward CWD when opening new panes (#4290)
* use plugin cwd as last focused pane cwd when starting plugins

* fix strider to use the new change_host_folder method

* start terminals in same cwd as plugin pane if focused

* style(fmt): rustfmt
2025-07-15 10:27:43 +02:00
Rousseau Vincent
118d5fb877
fix: populate layount metadata with the right cmd and cwd (#4287)
Add cmd from sysinfo in terminal_ids_to_commands if no cmd are return by
ps. So then, cmd and cwd are udpated in "session-layout.kdl" even if no
cmd is runing in pane.
2025-07-15 10:26:43 +02:00
Aram Drevekenin
da9cf4ffeb
fix(serialization): don't serialize when only UI elements present and provide post command discovery hook (#4276)
* do not serialize when only UI elements are present

* start work on a post serialization hook

* add post_command_discovery_hook

* fix tests

* style(fmt): rustfmt

* some cleanups

* moar formatting

* docs(changelog): add PR
2025-07-08 22:50:08 +02:00
Aram Drevekenin
358caa180c
fix(tabs): allow setting cwd without a layout (#4273)
* working for cli and keybinding

* working for plugin API

* style(fmt): rustfmt

* docs(changelog): add PR
2025-07-08 11:06:03 +02:00
Aram Drevekenin
2b9884645d
fix(plugins): use the terminal title when spawning terminals (#4272)
* fix(plugins): use the terminal title when spawning terminals

* docs(changelog): add PR

* fix: plugin tests
2025-07-07 19:06:31 +02:00
Aram Drevekenin
2580564d50
feat(terminal): multiline hyperlink support (#4264)
* working

* done

* docs(changelog): add PR
2025-07-04 14:23:55 +02:00
Aram Drevekenin
c5487fb1b6
fix(web-client): various bugs (#4257)
* fix: background color issues and server recovery bug

* fix: display title in web client

* style(fmt): rustfmt

* docs(changelog): add PR
2025-07-02 13:38:00 +02:00
Aram Drevekenin
ca0048bdcb
feat: stack pane action (#4255)
* refactor: group placement properties

* add stackpane cli and keybinding

* add test

* refactor: move spawn vertically/horizontally to spawnterminal

* fix tests and cleanups

* some cleanups and minor fixes

* more cleanups

* add stack action to the UI

* style(fmt): rustfmt

* fix serialization

* add to default config

* fix e2e tests

* style(fmt): rustfmt

* fix cli

* fix tests

* docs(changelog): add PR
2025-07-01 20:17:37 +02:00
Aram Drevekenin
11015c8fe4
feat(plugin-api): allow replacing pane with existing pane (#4246)
* work

* make the api work

* some cleanups

* close pane

* style(fmt): rustfmt
2025-06-26 13:51:17 +02:00
Aram Drevekenin
a4d5b0238d
performance(terminal): consolidate renders (#4245)
* work

* fix tests for async rendering

* remove comment

* some cleanups

* style(fmt): rustfmt

* fix e2e tests

* fix more e2e tests

* style(fmt): rustfmt

* fix one more test

* style(fmt): rustfmt
2025-06-26 12:57:05 +02:00
Aram Drevekenin
c5ac796880
Feature: web-client/server to share your sessions in the browser (#4242)
* work

* moar work

* notes

* work

* separate to terminal and control channels

* stdin working

* serve html web client initial

* serve static assets loaded with include_dir

* merge

* enable_web_server config parameter

* compile time flag to disable web server capability

* rustfmt

* add license to all xterm.js assets

* mouse working except copy/paste

* helpful comment

* web client improvements

- move script to js file
- add favicon
- add nerd font
- change title

TODO: investigate if font license embedded in otf is sufficient

* get mouse to work properly

* kitty keyboard support initial

* fix wrong type in preload link

* wip axum websocket handlers

- upgrade axum to v0.8.1, enable ws feature
- begin setup of websocket handlers
- tidy up imports

* replace control listener

* handle terminal websocket with axum

* cleanup Cargo.toml

* kitty fixes and bracketed paste

* fix(mouse): pane not found crash

* initial session switching infra

* add `web_client_font` option

* session switching, creation and resurrection working through the session manager

* move session module to zellij-utils and share logic with web-client

* some cleanups

* require restart for enable-web-server

* use session name from router

* write config to disk and watch for config changes

* rename session name to ipc path

* add basic panic handler, make render_to_client exit on channel close

* use while let instead of loop

* handle websocket close

* add mouse motions

* make clipboard work

* add weblink handling and webgl rendering

* add todo

* fix: use session name instead of patch on session switch

* use "default" layout for new sessions

* ui indication for session being shared

* share this session ui

* plugin assets

* Fix process crash on mac with notify watcher.

Use poll watcher instead of recommended as a workaround.

* make url session switching and creation work

* start welcome screen on root url

* scaffold control messages, set font from config

* set dimensions on session start

* bring back session name from url

* send bytes on terminal websocket instead of json

- create web client os input and id before websocket connection

* draft ui

* work

* refactor ui

* remove otf font, remove margins to avoid scrollbar

* version query endpoint for server status

* web session info query endpoint

* refactor: move stuff around

* add web client info to session metadata

* make tests pass

* populate real data in session list

* remove unnecessary endpoint

* add web_client node to config, add font option

* remove web_client_font

* allow disabling the web session through the config - WIP

* formalize sharing/not-sharing configuration

* fix tests

* allow shutting down web server

* display error when web clients are forbidden to attach

* only show sessions that allow web clients if this is a web client

* style(fmt): rustfmt

* fix: query web server from Zellij rather than from each plugin

* remove log spam

* handle some error paths better in the web client

* allow controlling the web server through the cli

* allow configuring the web server's ip/port

* fix tests and format code

* use direct WebServerStatus event instead of piggy-backing on SessionInfo

* plugin revamp initial

* make plugin responsive

* adjust plugin title

* refactor: share plugin

* refactor: share plugin

* add cors middleware

* some fixes for running without a compiled web server capability

* display error when starting the share plugin without web server support

* clarify config

* add pipelines to compile zellij without web support

* display error when unable to start web server

* only query web server when share plugin is running

* refactor(web-client): connection table

* give zellij_server_listener access to the control channel

* fixes and clarifications

* refactor: consolidate generate_unique_session_name

* give proper error when trying to attach to a forbidden session

* change browser URL when switching sessions

* add keyboard shortcut

* enforce https when bound to non-loopback ip

* initial authentication token implementation

* background color from theme

* initial web client theme config

* basic token generation ui

* refactor set config message creation

* also set body background

* allow editing scrollback for plugins too

* set scrollback to 0

* properly parse colors in config

* generate token from plugin

* nice login modals

* initial token management screen

* implement token authentication

* refactor(share): token management screen

* style(fmt): rustfmt

* fix(plugin): some minor bugs

* refactor(share): main screen

* refactor(share): token screen

* refactor(share): main

* refactor(share): ui components

* fix(responsiveness): properly send usage_width to the render function

* fix cli commands and add some verbosity

* add support for settings ansi and selection colors

* add cursor and cursor accent

* basic web client tests

* fix tests

* refactor: web client

* use session tokens for authentication

* improve modals

* move shutdown to ipc

* refactor: ipc logic

* serialize theme config for web client

* update tests

* refactor: move some stuff around to prepare for config hot reload

* config live reloading for the web clients

* change remember-me UI wording

* improve xterm.js link handling

* make sure terminal is focused on mousemove

* remove deprecated sharing indication from compact-bar

* gate deps and functionality behind the web_server_compatibility feature

* feat(build): add --no-web flag in all the places

* fix some other build flows

* add new assets

* update CI for no-web (untested)

* make more dependencies optional

* update axum-extra

* add web client configuration options

* gracefully close connections on server exit

* tests for graceful connection closing

* handle client-side reconnect when server is down

* fix: make sure ipc bus folder exists before starting

* add commands to manage login tokens from the cli

* style(fmt): rustfmt

* some cleanups

* fix(ux): allow alt-right-click on the web client without opening the context menu

* fix: prevent attaching to welcome screen

* fix: reload config issues

* fix long socket path on macos

* normalize config conversion and fix color gap in browser

* revoke session_token cookie if it is not valid

* fix: visual bug with multiple clients in extremely small screen sizes

* fix: only include rusqlite for the web server capability builds

* update e2e snapshots

* refactor(web): client side js

* some cleanups

* moar cleanups

* fix(tests): wait for server instead of using a fixed timeout

* debug CI

* fix(tests): use spawn_blocking for running the test web server

* fix(tests): wait for http rather than tcp port

* fix(tests): properly pass config path - hopefully this is the issue...

* success! bring back the rest of the tests

* attempt to fix the macos CI issue

* docs(changelog): add PR

---------

Co-authored-by: Thomas Linford <linford.t@gmail.com>
2025-06-23 19:19:37 +02:00
Aram Drevekenin
7ef7cd5ecd
feat(ui): add optional tooltip with key hints to the compact bar (#4225)
* initial implementation

* some refactoring

* refactor: separate some concerns and tidy up

* fix: move tooltip to focused tab as needed

* some ux adjustments

* some refactoring

* only show tooltip if we have configured a shortcut key

* add plugin artifacts

* fix tests

* truncate tooltip if it exceeds width

* change config name

* remove comment

* docs(changelog): add PR
2025-06-10 17:23:46 +02:00
Aram Drevekenin
a9f8bbcd19
feat(ux): improve multiple select (#4221)
* intercept/clear-intercept key APIs

* allow opening a pinned unfocused floating pane

* rework plugin

* improve some apis

* fix tests

* tests for pane groups

* more exact placement and tests

* plugin command permission and cleanup

* improve some multiselect ux

* improve plugin ui

* remove old status indicator

* allow moving plugin out of the way

* style(fmt): rustfmt

* update plugins

* remove old keybinding

* cleanups

* fix: only rename pane if needed

* changelog and some cleanups

* style(fmt): rustfmt
2025-06-03 17:15:32 +02:00
Aram Drevekenin
27c8986939
feat: multiple Select and Bulk Pane Actions (#4169)
* initial implementation with break panes to new tab

* break pane group left/right

* group embed/eject panes

* stack pane group on resize

* close pane group

* style(fmt): rustfmt

* fix tests

* group drag and ungroup with the mouse

* fix mouse hover for multiple clients

* fix for multiple clients

* multiple select plugin initial

* use real data in plugin

* adjust functionality

* fix some ux issues

* reflect group mouse group selections in plugin

* group/ungroup panes in Zellij

* highlight frames when marked by the plugin

* refactor: render function in plugin

* some ui responsiveness

* some more responsiveness and adjust hover text

* break out functionality

* stack functionality

* break panes left/right and close multiple panes

* fix(tab): only relayout the relevant layout when non-focused pane is closed

* status bar UI

* embed and float panes

* work

* fix some ui/ux issues

* refactor: move stuff around

* some responsiveness and fix search result browsing bug

* change plugin pane title

* differentiate group from focused pane

* add keyboard shortcut

* add ui to compact bar

* make boundary colors appear properly without pane frames

* get plugins to also display their frame color

* make hover shortcuts appear on command panes

* fix: do not render search string component if it's empty

* BeforeClose Event and unhighlight panes on exit

* some UI/UX fixes

* some fixes to the catppuccin-latte theme

* remove ungroup shortcut

* make some ui components opaque

* fix more opaque elements

* fix some issues with stacking pane order

* keyboard shortcuts for grouping

* config to opt out of advanced mouse actions

* make selected + focused frame color distinct

* group marking mode

* refactor: multiple-select plugin

* adjust stacking group behavior

* adjust flashing periods

* render common modifier in group controls

* add to compact bar

* adjust key hint wording

* add key to presets and default config

* some cleanups

* some refactoring

* fix tests

* fix plugin system tests

* tests: group/ungroup/hover

* test: BeforeClose plugin event

* new plugin assets

* style(fmt): rustfmt

* remove warnings

* tests: give plugin more time to load
2025-04-29 20:52:17 +02:00
Aram Drevekenin
f3351f4f75
performance(render): improve rendering performance by consolidating renders and introducing repaint_delay (#4100)
* initial draft

* style(comment): add explanation to async render

* remove timeouts from terminal_bytes

* some cleanups

* cleanups

* chore(docs): update pr
2025-03-24 16:48:39 +01:00
har7an
6be8c495bc
build: Don't re-export foreign crates in utils (#4087)
* build(utils): Don't use reexported dependency

for internal code, but use the dependency directly.

* build(client): Don't use re-exports from `utils`

but turn `zellij-utils` dependencies into shared workspace dependencies
instead and specify those in `Cargo.toml` explicitly. This gives a much
better overview of what component in zellij uses which crates. The
previous approach hides a lot of this information since it looks like
crates are used in a single place where this isn't actually true.

* deps(tile): Don't use re-exports from zellij-utils.

* build(zellij): Don't use re-exports from zellij-utils.

* build(server): Don't use re-exports from zellij-utils.

* build(utils): Don't re-export foreign crates.

* docs: Update Changelog with PR #4087.

* style: Apply rustfmt.

* style: Apply rustfmt.

* build(e2e): Don't use re-export from zellij-utils.

* test: Restore e2e tests.

* style: Apply more formatting.
2025-03-23 10:03:42 +00:00
har7an
a2ae82259c
build: Don't use default features (#4086)
* chore: Cut down dependency features

and reduce the impact of future changes to crate `default-feature`
changes. Also reduce a few transient dependencies which were previously
pulled in by crate features we aren't using.

* deps(utils): Remove `once_cell` dependency.

* deps: Remove more dependency features.

* deps: Remove remaining default features.

* docs: Update Changelog with PR #4086.

* style: Apply rustfmt.
2025-03-22 13:40:37 +00:00
Aram Drevekenin
503e20132a
refactor(terminal): log scroll region as tuple rather than Option<tuple> (#4082)
* initial go over

* do not pad scroll region by default

* some cleanups

* moar cleanups

* style(fmt): rustfmt

* docs(changelog): add PR
2025-03-22 01:57:17 +01:00
har7an
502af243e0
Fix compiler warnings (#4053)
* chore(cargo): Update dependencies

for xtask subcommand to remove warnings about unknown compiler
attributes.

* deps(xtask): Remove `lazy_static`

as dependency, since the code we need can now be expressed using rusts
`std` builtin types.

* fix(xtask): Hide deprecated args

so the compiler doesn't complain about dead code any more.

* fix(xtask): Remove needless borrow.

* fix: Remove dead code

across the codebase, as discovered by the rust compiler.

* fix(server): Log previously ignored errors.

* fix(xtask): Remove needless `format!` calls.

* fix(xtask): Remove superfluous return statement.

* fix(client): Remove unused enum variant

from `ClientInstruction` and all code attached to it.

* fix(server): Restore functions needed in tests.

* chore: Apply rustfmt.

* fix(server): Add missing code.

* fix: Remove leftover warnings.

* CHANGELOG: Add MR #4026.

* fix(xtask): Pin `xshell` to version 0.2.2

because release 0.2.3 changed the way stdin is handled, breaking
interactive command invocations (such as we use).
2025-03-10 16:50:20 +00:00
Aram Drevekenin
ff595fccb6
fix(selection): add proper multi-click dragging options (#4052)
* properly extend/reduce word-bound selection on drag

* properly extend/reduce line bound selection on drag

* fix scrolling

* style(fmt): rustfmt

---------

Co-authored-by: aram <aram@green.green>
2025-03-10 17:21:25 +01:00
Brooks Rady
4fd0bac675
fix(stacked): stacked panes can't resize status-bar (#4051)
* fix(typo): fix a typo in error message

* fix(typo): fix typo in Tip #6

* fix(logging): silence filesystem error

This `Option` chain already ends with `.unwrap_or_else(Default::default)`
so it's clearly expected that prior operations in the chain may fail. I
didn't have the default `layout_dir` on my computer, and it would fill my
logfile with unhelpful spam — on every pane creation, resize, etc.

* fix(stacked): stacked panes can't resize status-bar

* fix(e2e): race in multiple users test

---------

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2025-03-10 17:21:10 +01:00
Aram Drevekenin
1a8c3d7c94
fix(grid): out of bounds removal when app does not update its scroll region on resize (#4045) 2025-03-06 09:42:25 +01:00
Aram Drevekenin
2fe960a16d
fix(plugins): prevent paging plugins from cache at runtime (#4044) 2025-03-06 09:19:27 +01:00
Aram Drevekenin
3e694d2e49
fix(serialization): stacked panes fixes (#4041)
* fix(serialization): properly handle multiple stacked panes in the same logical node

* fix(layouts): properly handle stacked panes in new layouts

* fix(layouts): properly serialize stacked panes into layouts

* style(fmt): rustfmt

* docs(changelog): update pr
2025-03-05 18:42:31 +01:00
Aram Drevekenin
489534f29d
fix(panes): multiplayer stack issues (#4038)
* fix(panes): interactions between multiplayer and stacked panes

* remove extraneous focus

* style(fmt): rustfmt

* docs(changelog): update pr
2025-03-03 17:11:35 +01:00
Aram Drevekenin
f096dc7b88
fix(panes): when focusing pane off the tab edge, break ties with active_at instead of y (#4037)
* fix(panes): when focusing pane off the tab edge, break ties with active_at instead of y

* docs(changelog): update pr
2025-03-03 13:45:38 +01:00
har7an
736d43b138
fix(toolchain): Unbreak client startup
This reverts commit 9f900a7325.
2025-03-03 09:26:58 +00:00
Aram Drevekenin
b7cc3f3a62
fix(panes): various fixes for rendering stacked panes without pane frames (#4035)
* initial work

* fix rendering issues with stacked panes without pane frames

* make mouse clicking work

* test: rendering stacked panes without frames

* style(fmt): rustfmt

* docs(changelog): update pr
2025-03-02 13:18:12 +01:00
har7an
9f900a7325
Fix compiler warnings (#4026)
* chore(cargo): Update dependencies

for xtask subcommand to remove warnings about unknown compiler
attributes.

* deps(xtask): Remove `lazy_static`

as dependency, since the code we need can now be expressed using rusts
`std` builtin types.

* fix(xtask): Hide deprecated args

so the compiler doesn't complain about dead code any more.

* fix(xtask): Remove needless borrow.

* fix: Remove dead code

across the codebase, as discovered by the rust compiler.

* fix(server): Log previously ignored errors.

* fix(xtask): Remove needless `format!` calls.

* fix(xtask): Remove superfluous return statement.

* fix(client): Remove unused enum variant

from `ClientInstruction` and all code attached to it.

* fix(server): Restore functions needed in tests.

* chore: Apply rustfmt.

* fix(server): Add missing code.

* fix: Remove leftover warnings.

* CHANGELOG: Add MR #4026.
2025-02-28 14:09:35 +00:00
Flat
03e26603c8
fix(grid): Clear sixels when clearing terminal (#3982)
* fix(grid): Clear sixels when clearing terminal

No code paths existed to clear sixel images when handling csi dispatch for
clear.

* fix(grid): Also clear sixels on lines above
2025-02-24 14:57:47 +01:00
Aram Drevekenin
20011a83f7
chore(deps): update some dependencies (#4019)
* chore(deps): update some dependencies

* adjust logging to catch potential ipc issues

* style(fmt): remove outdated comment
2025-02-24 11:39:44 +01:00
Aram Drevekenin
bdfcfb0abd
fix(stacked-panes): better handling of adding new panes to a stack (#4016)
* fix(stacked-panes): better handling of adding new panes to a stack

* style(fmt): rustfmt

* docs(changelog): document
2025-02-22 12:45:30 +01:00
Aram Drevekenin
04be2646ed
feat(plugins): add tab history to the SessionUpdate Event (#4014)
* feat(plugins): add tab-history to the SessionInfo

* update snapshots

* style(fmt): rustfmt

* update changelog
2025-02-21 19:34:38 +01:00
Aram Drevekenin
648d6ff47a
fix(pinned-panes): allow pinning floating plugin panes with the mouse (#4013) 2025-02-21 13:05:54 +01:00
Aram Drevekenin
f16804b8c3
fix(floating-panes): reset swap floating layouts when closing last floating pane (#4012) 2025-02-21 12:16:47 +01:00
Aram Drevekenin
2c8ef3b5b8
fix(tiled-panes): recover from full stack (#4011) 2025-02-21 12:16:39 +01:00