-
-
Notifications
You must be signed in to change notification settings - Fork 730
Interactive Inspector #2319
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
Interactive Inspector #2319
Conversation
a5ce1f2 to
e7159ed
Compare
|
Generally all good, thank you! Ultra-compact works nicely. However the inspector might need some adjusting. I run compact mode all the time (as do some others), and it will likely become the default in the future. In compact mode, the inspector looks like this regardless of size I think it would make sense to continue to show the stats/etc if the terminal is large enough, but I do really like the scrolling through history/session. Do you think you'd be able to split the inspector changes into a separate PR? Other than those commits, I'm happy to merge this as-is |
|
Yep, sure! Good point - thinking about your comment, I realise I haven't properly thought about that stylistically-compact vs limited-space difference, so could I suggest I do two new PRs, if that makes sense:
|
|
That sounds good to me! |
e7159ed to
64869b3
Compare
|
I have split out #2357 as requested, which this PR is now stacked on. It has been updated to:
The intention (as above) would be to open a comment/forum-post to work out behaviour for a new PR for the inspector in (non-ultra-) compact mode, but this PR no longer has any change to the inspector except in ultracompact mode. |
64869b3 to
33c6f53
Compare
33c6f53 to
55f5da5
Compare
229d5e9 to
d5cf9aa
Compare
|
Updated with a test - this turned out to be the hardest bit of the whole process, as the only sensible way I could see of testing a layout switch like this was to compare the output with However, this forced me to take the PR beyond the The downside is that I needed to add a new in-built theme called There is not much to put in the docs, but I have updated that PR too, so marking this ready-for-test. |
|
As a side-note, to make boldness a property the theming can control, it also adds |
|
This pull request has been mentioned on Atuin Community. There might be relevant details there: https://forum.atuin.sh/t/feedback-playing-with-inspector/218/6 |
a0176a5 to
608becb
Compare
|
Rebased, as #2657 came up again. Wondering if this could be further split to make it more mergeable, or is it OK as-is? As a side-note, I could see the inspector compact view going a different direction in future, so not hugely wedded to this implementation, but it seems like a reasonable stepping stone, at least? |
7310c0d to
b530df4
Compare
|
Actually, one way to split this up would be to add the interactivity for the inspector in one PR, and then the ultracompact inspector in a second 🤔 |
b530df4 to
df5de10
Compare
|
Just to confirm, the navigation works in both ultracompact and normal modes. There is no special "compact" mode so it is always ultracompact (if below Screencast.From.2025-09-21.13-36-15.mp4 |
df5de10 to
fd6efae
Compare
…is constructed as expected
…t '(none)' to ensure it is used
5a88cfd to
5c21f71
Compare
|
(Rebased on main) |
ellie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok! super happy with this, thank you! really appreciate your work and patience here <3
|
A little comment: I had to quickly review this, and I think there's currently no way to reach |
|
Thanks @ltrzesniewski - I will take another look, it might be something I missed while rebasing! |

What does this PR do?
Adds simple navigation to the inspector, to explore a session starting from a single command. This creates a new user flow, where a user can find a history entry in the interactive view (in, say, Global mode), and hit Ctrl+o to navigate back and forward through that command's session.
IMAGINED USE-CASE: I remembered that I did a sequence of git steps but I can't remember the order and forgot to document it. I remember that
reflogwas involved and want to see the actual sequence, and only those commands.IMAGINED USE-CASE: I used a curl command to get my IP address for greenlisting before I connected to the bastion server
abc.xyzover SSH - I could easily find the SSH command with abc.xyz, and go back one step in the session, but without this change, scrolling through all my curl commands ever run to find a forgotten URL/domain would be too much work.Since this gives the inspector tab a broader purpose than viewing analytics, it needs to function even when there are not enough screen rows for charts -- hence, this PR also introduces an ultracompact mode for the inspector that just shows the neighbouring history commands (as simple scrolling three-entry list, with no panes) if there are fewer than
auto_hide_heightrows (default: 8). Otherwise, the inspector behaves as normal, except that Up / Down will change the focused command by navigating through the session. That means there is no "compact" mode for the inspector - when the interactive search is compact (but not ultracompact), the inspector shows its usual chart view.The UX for this could be improved - to keep this PR as lean as it realistically can be, I have tried to keep the flow very minimal, but a follow-up PR could introduce some tooltips, nicer ultracompact formatting, etc.
A minor QoL improvement that comes with this - since I had to deal with bold text and would otherwise have need a theming exception, I took the opportunity to ensure the theme engine sets styles completely (so a theme can have bold), not just colours. To limit scope creep, I do not add TOML syntax so (for now) you can only customize colours from config files, but it means that default-bold text (etc.) can now use the theming engine if the code-defined default Meaning is bolded.
Key changes:
It also (see comments below):
compactintocompactness, an enum (to better standardize across inspector/interactive)(none)theme to the theming to enable output testing without stylingadditional tests, although keen for input on how best to do theseone functional test, as a starting pointdocumentationminor doc changes only, as I am not sure there is much to sayWas stacked on #2357, which is now in
mainChecks