Skip to content

Conversation

@brichet
Copy link
Collaborator

@brichet brichet commented Jul 25, 2025

Follow up #259 (#259 (comment)) to dispose of the widget in side panel when a file is deleted.
Related to #239

Changes

  • Do not rely anymore on the event system of Jupyter to update the chat list in the side panel, but rather on the signal of the content manager.
  • dispose of the chat widget (in the side panel) if the file is deleted. This automatically removes the chat from from the restorer, which fixes Error opening chat: not a valid path #239.
  • avoid updating the file list every time the side panel is shown, only when it is attached.

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch brichet/jupyter-chat/handle_deleted_file_sidepanel

@brichet brichet added the bug Something isn't working label Jul 25, 2025
Copy link
Collaborator

@andrii-i andrii-i left a comment

Choose a reason for hiding this comment

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

Looks good and prevents JupyterLab from considering chat widgets created based on deleted chat files active and attempting to restore them resulting in a file not found error / warning. Thank you @brichet.

@andrii-i andrii-i merged commit 8a7005f into jupyterlab:main Jul 29, 2025
12 checks passed
@brichet brichet deleted the handle_deleted_file_sidepanel branch July 29, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error opening chat: not a valid path

2 participants