Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interaction mode flicker issue (交互模式闪烁问题) #107

Open
5 tasks done
fxzer opened this issue Apr 11, 2024 · 2 comments
Open
5 tasks done

Interaction mode flicker issue (交互模式闪烁问题) #107

fxzer opened this issue Apr 11, 2024 · 2 comments
Labels
bug Something isn't working pr welcome

Comments

@fxzer
Copy link

fxzer commented Apr 11, 2024

Describe the bug

执行 taze -rI major -f ,上下移动进行选择时出现终端闪烁问题
There is a terminal flashing issue when executing taze -rI major -f while moving up and down for selection

VSCode Terminal testing

flash-bug

Warp 测试(使用 Warp 执行也是一样的,应该不是命令行工具的问题)

Warp testing (using Warp to execute is also the same, it should not be a problem with command-line tools)
warp-test


prompts (2.4.2)Demo测试(没有出现闪烁现象,应该不是 promps 的 bug)

prompts (2.4.2) Demo test (no flickering phenomenon, it should not be a bug in prompts)

test

Reproduction

taze -rI major -f

System Info

node       v18.18.2
taze       0.13.3
prompts    2.4.2
zsh 5.9    (x86_64-apple-darwin23.0)

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@antfu
Copy link
Member

antfu commented Apr 11, 2024

PR welcome :)

@antfu antfu added bug Something isn't working pr welcome labels Apr 11, 2024
@SukkaW
Copy link
Contributor

SukkaW commented Apr 13, 2024

I have successfully reproduced the issue on a significantly large repository (vercel/next.js with 439 devDeps).

I suspect that the issue is caused by having prompts rendered an extensive amount of text. Each time it re-renders (triggered by a keyboard input), it repaints the entire screen from scratch. This is evident in the screen recording where the cursor consistently jumps back to the initial position.

I guess the only solution is either render a small UI, or make prompts faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pr welcome
Projects
None yet
Development

No branches or pull requests

3 participants