Open
Description
Is your feature request related to a problem? Please describe.
We make extensive use of pre-commit hooks to help the jupyterlab-git users we support catch newly-introduced errors at development time, when they're cheapest to fix. When a commit fails due to a failing pre-commit hook, the jupyterlab-git UI adds friction to the development experience in the following ways:
- the reason for the commit failure is buried behind an additional button click (and for some reason it also shows a spinner continuing to spin, which makes it seem like something is still happening, even though at this point it's just waiting for the user to click "Show" or close):

- After you click "Show", it's very hard to read the error output because line breaks are removed and a non-monospace font is used:

- When a pre-commit hook failed because it made changes to a staged file (e.g. a code formatter), jupyterlab-git currently does not make this obvious.
Describe the solution you'd like
- Combine the two dialogs into a single dialog, to save the user from having to perform the unnecessary extra click to see what went wrong
- Wrap the error output in a
<pre>
element so that line breaks are preserved and it's rendered in a monospace font, i.e. it's easier for humans to read:

- After a commit failure, jupyterlab-git should check if any of the staged files now have new unstaged changes, to detect when a pre-commit hook has made changes to a staged file, inform the user when this has happened, and offer to show a diff of the new changes.
Additional context
-
Python package version: 0.51.1
-
Extension version: 0.51.1
-
Git version: 2.43.0
-
Operating System and its version: Ubuntu 24.04.1 LTS