Closed
Conversation
This change introduces support for YAML-driven startup layouts, allowing users to define complex window and pane configurations that are automatically applied when starting a new session. Key features: - CLI support via --layout <name> flag. - Configuration search order: --layout > local .prise.yml > global layout.yml > built-in. - Built-in layouts: default, horizontal-split, vertical-split, dev. - Support for multiple tabs (windows) and sequential pane splits within each tab. - Variable expansion in commands (/Users/bangedorrunt, nano, /run/current-system/sw/bin/fish, , ). - Integrated with the tiling UI to automatically spawn PTYS and execute commands.
Contributor
Author
|
Hi, Please NOTE that this PR also merged #69 |
* Server: Add terminal_mutex locking when accessing PTY title and cwd to prevent data races. * Client: Use absolute path for exec, ensure proper TTY deinitialization, and fix terminal reinitialization on failure. The previous implementation allowed concurrent access to PTY state, leading to segfaults. Additionally, the exec call was using a relative path and leaving the TTY in an inconsistent state.
* Server: Fix missing lock in sendCwdChanged which caused a data race on PTY cwd state. * Client: Implement a send queue to safely handle concurrent RPC sends. This prevents hangs when multiple PTYs are attached/initialized at once. * Client: Ensure TTY thread is stopped and joined before performing exec during session switch. * Client: Handle partial sends and queued messages correctly in onSendComplete. * Client: Correctly map old PTY IDs to new ones in all Lua callbacks.
b5d1425 to
2d11de3
Compare
* Server: Added terminal_mutex locking when accessing PTY title and cwd to prevent data races. * Client: Implemented an RPC send queue to handle concurrent requests safely and prevent hangs during session restoration. * Client: Improved switchToSession reliability by ensuring TTY thread is stopped and joined before exec, and using absolute path for the executable. * Client: Added pty_id_map to maintain UI consistency when PTYs are recreated with new IDs after a server restart. * Lua: Fixed runtime errors in command palette caused by improper string conversion of dynamic command names. The previous implementation had multiple race conditions in the server and lacked proper flow control in the client RPC layer, leading to segfaults and freezes during heavy I/O or session switching. Lua runtime errors further destabilized the UI during palette operations.
2d11de3 to
d867951
Compare
Owner
|
I like the idea of predefined layouts, but I don't want to use yaml. These could be Thanks for the PR though! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--layoutCLI flag and support for local (.prise.yml) and global (layout.yml) config files.default,horizontal-split,vertical-split,dev) and variable expansion in commands.prise(1)andprise(5)manpages.