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

Terminal User Interface Issues When Running Windows Executable from PowerShell Desktop (Version 0.1.33) #18

Open
sevehub opened this issue Jul 7, 2024 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed windows

Comments

@sevehub
Copy link

sevehub commented Jul 7, 2024

When running the Windows exe directly from PowerShell desktop, I encounter issues with the terminal user interface. I'm unsure if this is related to Rust's Ratatui, Windows Terminal, PowerShell itself, or another factor. Interestingly, it works fine when executed from the command prompt. I'm using version 0.1.33.
serpl

@yassinebridi
Copy link
Owner

Thanks for the report.
There are some issues with windows but i'm not sure where is the problem exactly, i'm using a macos right now.
Once i get my hands on a windows computer i will fix these issues.

@yassinebridi yassinebridi added bug Something isn't working help wanted Extra attention is needed labels Jul 7, 2024
@sevehub
Copy link
Author

sevehub commented Jul 28, 2024

Hope this will help you in debugging your app. When running the precompiled Windows executable (version 0.3.1 - 2024-07-17), executing 'serp.exe -V' results in an incorrect configuration path: 'Config directory: C:\Users\user\AppData\Roaming\yassinebridi\serpl\config'.

I had a glance at the source code, but I couldn't locate the problem. This issue may also occur with precompiled binaries on other platforms.

@yassinebridi
Copy link
Owner

Thanks, i didn't test the config on windows, the path is weird, but this shouldn't have been produced by a wrong config file, since the config file isn't necessary to run the application, the default config will be used.

@sevehub
Copy link
Author

sevehub commented Jul 29, 2024

On Windows, what is the expected directory where the app sources its configuration file? %appdata%\serpl\config ?

@yassinebridi
Copy link
Owner

yassinebridi commented Jul 30, 2024

I'm using this package to manage config files:
https://github.com/lunacookies/etcetera

From their documentation, it seems that that the config should be inside ~\AppData\Roaming\serpl\config.json

Though from what you have posted earlier:

C:\Users\user\AppData\Roaming\yassinebridi\serpl\config

This might be the correct path too, windows might use org name(yassinebridi).
I will try to introduce an argument to serpl to supply your config file path.

@sevehub
Copy link
Author

sevehub commented Jul 30, 2024

I will try to introduce an argument to serpl to supply your config file path.

This may be unnecessary if the application can correctly source the config file from ~\AppData\Roaming\serpl\config.json

@Eragra3
Copy link

Eragra3 commented Aug 20, 2024

Seems like RipGrep returns windows line ends \r\n and your TUI library doesn't like it.
If I remove it (.replace("\\r", "") here https://github.com/yassinebridi/serpl/blob/2a195169e14d3a871f31cac89bfef68c3524c048/src/redux/thunk/process_search.rs#L149C68-L149C72 it seems to work fine.

There seems to be another call here https://github.com/yassinebridi/serpl/blob/2a195169e14d3a871f31cac89bfef68c3524c048/src/redux/thunk/process_search.rs#L69C58-L69C64 but I haven't investigated very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed windows
Projects
None yet
Development

No branches or pull requests

3 participants