Skip to content

useAutomationChat missing onUnmounted cleanup — watcher and async writes leak after teardown #1192

@Chris0Jeky

Description

@Chris0Jeky

Summary

useAutomationChat registers a watch and fires async calls in onMounted but has no onUnmounted/onScopeDispose block. The watch stop handle is never stored or called. Async continuations can write to reactive state after component unmount.

Location

frontend/taskdeck-web/src/composables/useAutomationChat.ts, lines 331-344

Suggested Fix

Store the watch stop handle, call it in onScopeDispose, and add a mounted guard variable for async continuations.

Source

Found during codebase health analysis (2026-06-06).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrontend

    Projects

    Status
    Review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions