richardcase / richardcase/clowder

Clean up companion panes when split insertion races with close

Open
#138 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority: medium rust
Dominant language
Rust
Stars
0
Forks
0
Avg merge
1h 14m
Merged PRs (30d)
16

Description

Problem

split_pane spawns a companion, ignores a failed split_leaf insertion, then registers and returns the companion anyway. If the target closes concurrently, the shell is absent from the tree but remains alive.

Evidence: https://github.com/richardcase/clowder/blob/b5492d5/crates/clowder-daemon/src/server.rs#L1063-L1104

Acceptance criteria

  • Check the insertion result.
  • Kill/unregister the companion and return an error when insertion fails.
  • Add a concurrent split/close regression test.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in crates/clowder-daemon/src/server.rs around lines 1063-1104 and trace split_pane, split_leaf, and companion registration. Reproduce the concurrent split/close case, then add a regression test showing that failed insertion kills and unregisters the companion and returns an error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.