Skip to content

Combine #30 + #32 + bump zellij-tile to 0.44.2#35

Closed
ultranity wants to merge 6 commits into
b0o:mainfrom
ultranity:feat/zellij-0.44.2-and-customizable-hints
Closed

Combine #30 + #32 + bump zellij-tile to 0.44.2#35
ultranity wants to merge 6 commits into
b0o:mainfrom
ultranity:feat/zellij-0.44.2-and-customizable-hints

Conversation

@ultranity

Copy link
Copy Markdown

Summary

Combines two open PRs that don't apply cleanly on top of each other, plus bumps zellij-tile{,-utils} from 0.44.1 → 0.44.2 to match the latest released zellij.

The two PRs both heavily rewrite src/main.rs and conflict on every Action::* match arm. This branch:

  1. Starts from the PR feat: update zellij-tile to 0.44.1 for Zellij 0.43/0.44 compatibility #32 base
  2. Cherry-picks PR feat: customizable key format, colors, aliases, and compact display #30's two feat commits
  3. Manually resolves the conflicts in src/main.rs so PR feat: customizable key format, colors, aliases, and compact display #30's new config / formatting code uses the new struct-variant Action::* API from PR feat: update zellij-tile to 0.44.1 for Zellij 0.43/0.44 compatibility #32
  4. Bumps zellij-tile = "0.44.2" and zellij-tile-utils = "0.44.2" (latest at time of writing)

Verified

Why not separate PRs

Because of the conflict, merging them in either order requires the same manual resolution effort. Filing them separately means whoever merges second will hit the same conflicts. A combined PR documents the resolution once.

If you'd prefer the changes split (e.g. accept #32 first, then a separate "rebased on top of #32" version of #30), I can break this branch in two — let me know.

Credits

Closes #5, closes #12, supersedes #30, supersedes #32.

eduardoleal and others added 6 commits April 30, 2026 08:54
Bumps `zellij-tile` and `zellij-tile-utils` from 0.42.2 to 0.44.1.

Between 0.42 and 0.43, Zellij changed nearly all tuple-style Action enum
variants to named struct variants. Updated every call site in main.rs:

- Action::SwitchToMode(mode)  → SwitchToMode { input_mode: mode }
- Action::NewPane(dir, name, suppressed) → NewPane { direction, pane_name, start_suppressed }
- Action::NewTab(layout, ..., focus) → NewTab { tiled_layout, ..., should_change_focus_to_new_tab, cwd: None, initial_panes: None, first_pane_unblock_condition: None }
- Action::MoveFocus(dir) → MoveFocus { direction }
- Action::MovePane(dir) → MovePane { direction }
- Action::Resize(resize, dir) → Resize { resize, direction }
- Action::PaneNameInput(input) → PaneNameInput { input }
- Action::TabNameInput(input) → TabNameInput { input }
- Action::SearchInput(input) → SearchInput { input }
- Action::Search(dir) → Search { direction }
- Action::EditScrollback → EditScrollback { ansi: false }

Verified: cargo build --release --target wasm32-wasip1 passes cleanly.
- Drop EventType::SessionUpdate — it was subscribed but never used,
  and in Zellij 0.44 the large SessionUpdate payload triggers a WASM
  out-of-bounds memory access on every event (~1/s), corrupting input.

- Fix the initialized flag: the old guard (mode != base_mode) meant
  the plugin never settled in Normal/base mode, causing endless renders
  and pipe_message_to_plugin spam. Now it marks initialized as soon as
  any non-empty output is produced.
- modifier_style: long/short/symbol key display (Ctrl+n, C-n, ^n)
- hint_format: template for each hint ({key}, {action})
- separator: configurable delimiter between hints
- color customization: global, per-label, and per-mode color overrides
- max_keys: limit alternative keybindings shown per action
- alias_{label}: rename action labels in display
- key_alias_{key}: rename special bare keys (Enter→⏎, Space→␣)

Closes b0o#5, closes b0o#12
Calling set_selectable(false) immediately after request_permission() makes
the plugin pane unfocusable, so the user cannot click into the permission
grant dialog that zellij renders inside that pane. The plugin gets stuck
at "unable to grant permission" forever.

Move the set_selectable(false) call into the update() handler triggered
by EventType::PermissionRequestResult — by then either the user has
granted/denied perms or the auto-grant ran, and hiding the pane is safe.
@ultranity

Copy link
Copy Markdown
Author

Pushed an additional fix: set_selectable(false) was being called immediately after request_permission() in load(). zellij renders the permission-grant dialog inside the plugin's own pane, so making the pane unfocusable in the same call prevents the user from interacting with the dialog — the plugin appears 'stuck' with no obvious way to grant permissions.

Fix: defer set_selectable(false) to the update() handler keyed on EventType::PermissionRequestResult. By the time that fires, perms are resolved (granted or denied) and hiding the pane is safe.

Commit: 120d159fix: defer set_selectable(false) until permission grant resolved

@ultranity ultranity closed this May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regex(es) to allow pre-render modifications Is it posible to style zjstatus-hints?

4 participants