Skip to content

[Bug] UI Freeze (SBOD) on Input Focus — Likely Triggered by Low Performance Mode Switch #36

@SWSAmor

Description

@SWSAmor

Termdock Version | Termdock 版本

Latest (main branch) | 最新版 (主分支)

Platform | 平台

macOS (Apple Silicon - M1 ~ M5)

Bug Description | 錯誤描述

The app randomly freezes with a Spinning Beach Ball of Death (SBOD). The only way to recover is Force Quit — there is no crash dialog, no error log generated.
One confirmed trigger: clicking on the Workflow name input field when creating a new Workflow. However, the freeze occurs in other contexts as well (exact triggers not yet isolated).

Steps to Reproduce | 重現步驟

Open Termdock
Navigate to create a new Workflow
Click on the Workflow name input field
App freezes — SBOD appears, UI becomes unresponsive

Expected Behavior | 預期行為

Input field receives focus, user can type the workflow name.

Screenshots | 螢幕截圖

No response

Logs | 日誌

No error.log found. The only relevant entries from app.log — appearing at the time of the freeze:
json{"timestamp":"2026-03-24T13:30:09.221Z","level":"warn","message":"Performance issue detected: high_memory_usage","data":{"actualUsage":142518528,"threshold":104857600},"source":"main-process"}
{"timestamp":"2026-03-24T13:30:09.221Z","level":"info","message":"Enabling low performance mode","source":"main-process"}

Additional Context | 額外資訊

Hypothesis

The two log entries above appear immediately before/during the freeze. The app detects high memory usage (~136 MB actual vs. ~100 MB threshold) and switches to low performance mode. This mode switch may not be safe to execute concurrently with UI interactions (e.g., input focus events), potentially blocking the main/render thread.
Possible root causes:

Low performance mode switch is not fully async — blocks UI thread
Mode transition triggers a re-render or state reset that conflicts with an active input focus event
Memory pressure handling on Apple Silicon (M1) differs from Intel path

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions