Make herdr persistent by default.
Launching herdr now starts or reattaches to a background session
server. Clients can detach and reattach while panes and agent
processes keep running. Session mode now supports multi-client attach,
auto-detect startup, and a thin-client/headless-server split.
This also refactors the large app, ui, input, pane, config,
workspace, and persistence modules into smaller focused submodules,
while preserving behavior and colocating tests with the code they
exercise.
Upgrade notes:
- persistence mode is now the default
- in-app quit detaches the current client instead of stopping the server
- use `herdr server stop` to stop the background session
- use `--no-session` for the old single-process behavior
- default socket paths now live under the config directory
Phase 1: UTF-8 encoding support
- Modified encode_text_input() to handle characters without modifiers
- Added unit tests for Chinese character encoding
Phase 2: IME composition support
- Removed REPORT_ALL_KEYS_AS_ESCAPE_CODES keyboard flag
- Prevents keyboard protocol from interfering with IME
- Allows digit keys to be captured by input method for candidate selection
Fixes issue where IME input was not working properly.
Supports Chinese, Japanese, Korean, and other UTF-8 input methods.
Maintains compatibility with all existing features.
Tested:
- All 388 unit tests pass
- Chinese IME input with pinyin works correctly
- All navigate mode shortcuts work normally
- All terminal applications work normally