richardcase / richardcase/clowder

Invalidate cached terminal surfaces after daemon reconnection

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

Nobody has claimed this yet.

bug priority: high
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.