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

Cannot get out of help menu #62

Closed
Askath opened this issue Sep 9, 2024 · 16 comments
Closed

Cannot get out of help menu #62

Askath opened this issue Sep 9, 2024 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@Askath
Copy link

Askath commented Sep 9, 2024

I just build new the current version 2.1 and noticed that after pressing '?' and seeing the keybindings, I cannot get back to the main screen.

Not sure if there is a keybind I am missing or if I messed something else up.

image
@siddhantac
Copy link
Owner

siddhantac commented Sep 9, 2024

It should go back to the default view when you press ? again. Can you try that?

@Askath
Copy link
Author

Askath commented Sep 9, 2024

It should go back to the default view when you press ? again. Can you try that?

Does not seem to work sadly. Tried with both macos Stock Terminal and iTerm.

@Askath
Copy link
Author

Askath commented Sep 9, 2024

Looks like other keys like 'q' or 'ctrl+c" also dont work as if the whole tool is unresponsive

@siddhantac
Copy link
Owner

siddhantac commented Sep 9, 2024

Interesting. Thanks for reporting it. Obviously "it works for me", lol.

If you'd be willing to help with this issue, I can add some more debugging information so that you can run it in debug mode to collect more data. 🙂

@Askath
Copy link
Author

Askath commented Sep 9, 2024

Interesting. Thanks for reporting it. Obviously "it works for me", lol.

If you'd be willing to help with this issue, I can add some more debugging information so that you can run it in debug mode to collect more data. 🙂

sure! I'd be happy to help. Love this tool, already makes life a lot easier. I am just not as proficient in go/bubbletea.

@siddhantac
Copy link
Owner

sure! I'd be happy to help. Love this tool, already makes life a lot easier.

Thank you! Glad it's helping you.

I am just not as proficient in go/bubbletea.

That's fine! I would just need you to send me the log file later.

I'll add some targeted debug logs. Give me a few days, I'll let you know once it's ready.

@Askath
Copy link
Author

Askath commented Sep 9, 2024

sure! I'd be happy to help. Love this tool, already makes life a lot easier.

Thank you! Glad it's helping you.

I am just not as proficient in go/bubbletea.

That's fine! I would just need you to send me the log file later.

I'll add some targeted debug logs. Give me a few days, I'll let you know once it's ready.

No problem! Thanks for your work

@siddhantac siddhantac self-assigned this Sep 9, 2024
@siddhantac siddhantac added the bug Something isn't working label Sep 9, 2024
@siddhantac
Copy link
Owner

siddhantac commented Sep 11, 2024

Hi @Askath, could you please pull the latest commit from this branch: https://github.com/siddhantac/puffin/tree/better-debug

You can run the debug version in 2 ways:

  1. make debug - this is the simplest. It will run puffin in debug mode and it will use the config.debug.json file (which uses test journal data)
  2. make build && ./puffin -debug -cfg config.debug.json this will build the binary and then run it in debug mode.

Both methods are equivalent, and it doesn't really matter which one you pick :)

The debug log will be written to puffin.log. Once you have run the program, please paste the output of the file here. I have tried my best to not log any financial data, but please do verify that there is no financial data before submitting the file. You may also use the test journal data in the repo.

Once the program is running, please press the help key (?) at least twice so that we can see what's happening after the help view is displayed. You can also press a few other keys to see if they get logged.

And finally, please let me know which platform you are running it on!

@Askath
Copy link
Author

Askath commented Sep 11, 2024

Will do when I am done with work later this day

@Askath
Copy link
Author

Askath commented Sep 11, 2024

Okay here is the log, had some more time. I am using an mac pro m3, using Terminal.app and iterm emulator.
Shell I am using is fish but I also tried it in bash.

debug 2024/09/11 09:39:07 init puffin v2.1.0
debug 2024/09/11 09:39:08 root: showing main view
debug 2024/09/11 09:39:08 root: msg: tea.WindowSizeMsg, {231 60}
debug 2024/09/11 09:39:08 register(0): tableSize: w=216, h=54
debug 2024/09/11 09:39:09 root: windowSizeMsg: full: h=60, w=231. mainView: h=58, w=219
debug 2024/09/11 09:39:09 root: showing main view
debug 2024/09/11 09:39:09 root: msg: tea.KeyMsg, alt+]
debug 2024/09/11 09:39:09 root: showing main view
debug 2024/09/11 09:39:09 root: msg: tea.sequenceMsg, [0x100416400 0x10041f520]
debug 2024/09/11 09:39:09 root: showing main view
debug 2024/09/11 09:39:09 root: msg: spinner.TickMsg, {2024-09-11 09:39:09.636434 +0200 CEST m=+1.808768834 0 1}
debug 2024/09/11 09:39:09 root: showing main view
debug 2024/09/11 09:39:09 root: msg: tea.enterAltScreenMsg, {}
debug 2024/09/11 09:39:09 root: showing main view
debug 2024/09/11 09:39:09 root: msg: tea.KeyMsg, 11;rgb:0000/0000/0000
debug 2024/09/11 09:39:09 root: showing main view
debug 2024/09/11 09:39:09 root: msg: ui.modelLoading, {}
debug 2024/09/11 09:39:09 register(0): unready
debug 2024/09/11 09:39:09 root: showing main view
debug 2024/09/11 09:39:09 root: msg: tea.KeyMsg, alt+
debug 2024/09/11 09:39:09 root: showing main view
debug 2024/09/11 09:39:09 cmd: [hledger register -f data/hledger.journal --depth=3 date:2021.. -O csv]
debug 2024/09/11 09:39:09 root: msg: spinner.TickMsg, {2024-09-11 09:39:09.780337184 +0200 CEST m=+1.952670685 1 1}
debug 2024/09/11 09:39:09 root: showing main view
debug 2024/09/11 09:39:09 root: msg: ui.content
debug 2024/09/11 09:39:09 root: showing main view
debug 2024/09/11 09:39:09 root: msg: spinner.TickMsg, {2024-09-11 09:39:09.924404517 +0200 CEST m=+2.096737060 2 1}
debug 2024/09/11 09:39:09 root: showing main view
debug 2024/09/11 09:39:13 root: msg: tea.KeyMsg, ?
debug 2024/09/11 09:39:13 help: true
debug 2024/09/11 09:39:13 root: showing help
debug 2024/09/11 09:39:24 root: msg: tea.KeyMsg, 11;rgb:0000/0000/0000
debug 2024/09/11 09:39:24 root: showing help
debug 2024/09/11 09:39:27 root: msg: tea.KeyMsg, alt+
debug 2024/09/11 09:39:27 root: showing help
debug 2024/09/11 09:39:29 root: msg: tea.KeyMsg, ]11;rgb:0000/0000/0000
debug 2024/09/11 09:39:29 root: showing help
debug 2024/09/11 09:39:31 root: msg: tea.KeyMsg, alt+
debug 2024/09/11 09:39:31 root: showing help
debug 2024/09/11 09:39:35 root: msg: tea.KeyMsg, ]11;rgb:0000/0000/0000
debug 2024/09/11 09:39:35 root: showing help
debug 2024/09/11 09:39:42 root: msg: tea.WindowSizeMsg, {231 59}
debug 2024/09/11 09:39:42 register(0): tableSize: w=216, h=53
debug 2024/09/11 09:39:45 root: windowSizeMsg: full: h=59, w=231. mainView: h=57, w=219
debug 2024/09/11 09:39:45 root: showing help
debug 2024/09/11 09:39:53 root: msg: tea.KeyMsg, alt+
debug 2024/09/11 09:39:53 root: showing help
debug 2024/09/11 09:40:01 root: msg: tea.sequenceMsg, [0x100416400 0x10041f520]
debug 2024/09/11 09:40:01 root: showing help
debug 2024/09/11 09:40:08 root: msg: tea.KeyMsg, ]11;rgb:0000/0000/0000
debug 2024/09/11 09:40:08 root: showing help
debug 2024/09/11 09:40:16 root: msg: ui.modelLoading, {}
debug 2024/09/11 09:40:16 register(0): unready
debug 2024/09/11 09:40:16 root: showing help
debug 2024/09/11 09:40:16 cmd: [hledger register -f data/hledger.journal --depth=3 date:2021.. -O csv]
debug 2024/09/11 09:40:23 root: msg: tea.KeyMsg, alt+
debug 2024/09/11 09:40:23 root: showing help
debug 2024/09/11 09:40:36 root: msg: ui.content
debug 2024/09/11 09:40:36 root: showing help
debug 2024/09/11 09:40:43 root: msg: tea.KeyMsg, 000/0000/0000
debug 2024/09/11 09:40:43 root: showing help

@siddhantac
Copy link
Owner

There's some interesting stuff in there. Are you using some keymap modifier software or a specialty keyboard?

  1. There's a bunch of root: msg: tea.KeyMsg, alt+ . Do you know which key that represents?
  2. Near the beginning there's a root: msg: tea.KeyMsg, alt+] , again what does that represent? Is it ⌥ + ] ?
  3. This log is when the help was first shown 2024/09/11 09:39:13 root: msg: tea.KeyMsg, ?. Which makes sense. But after that there are no more ? keypresses.
  4. There's also many keypresses with ]11;rgb or a string of 0s which I can't explain.

@Askath
Copy link
Author

Askath commented Sep 11, 2024

yeah I noticed that. the alt+ is alt+ is what happens when I press '?' in the help menu I think.

This "debug 2024/09/11 09:40:43 root: msg: tea.KeyMsg, 000/0000/0000" could be me pressing cmd+t as I opened a new tab in the terminal to close puffin.

Let me try it with a different keyboard

edit: I am using the glove 80, but tried it on the mac keyboard aswell and same issue

@Askath
Copy link
Author

Askath commented Sep 11, 2024

thats the log when using the normal mac keyboard. I am more confused than before. I only open puffin, and pressed ? twice.

debug 2024/09/11 10:33:08 init puffin v2.1.0
debug 2024/09/11 10:33:08 root: showing main view
debug 2024/09/11 10:33:08 root: msg: spinner.TickMsg, {2024-09-11 10:33:08.693842 +0200 CEST m=+0.014568168 0 1}
debug 2024/09/11 10:33:08 root: showing main view
debug 2024/09/11 10:33:08 root: msg: tea.WindowSizeMsg, {283 75}
debug 2024/09/11 10:33:08 register(0): tableSize: w=268, h=69
debug 2024/09/11 10:33:13 root: windowSizeMsg: full: h=75, w=283. mainView: h=73, w=271
debug 2024/09/11 10:33:13 root: showing main view
debug 2024/09/11 10:33:13 root: msg: tea.enterAltScreenMsg, {}
debug 2024/09/11 10:33:13 root: showing main view
debug 2024/09/11 10:33:13 root: msg: tea.KeyMsg, 11;rgb:1e1e/1e1e/1e1e
debug 2024/09/11 10:33:13 root: showing main view
debug 2024/09/11 10:33:13 root: msg: spinner.TickMsg, {2024-09-11 10:33:08.836775725 +0200 CEST m=+0.157500851 1 1}
debug 2024/09/11 10:33:13 root: showing main view
debug 2024/09/11 10:33:13 root: msg: tea.sequenceMsg, [0x102da2400 0x102dab520]
debug 2024/09/11 10:33:13 root: showing main view
debug 2024/09/11 10:33:13 root: msg: tea.KeyMsg, ctrl+g
debug 2024/09/11 10:33:13 root: showing main view
debug 2024/09/11 10:33:13 root: msg: ui.modelLoading, {}
debug 2024/09/11 10:33:13 register(0): unready
debug 2024/09/11 10:33:13 root: showing main view
debug 2024/09/11 10:33:13 cmd: [hledger register -f data/hledger.journal --depth=3 date:2021.. -O csv]
debug 2024/09/11 10:33:13 root: msg: ui.content
debug 2024/09/11 10:33:13 root: showing main view
debug 2024/09/11 10:33:13 root: msg: spinner.TickMsg, {2024-09-11 10:33:13.857200059 +0200 CEST m=+5.177911060 2 1}
debug 2024/09/11 10:33:13 root: showing main view
debug 2024/09/11 10:33:17 root: msg: tea.KeyMsg, ?
debug 2024/09/11 10:33:17 help: true
debug 2024/09/11 10:33:17 root: showing help
debug 2024/09/11 10:33:17 root: msg: tea.KeyMsg, ]11;rgb:1e1e/1e1e/1e1e
debug 2024/09/11 10:33:17 root: showing help
debug 2024/09/11 10:33:17 root: msg: tea.KeyMsg, ctrl+g
debug 2024/09/11 10:33:17 root: showing help
debug 2024/09/11 10:33:17 root: msg: tea.KeyMsg, ]11;rgb:1e1e/1e1e/1e1e
debug 2024/09/11 10:33:17 root: showing help
debug 2024/09/11 10:33:17 root: msg: tea.KeyMsg, ctrl+g
debug 2024/09/11 10:33:17 root: showing help
debug 2024/09/11 10:33:17 root: msg: tea.KeyMsg, ]11;rgb:1e1e/1e1e/1e1e
debug 2024/09/11 10:33:17 root: showing help
debug 2024/09/11 10:33:17 root: msg: tea.KeyMsg, ctrl+g
debug 2024/09/11 10:33:17 root: showing help
debug 2024/09/11 10:33:17 root: msg: tea.KeyMsg, ]11;rgb:1e1e/1e1e/1e1e
debug 2024/09/11 10:33:17 root: showing help
debug 2024/09/11 10:33:17 root: msg: tea.KeyMsg, ctrl+g
debug 2024/09/11 10:33:17 root: showing help
debug 2024/09/11 10:33:24 root: msg: tea.KeyMsg, 1;rgb:1e1e/1e1e/1e1e
debug 2024/09/11 10:33:24 root: showing help
debug 2024/09/11 10:33:24 root: msg: tea.KeyMsg, ctrl+g
debug 2024/09/11 10:33:24 root: showing help

@Askath
Copy link
Author

Askath commented Sep 11, 2024

found this issue in bubbletea charmbracelet/bubbletea#1126
might have something to do with it?

Seems like the weird b:1e1e/1e1e/1e1e strings are a known problem in the current version of bubbletea.
There is also a longer Thread in the discord that talks about it linked in this issue.
charmbracelet/bubbles#567

@Askath
Copy link
Author

Askath commented Sep 11, 2024

Lowered the bubbletea version to 26.2 to try it out, and now puffin works perfect again :)

@siddhantac
Copy link
Owner

Thanks for investigating! I'll update the go.mod accordingly. :)

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

No branches or pull requests

2 participants