fix: resolve UTF-8 boundary panics in session resume#113
Merged
yishuiliunian merged 3 commits intomainfrom Apr 16, 2026
Merged
Conversation
…n resume Byte-index slicing on multi-byte UTF-8 strings caused panics when resuming sessions containing CJK tool inputs. - projection.rs: summarize_input() now walks back to valid char boundary - bg_monitor.rs: truncate_cmd() uses is_char_boundary + saturating_sub - multiprocess.rs: surface resume failures to user instead of silent no-op
yishuiliunian
added a commit
that referenced
this pull request
Apr 16, 2026
…113) Structured tasks (TaskCreate/TaskUpdate) are now displayed in a dedicated panel alongside Agents and BgTasks, with a unified PanelProvider registry that drives navigation, rendering, and lifecycle cleanup. Event pipeline: TaskStore → TaskBridge → TasksChanged → SessionState → TUI. Panel system: PanelProvider trait + PanelRegistry replaces per-kind dispatch. Cleanup: session state auto-evicts finished agents, completed bg_tasks, and completed tasks to prevent unbounded growth in long-running sessions.
yishuiliunian
added a commit
that referenced
this pull request
Apr 16, 2026
…117) * feat(tui): add Tasks panel with PanelProvider registry architecture (#113) Structured tasks (TaskCreate/TaskUpdate) are now displayed in a dedicated panel alongside Agents and BgTasks, with a unified PanelProvider registry that drives navigation, rendering, and lifecycle cleanup. Event pipeline: TaskStore → TaskBridge → TasksChanged → SessionState → TUI. Panel system: PanelProvider trait + PanelRegistry replaces per-kind dispatch. Cleanup: session state auto-evicts finished agents, completed bg_tasks, and completed tasks to prevent unbounded growth in long-running sessions. * fix: rustfmt formatting for all new and modified files
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
byte index 57 is not a char boundary)truncate_cmdChanges
crates/loopal-protocol/src/projection.rs—summarize_input()usesis_char_boundaryloopcrates/tools/process/bash/src/bg_monitor.rs—truncate_cmd()safe truncation + 6 testssrc/bootstrap/multiprocess.rs—matchwith error message on resume failurecrates/loopal-protocol/tests/suite/projection_edge_test.rs— 2 regression tests with precondition assertionsTest plan
bazel test //crates/loopal-protocol:loopal-protocol_test— passesbazel test //crates/tools/process/bash/...— passesbazel build //... --config=clippy— zero warnings