richardcase / richardcase/clowder
Invalidate cached terminal surfaces after daemon reconnection
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 14m
- Merged PRs (30d)
- 16
Description
Problem
SurfaceHost caches surfaces by pane ID indefinitely. A daemon restart respawns agents with the same IDs, but the cached surface still owns the old, exited clowder attach process. Reconnection therefore leaves the revived agent visually dead.
Evidence: https://github.com/richardcase/clowder/blob/b5492d5/macos/Sources/ClowderApp/SurfaceHost.swift#L28-L50
Reconnect path: https://github.com/richardcase/clowder/blob/b5492d5/macos/Sources/ClowderCore/AppModel.swift#L191-L210
Acceptance criteria
- Associate surfaces with a connection generation.
- Evict/recreate all affected surfaces after same-backend reconnect.
- Refresh selected split trees and add a reconnect test with unchanged pane IDs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SurfaceHost.swift lines 28-50 to understand surface caching, then trace the reconnect path in AppModel.swift lines 191-210. Associate surfaces with a connection generation, recreate affected surfaces after same-backend reconnect, refresh selected split trees, and add a reconnect test using unchanged pane IDs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, swift
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100