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

first impression #5

Open
joyously opened this issue Dec 20, 2024 · 4 comments
Open

first impression #5

joyously opened this issue Dec 20, 2024 · 4 comments

Comments

@joyously
Copy link

My first run of this, I had these thoughts.

  • I didn't specify a repo, and there is no repo where I ran the program. I get an error that there is no repo, but I am left in the program, which has no visible commands for making a repo or changing directories. I'm thinking it should exit.
  • My terminal window is around 80 characters wide, but the command list is about 132 wide. The last few commands are not visible and there is no scroll bar. The quit command is at the end (invisible unless I adjust the window), so I think it should either be first or the command list should wrap around or be on two lines by default.
  • When I do a command like "git" or "rebase" or "bookmark", since I don't have a repo, I don't know what to enter. The command list doesn't show Esc, but I tried that and it worked.
  • With no repo, these commands result in a Caught panic: "new", "diff", "edit", "diff edit", "description", "split", "bookmark move", "bookmark set". This is the majority of commands, so I again think the program should simply exit when there is no repo.

When I run it with a repo, the default revset is so limited that I can't determine what I'm looking at. There is no cursor that I can use to go edit the revset, so I type L and it erases the default, prompting for a revset. I don't want any, so I hit Enter, but that simply uses the default again. I really haven't learned the revset language, but I don't think I should have to.
I didn't get it to list a bunch of commits like in the README examples, but I don't want to try so hard. I do wonder if a novice can bork a shared repo, simply by poking around it with this tool.

@Adda0
Copy link
Contributor

Adda0 commented Dec 20, 2024

I like the approach of Lazygit which shows you a list of previously opened Git repos when run from a non-repo directory. However, this requires additional logic and history which jjui does not have currently, so simply exiting seems like an appropriate behaviour, providing a sufficient error message, of course.

@idursun
Copy link
Owner

idursun commented Dec 20, 2024

Thanks for the detailed write-up!

I didn't specify a repo, and there is no repo where I ran the program. I get an error that there is no repo, but I am left in the program, which has no visible commands for making a repo or changing directories. I'm thinking it should exit.

imply exiting seems like an appropriate behaviour, providing a sufficient error message, of course.

I totally agree. To be honest, it didn't even occur to me to run jjui in a directory that is not a jj repository. I always thought it is to complement jj and save the user from typing mostly used commands into the terminal. It's only useful when jj can be used. It should exit if the directory is not a jj repository.

My terminal window is around 80 characters wide, but the command list is about 132 wide. The last few commands are not visible and there is no scroll bar. The quit command is at the end (invisible unless I adjust the window), so I think it should either be first or the command list should wrap around or be on two lines by default.

I agree with this one too. That command help line is only going to get bigger. I have some ideas around removing some of those shortcuts by either showing them only when they can be used, and/or allowing the user selecting different parts of the commit so the help appears around those areas (e.g. bookmarks, description, tags, etc)

With no repo, these commands result in a Caught panic: "new", "diff", "edit", "diff edit", "description", "split", "bookmark move", "bookmark set". This is the majority of commands, so I again think the program should simply exit when there is no repo.

Agreed. Also, I need to show the error message in the view because sometimes those commands do fail even if there is a repo (e.g. immutable commits cannot be edited, bookmarks cannot be moved backwards, etc)

@idursun
Copy link
Owner

idursun commented Dec 20, 2024

When I run it with a repo, the default revset is so limited that I can't determine what I'm looking at. There is no cursor that I can use to go edit the revset, so I type L and it erases the default, prompting for a revset. I don't want any, so I hit Enter, but that simply uses the default again.

The displayed revset is actually the default revset configured in jj. jjui is retrieving it using jj config get revsets.log command. An empty revset will always defaults to whatever is configured in jj, which is the same behaviour as jj.

@joyously
Copy link
Author

The displayed revset is actually the default revset configured in jj. jjui is retrieving it using jj config get revsets.log command. An empty revset will always defaults to whatever is configured in jj, which is the same behaviour as jj.

That makes sense, however, maybe it's a better default for CLI than for TUI. Maybe I was spoiled by trying GG, which shows that same default revset at the top, but shows much more of the graph for context.
I think it might be a bad default for jj, because I haven't worked on code, yet it made a new empty commit on top, so it only shows me that empty commit and its parent. This is useless for a novice, who doesn't know revsets or what is in the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants