aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/e2e (follow)
Commit message (Collapse)AuthorAge
* Support the Kitty Image Protocol (#5428)Aram Drevekenin2026-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* More dependency upgrades for debian (#5421)Aram Drevekenin2026-07-29
| | | | | | | | | | | * upgrade insta, rand, sha2, strum, thiserror, tokio-tungstenite, toml, which; drop unused semver and typetag * upgrade sysinfo to 0.39.5, bump toolchain (msrv) to 1.95.0 * remote legacy yaml config converter and thus drop serde_yaml * upgrade unicode-width to 0.2.2 * fix(tests): run ipc roundtrip test on a larger stack
* Dep upgrades for debian (#5420)Aram Drevekenin2026-07-28
| | | | | | | | | | | | | * chore(deps): upgrade base64 0.22, colored 3.1, crossterm 0.29, dialoguer 0.11, directories 6.0, highway 1.2, prost 0.12.6, strip-ansi-escapes 0.2.1, suggest 0.5.1 * chore(deps): upgrade miette 7.6, nix 0.30, notify 8.2, notify-debouncer-full 0.5 * vte 0.15 * clap 4.6 * workspaceify plugin deps * don't send empty fs watch events
* fix: input spam when moving mouse while typing by splitting the input bytes ↵Pierre Kisters2026-07-17
| | | | into their respective events (#5323)
* UI tweaks (#5337)Aram Drevekenin2026-07-06
| | | | | | | | | | | | | | | | | | | * remove dimmed * clearer list ui * fix integration tests * rustfmt * move hint to tab-bar * redesign stack list * rustfmt * fix e2e * add pr
* Title frames (#5318)Aram Drevekenin2026-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation * improve single line title design * hint text plugin infra * add proto regen task * display alt text in status bar * don't display text with full frames * style alt hover text * fix + style control own pane hover * make multiplayer indications responsive * update snapshots * plugin api * single pane as tab * better scroll styling * fix tests * tab-bar plus hover * plugin surface tests * integration tests * adjust all integration tests * reduce hover noise * add pane id to in place * more integration tests * style: rustfmt * update plugin assets * update assets and snapshots * add pr
* chore: new test infra (#5269)Aram Drevekenin2026-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation * refactoring and cleanups * port basic e2e tests * fix tab rotation * migrate client and mouse tests * migrate the rest of the tests * remove old e2e tests * rustfmt * add e2e note * fix stale test * fix: cross platform locking/cleanup * fix: change mode race discovered by tests * rustfmt * fix: attach/detach race in tests * fix plugin test assertion * add pr
* fix: position host cursor for CJK IME even when app hides cursor (#4951)Satoru Higa2026-04-03
| | | | | | | | | | | | | | | | | | | | | * 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 <aram@poor.dev>
* fix(e2e): stabilize tests and support Apple Silicon local dev (#4952)Thomas Linford2026-04-01
| | | | | | | | | | - 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
* fix: performance regression when switching tabs (#4918)Aram Drevekenin2026-03-26
| | | | | | | | | | | | | | | | | | | * remove pane render report * only collect pane contents if pane should render * add logs * conditional keybinding serialization * remove logs * rustfmt * fix tests * tests * rustfmt
* remove sequence plugin (#4761)Aram Drevekenin2026-02-24
|
* Improve plugin API ergonomics and add CLI goodies (#4690)Aram Drevekenin2026-02-10
| | | | | | | | | | | | | | | | | | | | | | | * return created tab_id from relevant plugin API methods * add to cli * return Option<PaneId> in plugin API methods that create panes * return created pane_id in cli for relevant actions * allow plugins to query for pane_info based on pane_id * allow plugins to query for TabInfo by its id * allow plugins to query pane command/cwd synchronously * zellij action list-panes * style and formatting * fix e2e tests * add pr
* Fix loading short layouts and custom config dirs (#4640)har7an2026-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test(e2e): Write a regression test to validate behavior w.r.t. loading and determining the session layout file. Compared to release v0.43.1, right now there is a problem where `zellij --layout NAME`, with `NAME` being the filename of a layout in the `$ZELLIJ_DATA_DIR/layouts/` subfolder, doesn't resolve to the correct layout file. Instead, zellij will silently fall back to its default config. It does, however, recognize nonexistent configuration files. * fix(utils): Treat bare layout names as file paths first before defaulting to builtin layout names. This restores the behavior shown by zellij up until 0.43.1, which was altered in a recent extension of the server-client API. * fix: Forward client layout information to startup code and ensure it isn't ignored along the way. Update a bunch of tests to react to the new function interface and write new tests to catch deviations in the future. * test: Fix misconfigured e2e test to ensure that a custom `--config-dir` is indeed respected during application startup. * test: Rewrite config dir test to not use variable metadata since the `LayoutInfo` object previously dumped into the snapshot contains information that isn't platform agnostic, including an absolute file path and a timestamp. * docs(CHANGELOG): Mention PR #4640 in the list of changes for the next release. * fix: Handle bare layouts with name "default" correctly and assume a "default" layout if no layout name is given during layout resolution. "default" may not always be the builtin default layout, since users can write their own "default.kdl" that takes effect when placed in the layout directory an no other layouts are explicitly specified.
* Allow disabling OSC8 link generation (#4624)Aram Drevekenin2026-01-22
| | | | | | | * implementation * rustfmt * add pr
* Feature: allow overriding a layout for a currently running tab (change ↵Aram Drevekenin2025-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | layout at runtime) (#4566) * add tests for LayoutApplier * initial untested implementation of override functions * add override-layout cli action with stub in screen * filter run instructions to ignore * implement override-layout roundtrip through plugin and pty threads * initial full-cycle working override implementation * fix some bugs (eg. actually start new terminals) * fix some bugs with focus after override * fix floating pane matching bug in layout applier * formatting * use first tab, error on more than 1 tab * fix some floating_panes ordering and shell issues * get new tab name to work * respect swap layouts * allow specifying tab properties on main layout node if we just have one tab * add tests for new override methods * start work on retaining panes, hard-coded things, kind of working but broken in many places * fixed most tiled pane override bugs * reset viewport before reapplying * revert constraint system changes * retain-existing-terminal-panes flag * add retain terminal panes tests * add retain plugin panes flag * add keybind * add retain plugin panes tests * add override-layout e2e test * refactor: layout_applier * style: rustfmt * some cleanups * fix cli flags * no crashy * formatting and artifacts * moar cleanups * fix: respect expanded in stack when overriding * docs(changelog): add PR
* Improve CLI interface (add detach, switch session, blocking zellij run and ↵Aram Drevekenin2025-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | more) (#4492) * initial implementation * fix tests * move more ations * screen adjustments (does not compile) * plugin/pty adjustments (does not compile) * more progress, tests not compiling * fix tests * more progress, does not compile * more progress, compiles, tests failing * tests passing * rely on Drop for NotificationEnd * atomicify some more actions * fmt * move unblock input to route * don't pass hard-coded action names * refactor: consolidate completion channel logic * comment * track last active client * track cli clients explicitly * use the last active client for cli commands when possible * fix focus-next-pane for multiple clients * various fixes for multi-client actions from the cli * add detach action * fix tests * add switch session cli action * fix switch session deadlock * add and layout to switch-session cli action * blocking zellij run: add NewBlockingPane variant * blocking zellij run: wait forever mechanism * blocking zellij run: thread NotificationEnd as needed until TerminalPane (tests not compiling) * blocking zellij run: update cli * blocking zellij run: add command * blocking zellij run: finish implementation * fix tests * e2e test and close_on_exit fixes * fmt * fix e2e tests * fix plugin tests
* Feature: watcher clients (#4487)Aram Drevekenin2025-10-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation * make Screen aware of watchers - slightly buggy * fix: only render focused tab to watcher * track watcher sizes on Screen * pad watcher output as needed * truncate watcher sizes as needed * render on watcher resize * fix watcher first resize * allow watchers to quit with esc, ctrl-c or ctrl-q * fix: send watcher size on initial connection message * refactor: move padding logic to output * fix watcher rendering after all clients disconnected * fix watcher rendering caching issues * crop watcher cursor when out of bounds * remove watchers cleanly on session close * standardize watcher messages ignoring * add e2e test for watcher functionality * update snapshots * add output tests * rustfmt * cleanups * docs(changelog): add PR
* Migrate from wasmtime to wasmi (#4449)Aram Drevekenin2025-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation * fix stdio and host folder mounting * some memory usage optimizations * fix plugin tests * remove unused plugin cache * fix docker-compose for e2e tests when running locally * rustfmt * initial pinned executor implementation * EXPERIMENT: add jemalloc * initial dynamic pinned threadpool * cleanups and experiments * keep state on execution threads * reintroduce memory cache * add wasmi engine to executor threads * load plugins for new clients on the relevant executor thread * only show loading indication of loading for more than 0.4 secs * fix anonymous plugin loading without client id * refactor lots of stuff * update snapshots * tests for pinned executor * remove jemalloc * fix stderr from plugins * cleanups * rustfmt * cleanups * fix endless loading for additinal attachments * more cleanups * remove singlepass feature * fix displaying plugin permission message * render optimizations * always render for tests * rustfmt * optimize release build for wasmi * fixes for multiple client plugin loading * fix frame rendering for multiple clients * rustfmt * fix loading background plugins and e2e event ordering change * rustfmt * account for races in the pin_floating_panes e2e test * docs(changelog): add PR
* refactor(client-server-contract): config + layout (#4383)Aram Drevekenin2025-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commented out ConfigWrittenToDisk instructions * commented out WriteConfigToDisk instructions * commented out FailedToWriteConfigToDisk and WriteConfigToDisk instructions * pass cli assets from client to server instead of parsed config - kind of working, lots of stuff still broken * move ClientAttributes to the server side * move ClientAttributes to the server side in Attach instruction as well * move CliArgs and runtime options from NewClient -> move them to the server * moved plugin_aliases to the server side * moved initial config writing to the server side * moved layout parsing to the server * some cleanups * move config file watching and live reload to the server * move config file writing to the server side * use saved config when attaching * get web server to work with the new config roles * some cleanups * moar cleanups * even moar cleanups * yet more cleanups * fix tests * style(fmt): rustfmt * style(fmt): rustfmt * fix e2e tests * docs(changelog): add PR
* fix(status-bar): proper truncation of secondary info (#4313)Aram Drevekenin2025-07-22
| | | | | | | | | | | * fix(status-bar): properly truncate secondary keybindings * style(fmt): rustfmt * more correct fix * fix e2e tests * docs(changelog): add PR
* fix(grid): account for wide characters when double-triple mouse clicking (#4302)Aram Drevekenin2025-07-18
| | | | | | | * fix(grid): account for wide characters when double-triple mouse clicking * fix(e2e): moar race conditions * docs(changelog): add PR
* fix(compact-bar): fix cursor length calculation for multiple users (#4279)Aram Drevekenin2025-07-09
| | | | | | | | | * fix(compact-bar): account for multiplayer cursor length * fix(e2e): account for races in tmux mode * style(fmt): rustfmt * docs(changelog): add PR
* HOTFIX: e2e test flakinessAram Drevekenin2025-07-02
|
* feat: stack pane action (#4255)Aram Drevekenin2025-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* performance(terminal): consolidate renders (#4245)Aram Drevekenin2025-06-26
| | | | | | | | | | | | | | | | | | | | | * 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
* build: Don't re-export foreign crates in utils (#4087)har7an2025-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* fix(stacked): stacked panes can't resize status-bar (#4051)Brooks Rady2025-03-10
| | | | | | | | | | | | | | | | | | | | * 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>
* feat(ui): resize shortcuts (#4003)Aram Drevekenin2025-02-18
| | | | | | | | | * feat(ui): show resize and focus shortcuts when relevant * update serialization and snapshots * update e2e tests * style(fmt): rustfmt
* feat(ux): tips on startup (#3988)Aram Drevekenin2025-02-13
| | | | | | | | | | | | | | | | | * add some tips * refactoring and max tip index * add config to disable release notes and startup tips * allow dismissing startup tips from plugin * random tip at startup * custom launch about * fix tests * style(fmt): rustfmt
* feat(ui): stacked resize (#3957)Aram Drevekenin2025-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * work * tests and initial notes for refactoring * refactor(stacked-panes): break out pane * vertical functionality working with a single stack * refactor: break out pane from stack * fix: properly support multiple stacks in tab * combining multiple stacks vertically * vertical resizing working for all cases * base functionality and tests * some UX tweaking * final functionality for directionless stacked increase * some cleanups * moar cleanups * refactor: stacked resize * fix: issue where resizing stacked geoms to 0 would cause them to overflow afterwards * fix: handle uneven stacking * functionality with tombstones * new open new pane functionality * match decrease increment behavior to increase one and fix some issues * set fullscreen if maxed out * allow splitting stacks * fix tests mostly by parameterizing stacked_resize * add tests * some cleanups * style(fmt): rustfmt * add to config * disable ci cache * is_stacked => stacked * docs(config): remove duplication
* fix(layout-applier): logical index pane sorting (#3893)Aram Drevekenin2024-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | * initial draft * working with floating panes as well * use the same method for applying an initial layout to tiled panes * some refactoring * all code paths working with logical positioning fallback! * get tests to compile * get e2e tests to pass * fix e2e remote runner * breadth-first layout sorting * fix some bugs * style(fmt): rustfmt * style(fmt): remove comments
* feat(ux): pin floating panes (#3876)Aram Drevekenin2024-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * working * ui indication * add keybinding * add to plugin panes * fix with multiple cursors * toggle with the mouse * fix e2e tests and add new one * some cleanups * add to layouts * make mouse click more lenient * allow setting a new floating pane as pinned * make toggle work throughthe command line * add to plugin api * get tests to pass * style(fmt): rustfmt
* fix(input): refix ctrl-j (#3746)Aram Drevekenin2024-11-08
| | | | | * fix(input): refix ctrl-j * fix e2e tests
* feat(ui): bring back fullscreen indication (#3688)Aram Drevekenin2024-10-22
| | | | | * feat(ui): bring back fullscreen indication * fix e2e tests
* feat(cli): make --layout idempotent(-ish) (#3650)Aram Drevekenin2024-10-08
| | | | | | | * feat(cli): if inside a session, apply --layout to the session * fix(screen): some focusing races when switching tab focus * style(fmt): rustfmt
* feat(config): allow loading background plugins on startup (#3616)Aram Drevekenin2024-09-20
| | | | | | | | | | | | | * remove old partial implementation * feat(plugins): allow loading background plugins on startup * add e2e test * update config * udpate config merging * style(fmt): rustfmt
* feat(ui): configuration screen + configure non-colliding keys at runtime (#3502)Aram Drevekenin2024-07-17
| | | | | | | | | | | | | * rebind => reconfigure * persist keybinds and mode info to new tabs * add configuration plugin * make tests pass * remove warnings * style(fmt): rustfmt
* feat(ui): status bar redesign (#3475)Aram Drevekenin2024-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | * work * work * working * get default mode from server and some ui responsiveness * work * finish design and get tests to pass * get e2e tests to pass * add classic layout * add classic layout assets * fix e2e tests * style(fmt): rustfmt * fix plugin system test * style(fmt): some cleanups
* dependencies: switch from Wasmer to Wasmtime (#3349)bjorn32024-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove ForeignFunctionEnv wrapper around PluginEnv This will enable PluginEnv to be the Store context when migrating to Wasmtime. * Pass PluginEnv by value to load_plugin_instance This will allow removing the Clone impl from PluginEnv when migrating to Wasmtime as required by the missing Clone impl on Wasmtime's WasiCtx. * Avoid passing a Store around when an Engine is enough * Pass PluginEnv to the wasi read/write functions Wasmtime requires storing the read/write end of the pipe outside of the WasiCtx. Passing PluginEnv to these functions allows storing them in the PluginEnv. * Migrate to Wasmtime * Switch from wasi-common to wasmtime-wasi * Reduce verbosity of wasmtime_wasi logs * Increase startup delay To wait for all plugins to be compiled. * Disable some wasmtime features * Update to Wasmtime 21.0.1
* feat(plugins): rebind keys at runtime (#3422)Aram Drevekenin2024-06-14
| | | | | | | | | | | | | | | * refactor(server): interpret keys on server so they can be rebound * feat(plugins): allow rebinding keys at runtime * various cleanups * add tests * style(fmt): rustfmt * fix(tests): address (some) e2e test flakiness * style(fmt): rustfmt
* feat(keybindings): support multiple modifiers (eg. Ctrl+Alt) and the kitty ↵Aram Drevekenin2024-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | keyboard protocol (#3383) * parse kitty keys from STDIN * work * work * replace internal Key representation with the new KeyWithModifier in all the places * work * work * allow disabling with config * adjust ordering * handle enabling/disabling properly on the client * support multiple modifiers without kitty too * normalize uppercase keys * get tests to pass * various cleanups * style(fmt): rustfmt
* fix(config): add support for Ctrl and Alt modifiers on function keys in ↵Bradford Hovinen2024-03-25
| | | | | | | | | | | | | | | | | | | | | | | | keybindings (#3179) Previously, it was not possible to define keybindings with a modifier and a function key. The `Key` enum only supported combinging the Ctrl and Alt modifiers with letters. This is somewhat limiting: I would like to make the Zellij keybindings more "distant" than those used in the programs I use from within Zelilj, so that Zellij does not intefere with those programs. Thus I would like to move some of the keybindings from Ctrl+<character> to Ctrl+<function key>. This change adds: * support for function keys with the Ctrl and Alt modifiers in the `Key` enum, * support for parsing such keybindings from the configuration file, * support for such keybindings in the protobuf which communicates the keybindings to plugins, and * support for these keybindings in the plugin API. This is tested by modifying one of the e2e tests to include an example of such keybindings. This verifies that the configuration is correctly parsed, communicated with the plugin, and rendered.
* feat: add moving tab to other position (#3047)Bartosz Zbytniewski2024-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: add moving tab to other position * docs(changelog): revert changes * test: update config snapshots * refactor: get rid of HorizontalDirection enum * refactor: cleanup code order * refactor: use debug! instead of info! * refactor: use more defensive way to switch tabs * refactor: revert tip changes * refactor: code formatting * refactor: improve invalid input notification * refactor: inline fns for calculating target index --------- Co-authored-by: Jae-Heon Ji <atx6419@gmail.com>
* fix(terminal): some real/saved cursor bugs during resize (#3032)Aidan Hobson Sayers2024-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: Simplify transfer_rows_from_viewport_to_lines_above next_lines is always consolidated to a single Row, which immediately gets removed - we can remove some dead code as a result * perf: Batch remove rows from the viewport for performance Given a 1MB line catted into the terminal, a toggle-fullscreen + toggle-fullscreen + close-pane + `run true` goes from ~9s to ~3s * perf: Optimize Row::drain_until by splitting chars in one step Given a 10MB line catted into the terminal, a toggle-fullscreen + toggle-fullscreen + close-pane + `run true` goes from ~23s to ~20s * refactor: Simplify `if let` into a `.map` * refactor: There are only new saved coordinates when there were old ones * refactor: Unify viewport transfer: use common variable names * fix: Use same saved cursor logic in height resize as width See #2182 for original introduction that only added it in one branch, this fixes an issue where the saved cursor was incorrectly reset when the real cursor was * fix: Correct saved+real cursor calculations when reflowing long lines * fix: Don't create canonical lines if cursor ends on EOL after resize Previously if a 20 character line were split into two 10 character lines, the cursor would be placed on the line after the two lines. New characters would then be treated as a new canonical line. This commit fixes this by biasing cursors to the end of the previous line. * fix: for cursor index calculation in lines that are already wrapped * chore: test for real/saved cursor position being handled separately * chore: Apply cargo format * chore(repo): update issue templates * Bump rust version to 1.75.0 (#3039) * rust-toolchain: Bump toolchain version to 1.69.0 which, compared to the previous 1.67.0, has the following impacts on `zellij`: - [Turn off debuginfo for build deps][2]: Increases build time (on my machine) from ~230 s in 1.67.0 to ~250 s now, *which is unexpected* This version also changes [handling of the `default-features` flag][3] when specifying dependencies in `Cargo.toml`. If a dependent crate requires `default-features = true` on a crate that is required as `default-features = false` further up the dependency tree, the `true` setting "wins". We only specify `default-features = false` for three crates total: - `names`: This is used only by us - `surf`: This is used only by us - `vte`: This is also required by `strip-ansi-escapes`, but that has `default-features = false` as well How this affects our transitive dependencies is unknown at this point. [2]: https://github.com/rust-lang/cargo/pull/11252/ [3]: https://github.com/rust-lang/cargo/pull/11409/ * rust-toolchain: Bump toolchain version to 1.70.0 which, compared to the previous 1.69.0, as the following impacts on `zellij`: 1. [Enable sparse registry checkout for crates.io by default][1] This drastically increases the time to first build on a fresh rust installation/a rust installation with a clean cargo registry cache. Previously it took about 75s to populate the deps/cache (with `cargo fetch --locked` and ~100 MBit/s network), whereas now the same process takes ~10 s. 2. [The `OnceCell` type is now part of std][2] In theory, this would allow us to cut a dependency from `zellij-utils`, but the `once_cell` crate is pulled in by another 16 deps, so there's no point in attempting it right now. Build times and binary sizes are unaffected by this change compared to the previous 1.69.0 toolchain. [1]: https://github.com/rust-lang/cargo/pull/11791/ [2]: https://doc.rust-lang.org/stable/std/cell/struct.OnceCell.html * rust-toolchain: Bump toolchain version to 1.75.0 which, compared to the previous 1.70.0, has the following impacts on `zellij`: 1. [cross-crate inlining][8] This should increase application performance, as functions can now be inlined across crates. 2. [`async fn` in traits][9] This would allow us to drop the `async_trait` dependency, but it is currently still required by 3 other dependencies. Build time in debug mode (on my own PC) is cut down from 256s to 189s (for a clean build). Build time in release mode is cut down from 473s to 391s (for a clean build). Binary sizes only change minimally (825 MB -> 807 MB in debug, 29 MB -> 30 MB in release). [8]: https://github.com/rust-lang/rust/pull/116505 [9]: https://github.com/rust-lang/rust/pull/115822/ * chore: Apply rustfmt. * CHANGELOG: Add PR #3039. * feat(plugins): introduce 'pipes', allowing users to pipe data to and control plugins from the command line (#3066) * prototype - working with message from the cli * prototype - pipe from the CLI to plugins * prototype - pipe from the CLI to plugins and back again * prototype - working with better cli interface * prototype - working after removing unused stuff * prototype - working with launching plugin if it is not launched, also fixed event ordering * refactor: change message to cli-message * prototype - allow plugins to send messages to each other * fix: allow cli messages to send plugin parameters (and implement backpressure) * fix: use input_pipe_id to identify cli pipes instead of their message name * fix: come cleanups and add skip_cache parameter * fix: pipe/client-server communication robustness * fix: leaking messages between plugins while loading * feat: allow plugins to specify how a new plugin instance is launched when sending messages * fix: add permissions * refactor: adjust cli api * fix: improve cli plugin loading error messages * docs: cli pipe * fix: take plugin configuration into account when messaging between plugins * refactor: pipe message protobuf interface * refactor: update(event) -> pipe * refactor - rename CliMessage to CliPipe * fix: add is_private to pipes and change some naming * refactor - cli client * refactor: various cleanups * style(fmt): rustfmt * fix(pipes): backpressure across multiple plugins * style: some cleanups * style(fmt): rustfmt * style: fix merge conflict mistake * style(wording): clarify pipe permission * docs(changelog): introduce pipes * fix: add some robustness and future proofing * fix e2e tests --------- Co-authored-by: Aram Drevekenin <aram@poor.dev> Co-authored-by: har7an <99636919+har7an@users.noreply.github.com>
* feat(config): add serialization interval configuration (#2923)Aram Drevekenin2023-11-10
| | | | | | | * add serialization interval configuration * fix e2e tests * fix e2e tests
* fix: styled underlines in editors (#2918)Mike Lloyd2023-11-08
| | | | | | | * Add styled_underlines param to TerminalPane * Add styled_underlines to Cursor::new * Remove styled_underlines from render_first_run_banner
* feat(plugins): UI components (#2898)Aram Drevekenin2023-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | * parsing rendering private osc table * move components to DCS and add tests * refactor: move components to their own thing * ribbon and selected-ribbon ui components * nested list ui component * selected and indices for nested list * coordinates and size for ui components * use Text with ribbon * add tests for components * refactor: ui components * refactor: ui components api * style(fmt): rustfmt * style(fmt): cleanups
* feat(panes): Add an option to press <ESC> and drop to shell in command panes ↵Aram Drevekenin2023-10-17
| | | | | | | (#2872) * feat(panes): ESC to drop to default shell on command panes * style(fmt): rustfmt
* feat(sessions): session resurrection (#2801)Aram Drevekenin2023-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add necessary actions in server and utils * update * move all logic relevant to local default config directories to utils::home * add debug statements for pane geom * add tests; print resulting kdl * fix dumping custom layouts from setup; start fixing algorithm for simplest layout possible * fix: fixed persistence code and tests to support flexible layouts * fix(tab-bar,compact-bar): tab switching with mouse sometimes not working (#2587) * tab-bar: fix clicks sometimes not registering Caching the click position wasn't working across multiple plugin instances. Also a couple of refactors: - move the code with the tab switching logic inside update - avoid rendering when calling switch_tab_to, since it will happen anyway afterwards * same fix for compact-bar * docs(changelog): plugins tab switching with mouse fix * feat(ui): new status bar mode (#2619) * supermode prototype * fix integration tests * fix tests * style(fmt): rustfmt * docs(changelog): status-bar supermode * fix(rendering): occasional glitches while resizing (#2621) * docs(changelog): resize glitches fix * chore(version): bump development version * Fix colored pane frames in mirrored sessions (#2625) * server/panes/tiled: Fix colored frames in mirrored sessions. Colored frames were previously ignored because they were treated like floating panes when rendering tiled panes. * CHANGELOG: Add PR #2625 * server/tab/unit: Fix unit tests for server. * fix(sessions): use custom lists of adjectives and nouns for generating session names (#2122) * Create custom lists of adjectives and nouns for generating session names * move word lists to const slices * add logic to retry name generation * refactor - reuse the name generator - iterator instead of for loop --------- Co-authored-by: Thomas Linford <linford.t@gmail.com> * docs(changelog): generate session names with custom words list * feat(plugins): make plugins configurable (#2646) * work * make every plugin entry point configurable * make integration tests pass * make e2e tests pass * add test for plugin configuration * add test snapshot * add plugin config parsing test * cleanups * style(fmt): rustfmt * style(comment): remove commented code * docs(changelog): configurable plugins * fix(terminal): properly handle resizes in alternate screen (#2654) * docs(changelog): focus glitches * feat(plugins): utility functions to find active pane and tab (#2652) * docs(changelog): plugin api utility functions * feat(ui): break pane to new tab and move panes between tabs (#2664) * prototype * some tests * break out floating pane * break out plugin panes * add keybind and fix some minor issues * remove cli * move pane to left/right tab * update ui * adjust ui * style(fmt): rustfmt * style(comment): remove commented code * update snapshots * docs(changelog): break pane to new tab * fix(performance): plug memory leak (#2675) * docs(changelog): plug memory leak * feat(plugins): use protocol buffers for serializing across the wasm boundary (#2686) * work * almost done with command protobuffers * done translating command data structures * mid transferring of every command to protobuff command * transferred plugin_command.rs, now moving on to shim.rs * plugin command working with protobufs * protobuffers in update * protobuf event tests * various TODOs and comments * fix zellij-tile * clean up prost deps * remove version mismatch error * fix panic * some cleanups * clean up event protobuffers * clean up command protobuffers * clean up various protobufs * refactor protobufs * update comments * some transformation fixes * use protobufs for workers * style(fmt): rustfmt * style(fmt): rustfmt * chore(build): add protoc * chore(build): authenticate protoc * docs(changelog): protobuffers * feat: add plugin permission system (#2624) * WIP: add exaple of permission ui * feat: add request permission ui * feat: add caching permission in memory * feat: add permission check * feat: add file caching * fix: changes request * feat(ui): new status bar mode (#2619) * supermode prototype * fix integration tests * fix tests * style(fmt): rustfmt * docs(changelog): status-bar supermode * fix(rendering): occasional glitches while resizing (#2621) * docs(changelog): resize glitches fix * chore(version): bump development version * Fix colored pane frames in mirrored sessions (#2625) * server/panes/tiled: Fix colored frames in mirrored sessions. Colored frames were previously ignored because they were treated like floating panes when rendering tiled panes. * CHANGELOG: Add PR #2625 * server/tab/unit: Fix unit tests for server. * fix(sessions): use custom lists of adjectives and nouns for generating session names (#2122) * Create custom lists of adjectives and nouns for generating session names * move word lists to const slices * add logic to retry name generation * refactor - reuse the name generator - iterator instead of for loop --------- Co-authored-by: Thomas Linford <linford.t@gmail.com> * docs(changelog): generate session names with custom words list * feat(plugins): make plugins configurable (#2646) * work * make every plugin entry point configurable * make integration tests pass * make e2e tests pass * add test for plugin configuration * add test snapshot * add plugin config parsing test * cleanups * style(fmt): rustfmt * style(comment): remove commented code * docs(changelog): configurable plugins * style(fmt): rustfmt * touch up ui * fix: don't save permission data in memory * feat: load cached permission * test: add example test (WIP) * fix: issue event are always denied * test: update snapshot * apply formatting * refactor: update default cache function * test: add more new test * apply formatting * Revert "apply formatting" This reverts commit a4e93703fbfdb6865131daa1c8b90fc5c36ab25e. * apply format * fix: update cache path * apply format * fix: cache path * fix: update log level * test for github workflow * Revert "test for github workflow" This reverts commit 01eff3bc5d1627a4e60bc6dac8ebe5500bc5b56e. * refactor: permission cache * fix(test): permission grant/deny race condition * style(fmt): rustfmt * style(fmt): rustfmt * configure permissions * permission denied test * snapshot * add ui for small plugins * style(fmt): rustfmt * some cleanups --------- Co-authored-by: Aram Drevekenin <aram@poor.dev> Co-authored-by: har7an <99636919+har7an@users.noreply.github.com> Co-authored-by: Kyle Sutherland-Cash <kyle.sutherlandcash@gmail.com> Co-authored-by: Thomas Linford <linford.t@gmail.com> Co-authored-by: Thomas Linford <tlinford@users.noreply.github.com> * docs(changelog): permission system * feat(sessions): add a session manager to switch between sessions, tabs and panes and create new ones (#2721) * write/read session metadata to disk for all sessions * switch session client side * fix tests * various adjustments * fix full screen focus bug in tiled panes * fix tests * fix permission sorting issue * cleanups * add session manager * fix tests * various cleanups * style(fmt): rustfmt * clear screen before switching sessions * I hate you clippy * truncate controls line to width * version session cache * attempt to fix plugin tests * style(fmt): rustfmt * another attempt to fix the tests in the ci * docs(changelog): session manager * fix(ux): various ui/ux fixes (#2722) * force plugin render on permission request response * clear warnings * Revert "feat(ui): new status bar mode (#2619)" This reverts commit 27763d26ab83dd9f81c69c75601cbf6075f13790. * adjust status bar help * fix colors in session manager and shortcut in status-bar * adjust keybindings * docs(changelog): update ux fixes * feat(plugins): optionally move plugin to focused tab (#2725) * feat(plugins): move_to_focused_tab attribute for LaunchOrFocusPlugin * style(fmt): rustfmt * docs(changelog): move plugin to focused tab * fix(keybinds): add 'floating' and 'name' to the Run command keybinding (#2726) * fix(keybinds): add 'floating' and 'name' to the Run command keybinding * style(fmt): rustfmt * docs(changelog): keybind run floating pane * fix(plugins): make sure configuration is also part of the plugin keys (#2727) * fix(plugins): make sure configuration is also part of the plugin keys * no thanks clippy * docs(changelog): fix plugin configuration uniqueness * fix(plugins): remove protobuf duplications (#2729) * fix(plugins): remove protobuf duplications * style(fmt): rustfmt * Update CHANGELOG.md * fix(plugins): various ui fixes (#2731) * Update CHANGELOG.md * fix(panes): refocus pane properly on tab change (#2734) * fix(panes): stacked panes focus bug * style(fmt): rustfmt * docs(changelog): stacked pane focus glitch * xtask/pipeline: Fix publish task (#2711) * xtask/pipeline: Fix publish task which was previously stuck in an infinite loop after successfully publishing a crate. The error originated in the code only checking for error conditions but not breaking out of the inner infinite loop in case of success. * xtask: Improve publish failure UX by offering the user more actions to choose from when an error occured. * utils/assets: Add generated prost files to assets to make sure they're available at build time and are picked up by all components. It seems we hit some strange bug with the build script where, when running `cargo publish --dry-run` the build script **is not** run before regularly compiling zellij-utils. This shouldn't happen according to the docs, but I cannot explain what's causing it. So we're using this as a workaround for now to make a smooth release. * xtask: Prevent accidental git commit deletion when dry-running a publish. * utils: Add comments to protobuf-related code to explain why these changes were performed. The comments all include a link to an issue comment explaining the situation in greater detail. * xtask: Build protobuf definitions when building any part of the project, similar to how we build the plugins when required. This should ensure that all crates built through `cargo xtask` (which is the officially supported build method) will receive up-to-date protobuf definitions. * chore(release): v0.38.0 * chore(version): bump development version * refactor(server): remove unnecessary mut (#2735) * docs(changelog): refactor server * chore(repo): update build instructions * fix(status-bar): add break tab hints (#2748) * fix(status-bar): add break tab hints * fix(tests): update snapshot to new hints * Update CHANGELOG.md * fix(reconnect): do not clear terminal state when entering alternate screen (#2750) * debug * refactor(reconnect): articular reconnection logic * docs(changelog): fix glitches on windows terminal * fix(grid): memory leak with unfocused tabs (#2745) * use hashset instead of vec for changed lines avoid output buffer growring indefinitely if tab does not get rendered * tidy up - improve hashset -> vec conversion - remove now unnecessary dedup * use copied instead of cloned on iter * docs(changelog): grid memory leak fix * fix(input): block input thread for newtiledpane and newfloatingpane as well (#2757) * docs(changelog): input action new pane fix * chore(version): adjust version for release * chore(release): v0.38.1 * chore(version): bump development version * fix(terminal): wrap lines when adding characters in alternate screen (#2789) * docs(changelog): line wrap bug * chore(version): bump version for patch release * chore(release): v0.38.2 * chore(version): bump development version * fix(utils): validate session name (#2607) * fix(utils): validate session name * cargo fmt * refactor: assign constant values to variables * refactor: move operations unrealted to the condition --------- Co-authored-by: Jae-Heon Ji <atx6419@gmail.com> * docs(changelog): fix validate session name * merge conflict fix * feat(panes): in place run (#2795) * prototype * fix tests * add to all the things except plugins * add in-place to plugin commands * fix launch-or-focus should_float and in place behavior * various cleanups * style(fmt): rustfmt * docs * bring in commands to dumped layout * tidy up data structures * bring in plugins to dumped layout * fix tests * style(fmt): rustfmt * chore: rename file (#2803) Signed-off-by: AlixBernard <alix.bernard9@gmail.com> * bring in floating panes * bring in stacked panes * style(fmt): rustfmt * bring in new_tab_template * bring in swap layouts * bring in edit panes, command panes and cwds * consolidate CWD common prefixes when possible * filter out default shell * style(fmt): rustfmt * handle scrollback editor panes properly * handle in place panes properly * bring in pane names * style(fmt): rustfmt * style(fmt): rustfmt * dump layout action to terminal * log session layout to HD periodically * resurrect dead sessions by attaching to them * delete dead sessions * style(fmt): rustfmt * start command panes as suspended by default * style(fmt): rustfmt * respect tab/pane focus * improve dump performance * hide_floating_panes in layout and resurrection * show resurrectable sessions in zellij ls and include timestamps * style(fmt): rustfmt * allow disabling session serialization in config * style(fmt): rustfmt * fix e2e tests * add e2e test * style(fmt): rustfmt * style(fmt): rustfmt * serialize and restore pane viewport * fix e2e tests and add new one * style(fmt): rustfmt * cleanups * cleanups * more cleanups * refactor: move stuff around * fix e2e tests * style(fmt): rustfmt * style(fmt): handle compilation warnings * add tests for new layout properties * fix current session name indication * style(fmt): rustfmt * adjust default config * some cleanups * go away clippy --------- Signed-off-by: AlixBernard <alix.bernard9@gmail.com> Co-authored-by: alekspickle <aleks.work2222+gh@gmail.com> Co-authored-by: Example Name <example@example.test> Co-authored-by: Oleks Gnatovskyi <22867443+alekspickle@users.noreply.github.com> Co-authored-by: Thomas Linford <tlinford@users.noreply.github.com> Co-authored-by: har7an <99636919+har7an@users.noreply.github.com> Co-authored-by: Kyle Sutherland-Cash <kyle.sutherlandcash@gmail.com> Co-authored-by: Thomas Linford <linford.t@gmail.com> Co-authored-by: Nacho114 <17376073+Nacho114@users.noreply.github.com> Co-authored-by: Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com> Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com> Co-authored-by: deepsghimire <70006817+deepsghimire@users.noreply.github.com> Co-authored-by: Jae-Heon Ji <atx6419@gmail.com> Co-authored-by: AlixBernard <56587201+AlixBernard@users.noreply.github.com>
* fix(status-bar): add break tab hints (#2748)Aram Drevekenin2023-08-29
| | | | | * fix(status-bar): add break tab hints * fix(tests): update snapshot to new hints