Commit graph

2100 commits

Author SHA1 Message Date
har7an
e7bce6a106
Add docs about error handling (#1745)
* docs: Add ERROR_HANDLING

that explains how we plan to change error handling in zellij and invites
new contributors to join the fun. Details the currently existent error
handling capabilities and gives a bunch of examples taken from #1670.

* utils/errors: Shorten docblock

by moving previous content under "Help Wanted" to the new
`docs/ERROR_HANDLING` document and link to the document instead.
2022-09-27 07:28:09 +00:00
har7an
77f05f0f12
Fix: issue 1734 (#1749)
* server/tab: Check suppressed panes

when writing to a pane by ID. Previously only the tiled and floating
panes would be searched for a pane of a given ID.

Fixes: #1734

* server/tab/unit: Test writing to suppressed panes

* docs: fix server panics when writing to suppressed panes
2022-09-23 05:28:35 +00:00
Thomas Linford
480086e3d4
test: simplify tab integration tests (#1728)
* wip

* refactor existing tests

* rename methods
2022-09-15 20:35:36 +02:00
raphCode
65d12c4b9b
Don't send the server an exit signal when client panics (#1731)
* Don't send the server an exit signal when client crashes

* Update changelog
2022-09-14 17:33:46 +02:00
har7an
31d741263c
docs(changelog): error handling in screen 2022-09-09 13:40:41 +00:00
har7an
99e2bef8c6
Feature: Better error handling/reporting (#1670)
* utils: re-export "anyhow" unconditionally

even for wasm targets.

* utils/errors: Share wasm-compatible code

and move everything that can't run in wasm into a separate submodule.

* utils: Share "errors" module unconditionally

The module is now structured such that all code incompatible with wasm
targets lives in its own submodule that isn't included when compiling
for wasm targets.

* utils/errors: Add "Help wanted" doc section

that informs the reader about the endeavour to improve error handling
throughout the zellij code base.

* plugins: Handle errors returned by `zellij_tile`

now that the panic calls have been removed.

* utils/errors: Extend `anyhow::Result` with traits

that allow for easy/concise logging of `anyhow::Result` types and
panicking the application when they are fatal or non-fatal.

* utils/errors: Fix doctest

* utils/errors: Add prelude

that applications can import to conveniently access the error handling
functionality part of the module. Re-exports some parts and macros from
anyhow and the `LoggableError` and `FatalError` traits.

* server/screen: Adopt error handling

and make all fallible functions from the public API return a `Result`.
Append error contexts in all functions that can come across error types
to allow tracing where an error originates and what lead there.

* server/lib: Catch errors from `screen`

and make them `fatal`. This will log the errors first, before unwrapping
on the error type and panicking the application.

* server/unit/screen: Fix unit tests

and unwrap on the `Result` types introduced from the new error handling.

* utils/errors: Track error source

in calls to `fatal`, so we keep track of the location where the panic
really originates. Otherwise, any call to `fatal` will show the code in
`errors` as source, which of course isn't true.
Also change the error formatting and do not call `to_log` for fatal
errors anymore, because the panic is already logged and contains much
more information.

* utils/errors: Update `FatalError` docs

* plugins: Undo accidental modifications

* utils/errors: Improve module docs

explain some error handling facilities and the motivation behind using
them.

* server/screen: Remove `Result` from Infallible

functions that are part of the public API.
2022-09-09 13:21:03 +00:00
Aram Drevekenin
3f43a057cb chore(version): bump development version 2022-09-09 13:38:22 +02:00
Aram Drevekenin
a28d905d84 chore(release): v0.31.4 2022-09-09 13:00:24 +02:00
Aram Drevekenin
41b27d011b
docs(changelog): multiple users ui-cursor fix 2022-09-09 12:32:14 +02:00
Aram Drevekenin
d5764fb225
fix(ui): sort multiple ui cursors (#1719)
* fix(ui): stable-sort multiple ui cursors

* style(clippy): make clippy happy
2022-09-09 12:30:58 +02:00
Aram Drevekenin
4d1ecabdbf
docs(changelog): tab-bar mouseclick fix 2022-09-09 09:49:35 +02:00
Paulo Coelho
b9e57cfdad
fix(tab-bar): mouse-click in simplified-ui (#1658)
* fix(tab-bar): fix tab bar click when tabs are collapsed

* fix(tab-bar): calculate tab length correctly for any separator

* fix(tab-bar): fix clippy
2022-09-09 09:48:02 +02:00
Thomas Linford
ebbd46ea3b
feat(compatibility): mouse wheel faux scrolling in alternate screen (#1678)
* implement faux scrolling

* update changelog

* fix tests

* cursor keys mode handling

* add integration test

* undo changelog reformatting
2022-09-04 16:26:15 +02:00
a-kenji
84e14d1479
flake.lock: Update (#1703)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-03 23:09:45 +02:00
Thomas Linford
a58a5ca769
fix osc params 1024 byte limit (#1711)
* update vte to v0.11.0, and turn off it's default-features

* vte's default includes no_std, and in that case the osc params buffer is capped at 1024 bytes

* add changelog entry
2022-09-03 20:11:56 +02:00
Aram Drevekenin
28a002929a
docs(template): mention stty size in bug recreation 2022-09-02 16:23:53 +02:00
Aram Drevekenin
ccf9201d5f
docs(changelog): fix empty bullet 2022-09-02 15:33:24 +02:00
Aram Drevekenin
857fc93c50
docs(changelog): client crash recovery 2022-09-02 15:32:36 +02:00
Aram Drevekenin
d68d407d26
fix(router): gracefully handle client crashes (#1710)
* fix(router): gracefully handle client crashes

* style(comments): remove unused
2022-09-02 15:30:43 +02:00
Aram Drevekenin
93f0f783b8
docs(changelog): startup router race 2022-09-02 10:22:22 +02:00
Aram Drevekenin
b17f73bf08
fix(router): startup race (#1706)
* fix(router): retry messages when server is not ready for all startup signals

* style(fmt): rustfmt
2022-09-02 10:21:09 +02:00
Thomas Linford
533a19c26b
docs(changelog): bracketed paste fix 2022-08-24 20:07:15 +02:00
Thomas Linford
553a9bbe4f
fix: bracketed paste input not getting adjusted properly (#1689)
* fix bracketed paste input not getting adjusted properly

* add regression test

* readd deleted comment
2022-08-24 20:05:59 +02:00
dependabot[bot]
c71e16916f
build(deps): bump DeterminateSystems/update-flake-lock from 12 to 13 (#1683)
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 12 to 13.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v12...v13)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-23 08:26:31 +02:00
Aram Drevekenin
54602e0308
chore(ci): change dependabot frequency 2022-08-22 09:16:00 +02:00
Aram Drevekenin
b5a781351f
docs(changelog): improve vttest compliance 2022-08-19 14:01:38 +02:00
Autumn
a316577d1e
fix(compatibility): improve vttest (#1671)
* Improve 'vttest' scenarios:

1. Report terminal as VT220 with sixel rather than VT400 family with
   sixel. This fixes a hang when launching vttest as it is waiting for
   a response to DECRQSS.

2. Test 6.2: Support NewLine mode (CR --> CRLF).

3. Test 6.3: Fix DSR cursor position report to honor scrolling region.

4. Test 6.7: Parse and respond to DECREQTPARM (Request Terminal
   Parameters - CSI x).  This is a VT100 sequence that xterm used to
   respond to always, but more recently only responds to when
   explicitly set to VT100 level.

* cargo fmt

* Fix failing unit test snapshot

* fix clippy error

* VT100 UK character set
2022-08-19 14:00:26 +02:00
Aram Drevekenin
639de16c5e chore(version): bump development version 2022-08-18 09:30:12 +02:00
Aram Drevekenin
588167f38e chore(release): v0.31.3 2022-08-18 08:55:21 +02:00
Aram Drevekenin
94669fc930 HOTFIX: report up arrow correctly 2022-08-18 00:58:29 +02:00
Aram Drevekenin
ac8a9d4b28 chore(version): bump development version 2022-08-17 11:46:46 +02:00
Aram Drevekenin
67011947e8 chore(release): v0.31.2 2022-08-17 11:07:34 +02:00
Aram Drevekenin
aa80c09d13
docs(changelog): mouse events to terminal panes 2022-08-17 09:31:27 +02:00
Aram Drevekenin
f4ad946497
fix(terminal): SGR/UTF8 mouse reporting in terminal panes (#1664)
* work

* work

* fix: selection mishandling

* style(fmt): rustfmt

* style(comments): remove outdated

* style(clippy): make clippy happy

* fix(mouse): off by one sgr/utf8 reporting

* style(fmt): rustfmt

* fix(mouse): correctly report drag event code

* fix(input): support mouse middle click

* style(fmt): rustfmt
2022-08-17 09:28:51 +02:00
Jae-Heon Ji
b53e3807eb
docs(changelog): refactor terminal characters 2022-08-17 01:32:20 +09:00
TornaxO7
3da1cb1521
A little refactoring (#1663)
* general refactors

* applied `cargo fmt`

* adding BRACKETED_PASTE_BEGIN and BRACKETED_PASTE_END constans

* removing csi.rs trait
2022-08-17 01:29:45 +09:00
Aram Drevekenin
d9d7ef3aef
chore(workflows): change rust-toolchain update to once per month 2022-08-14 10:12:59 +02:00
a-kenji
10724ac958
rust-toolchain: Update (#1659)
Co-authored-by: a-kenji <a-kenji@users.noreply.github.com>
2022-08-14 09:09:57 +02:00
Sven Wick
61ae91e64d
docs(changelog): fix typo
Fix typo
2022-08-12 17:24:01 +02:00
Aram Drevekenin
6dcf3df9ea
docs(changelog): forward copy events from terminals 2022-08-12 17:23:19 +02:00
apexo
2cb6e20d62
Terminal compatibility: forward OSC52 events (#1644)
Fixes #1199

Co-authored-by: Christian Schubert <christian.schubert01@sap.com>
2022-08-12 17:21:58 +02:00
Aram Drevekenin
018d32e997
style(comment): update flake-lock frequency comment 2022-08-11 16:02:31 +02:00
Aram Drevekenin
be2ab63106
chore(ci): change frequency of flake lock updates to once per month 2022-08-11 16:01:55 +02:00
Aram Drevekenin
3c8aa11f1d
docs(changelog): fix router crash 2022-08-11 14:36:26 +02:00
Aram Drevekenin
e910db9bad
fix(router): retry messages when server is not ready (#1651)
* fix(router): retry messages when server is not ready

* style(fmt): rustfmt
2022-08-11 14:35:15 +02:00
har7an
dba5dcbd83
fix (screen): don't crash when first tab doesn't exist (#1648)
* screen: Don't crash when first tab doesn't exist

while trying to attach a new client. Instead, check whether the first
tab does exist and if not, take the first tab index from the tabs
present in the session. If no tabs exist, panic with a better error
message.

* changelog: Add PR #1648

* add test

* fix(tabs): send actual default mode info to new tab

Co-authored-by: Thomas Linford <linford.t@gmail.com>
Co-authored-by: Aram Drevekenin <aram@poor.dev>
2022-08-11 11:10:12 +02:00
a-kenji
01adc08f05
flake.lock: Update (#1639)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-08 09:40:00 +02:00
Aram Drevekenin
4908b94eb0
chore(logging): log all unhandled ansi sequences (#1636) 2022-08-05 16:17:58 +02:00
Aram Drevekenin
0cedf39032 chore(version): bump development version 2022-08-02 18:46:32 +02:00
Aram Drevekenin
8ea0f85e95 chore(release): v0.31.1 2022-08-02 17:56:00 +02:00