Skip to content

Fix hanging when undoing/committing on an uninitialized notebook#433

Merged
BillyZhaohengLi merged 7 commits intomainfrom
zl20/fix-uninitialized-undo
Mar 12, 2025
Merged

Fix hanging when undoing/committing on an uninitialized notebook#433
BillyZhaohengLi merged 7 commits intomainfrom
zl20/fix-uninitialized-undo

Conversation

@BillyZhaohengLi
Copy link
Copy Markdown
Collaborator

@BillyZhaohengLi BillyZhaohengLi commented Mar 6, 2025

Fix hanging when undoing/committing on an uninitialized notebook. The "Kishu is not initialized" error message shows up instead.

#414

@BillyZhaohengLi BillyZhaohengLi requested a review from mIXs222 March 6, 2025 22:00
Copy link
Copy Markdown
Collaborator

@mIXs222 mIXs222 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's catch the exceptions in jupyterlab_kishu::handlers::subp_kishu_* instead and compose JSON from the exception there. Some other exceptions in core lib could still hang the extension.

The Current idea makes the different commands asymmetric. Better fix at this layer would be making a decorator that catches any exception and wraps it in declared *Result data class. A lot of ugly try-excepts would go away

@BillyZhaohengLi BillyZhaohengLi force-pushed the zl20/fix-uninitialized-undo branch from 61137ea to cf1d902 Compare March 12, 2025 20:57
Copy link
Copy Markdown
Collaborator

@mIXs222 mIXs222 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BillyZhaohengLi BillyZhaohengLi enabled auto-merge (squash) March 12, 2025 23:00
@BillyZhaohengLi BillyZhaohengLi enabled auto-merge (squash) March 12, 2025 23:01
@BillyZhaohengLi BillyZhaohengLi merged commit 7cb668e into main Mar 12, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants