mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-24 20:45:56 +03:00
[GH-ISSUE #705] getPallete() can block until timeout #960
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#960
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @akronb on GitHub (Feb 18, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/705
Summary
getPalette()currently behaves as an all-or-timeout operation.In environments with partial OSC support, it can frequently resolve only after the full timeout (default 5000ms), which makes downstream apps feel frozen during startup when they wait for palette detection.
Why this is a problem
For apps using terminal colors for initial theming, startup gets coupled to terminal response timing.
If OSC responses are partial/incomplete, the app waits for timeout instead of getting early usable data (e.g. first 16 colors) and continuing.
@simonklee commented on GitHub (Feb 21, 2026):
I tried looking at it but not happy where it landed.
@MaxDillon commented on GitHub (Mar 2, 2026):
https://github.com/anomalyco/opencode/issues/7979#issuecomment-3981502176
Here is a specific instance of this happening in opencode-ghostty. The fix I suggested is to add a check before resetting the idle timer to see if the data fetched was useful e.g. if there was a new OSC_SPECIAL_RESPONSE/OSC4_RESPONSE regex match.
@akronb commented on GitHub (Mar 4, 2026):
@MaxDillon thanks a lot, that really helped!
@simonklee I’m not sure if I can close that issue, so I’ll leave it to you