fix(coding-agent): prevented post-disposal state updates and callbacks

- Prevented updating the default branch and triggering callbacks after the component is disposed.
This commit is contained in:
can1357
2026-06-18 01:57:28 +02:00
parent 8749241c11
commit 66bbd004fc
@@ -395,7 +395,7 @@ export class StatusLineComponent implements Component {
this.#defaultBranch = "main";
(async () => {
const resolved = await git.branch.default(getProjectDir());
if (this.#disposed) return;
if (resolved) {
this.#defaultBranch = resolved;
if (this.#onBranchChange) {