IP: Have a way to see previously closed flash notifications.
This is subject to it making sense to maintainers and it being something of value for jjui users. Please vote 👍 / 👎 .
from #240 comment about making the output of commands sticky, and later about instead of making non-errored output sticky, have a way to see output of already closed flash messages.
What are you planning to implement?
Show a window with the list (latest first) commands run with their respective output.
Proposed Approach
- How will this feature work? For example, describe how the user would interact with jjui using this new feature.
A new shortcut will open our center stacked view with a list of previously closed flash messages.
Each "row" has a success or error emoji, followed by exit status (int), the timestamp and command that was run colored either green or red according to error status. Followed by the lines of the command output.
You can move as usual up or down using j/k up/down and close using esc. No other key is handled during this view.
shortcut proposal: F (flash history). (current lowercase f is ace jump)
- How will this integrate with or impact existing features?
We will be able to show the output of all commands run by jjui on behalf of the user, except for those of sh exec or jj exec since these are given complete IO control and jjui does not intercepts their output in any way.
Implementation Details
Output of commands is not stored in disk, and is lost when jjui terminates.
Testing Strategy How do you plan to test this implementation?
- Manual testing approach
Alternatives Considered What other implementation approaches have you considered? Why did you choose this particular approach?
An alternative is not to have another window for flash messages but be able to see the output at oplog (not sure about this)
Breaking Changes N/A
Questions for Discussion Do you would like for jjui to have this feature?
This is a great proposal @vic
Thanks for writing this up.
What you describe is very similar to my long-term idea of implementing a feature named what happened. That turned into flash messages.
My only concern at the moment is that the flash messages haven’t been released yet and it is a little bit early for collecting feedback. Do you mind if we keep this around for a little bit longer so that the feature is released and we hear what the users think? The reason why I am suggesting this is that every time I make a release, I get amazed by how people use it in unexpected ways.
Do you mind if we keep this around for a little bit longer so that the feature is released and we hear what the users think?
Yep, lets wait and see if people find it useful.
I get amazed by how people use it in unexpected ways.
haha :)
- It could be cheaper to just look at the jjui logs - containing the jj commands and outputs in DEBUG mode - than creating a new UI interface.
- As for the "flash" windows, having each program reimplement notifications doesn't scale IMO. For instance I would rather have it as a system notification (I use https://github.com/ErikReider/SwayNotificationCenter which keeps an history of the notifications).
This could be achieved via a
notification_commandin config.
My 2 points don't exactly answer the issue but I thought I would share a different point of view
Re. just using system notifications, some of us weirdos use operating systems that don't have history for those :) At least, not after dismissing, and I for one can imagine situations where I'd like to go back to see what it actually was that jj said. So, as a still quite new user I'd really like to see this feature, as described in the issue.