Skip to main content

jupyterlab_core_patches_extension

GitHub Actions npm version PyPI version Total PyPI downloads JupyterLab 4 Brought To You By KOLOMOLO Donate PayPal

One JupyterLab 4 extension carrying twelve core patches for the file browser, file deletes, notebooks, Markdown, terminals and web tabs.

Every patch has one switch in Settings, all on by default. A switch change applies on the next page reload.

Replace the bundle and the discrete packages

pip uninstall stellars_jupyterlab_fixes
pip uninstall jupyterlab_change_ui_font_size_fix jupyterlab_file_browser_column_width_fix jupyterlab_jump_to_definition_fix jupyterlab_markdown_switch_tab_scrolling_fix jupyterlab_markdown_syntax_rendering_fix jupyterlab_markdown_viewer_toc_fix jupyterlab_other_file_type_menu_fix jupyterlab_restore_terminals_fix jupyterlab_server_proxy_launcher_fix jupyterlab_terminal_cpr_escape_fix

Features

Patch Problem How it solves it
UI font size alignment File browser icons keep a fixed width while the item text follows the UI font size, so the text is not centered against its icon Adds the jp-core-patches-change-ui-font-size body class and scopes CSS that sizes the icon from the UI font size and centers the text against it
File browser column width The file browser opens with collapsed columns after a saved 24 px layout or a sidebar resize Wraps DirListing.prototype._updateColumnSizes, _setColumnSize and _saveState to replace a stale cached width and raise negative sizes to the column minimums
File delete to trash A delete of a folder on another bind mount of the same disk copies it into the home trash, and the server answers no request until the copy ends Wraps AsyncFileContentsManager.delete_file to run the trash call in a worker thread and rename an item on another mount into that mount's .Trash-<uid> folder
Jump to definition Jump to definition in a Python notebook misses a package installed only in the kernel environment Re-registers lsp:jump-to-definition so a Python notebook runs a Jedi analysis in the kernel, guarded once per application
Markdown tab scrolling A Markdown view loses its scroll position after a tab switch while its images load Connects to ILabShell.currentChanged to record the scroll position and restore it every 100 ms until the images settle
Markdown syntax rendering Rendered Markdown fenced code blocks show no syntax colours until a CodeMirror editor opens Reads the rules from jupyterHighlightStyle.module.getRules() and injects them into one style element with a fixed id
Markdown viewer TOC A table-of-contents entry or in-document anchor link does not move the Markdown Viewer to its heading Wraps the renderer and viewer setFragment methods to resolve the anchor through data-jupyter-id and connects the TOC model to the heading elements
Other file type menu The context menu on a file with no registered type repeats the previous widget's commands, and a file type with no mime types breaks the LSP context menu Activates the right-clicked editor through a capture-phase contextmenu listener and gives every file type without mime types text/plain
Restore terminals After a server restart, a restored terminal starts at the server root instead of its last folder Reports open terminal names to the server, which stores each folder and re-creates the saved terminals before a browser connects
Server proxy launcher A server-proxy launcher in a custom category shows no icon Fetches /server-proxy/servers-info once and wraps app.commands.icon to answer server-proxy:open from an icon cache
Terminal CPR escape A terminal running a full-screen program shows a scrambled TUI, raw escape text, a blank screen at first show or the wrong width Wraps TermSocket.on_pty_read and TermSocket.open to filter response forms and strip replay queries, and steps the PTY once at a restored terminal's first show so the program repaints at the fitted size
Web tab scrolling An iframe tab shows the top of its document after a tab switch, a frame refresh or a page reload in a headed browser Records the frame scroll while it is visible, restores it on activation and frame load, and keeps it in sessionStorage for a page reload

Why one extension

This extension replaces the stellars_jupyterlab_fixes metapackage, which installed the same ten patches as ten discrete extensions. One extension loads one bundle in the browser instead of ten, and needs one release per JupyterLab change instead of ten.

%%{init: {'themeVariables': {'fontSize': '8px'}, 'themeCSS': '.cluster-label span, .cluster-label text, .edgeLabel span {color:var(--jp-ui-font-color1, var(--vscode-editor-foreground, var(--fgColor-default, #1f2937))); fill:var(--jp-ui-font-color1, var(--vscode-editor-foreground, var(--fgColor-default, #1f2937)))} @media (prefers-color-scheme: dark){.cluster-label span, .cluster-label text, .edgeLabel span {color:var(--jp-ui-font-color1, var(--vscode-editor-foreground, var(--fgColor-default, #e5e7eb))); fill:var(--jp-ui-font-color1, var(--vscode-editor-foreground, var(--fgColor-default, #e5e7eb)))}}'}}%%
flowchart LR
    subgraph OLD["Before - ten discrete extensions"]
        direction TB
        META[stellars_jupyterlab_fixes<br/>metapackage]:::infra
        TEN[10 discrete extensions<br/>10 labextension entries<br/>10 Extension Manager rows]:::ui
        SCH[3 settings schemas<br/>7 extensions read no settings]:::ui
        BUN[each its own federated bundle<br/>10 bundle loads per page]:::ui
        META --> TEN
        TEN --> SCH
        TEN --> BUN
    end
    subgraph NEW["After - one extension"]
        direction TB
        ONE[1 extension<br/>1 labextension entry<br/>1 settings schema<br/>1 Extension Manager row<br/>1 federated bundle<br/>1 release per JupyterLab change]:::ui
        PLUG[11 patch plugins<br/>1 switch each<br/>plugin ids under the package name]:::ui
        ONE --> PLUG
    end
    TEN --> ONE
    ONE --> GAIN[1 labextension bundle, 1 settings load<br/>and 1 release replace<br/>10 bundles, 3 settings loads and 10 releases]:::done
    classDef infra stroke:#6b7280,stroke-width:2px
    classDef ui stroke:#0284c7,stroke-width:2px
    classDef done stroke:#10b981,stroke-width:2px
    style OLD fill:none,stroke:#6b7280,stroke-width:3px
    style NEW fill:none,stroke:#6b7280,stroke-width:3px

The diagram shows ten discrete extensions consolidating into one extension: one labextension bundle and one settings load replace ten bundles and three settings loads, and one release per JupyterLab change replaces ten.

Installation

Requires JupyterLab 4.6 or later.

pip install jupyterlab_core_patches_extension

Uninstall

pip uninstall jupyterlab_core_patches_extension

Metadata

Release files for jupyterlab-core-patches-extension 1.0.31

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyterlab-core-patches-extension 1.0.31
File Size Uploaded Provenance Actions
jupyterlab_core_patches_extension-1.0.31.tar.gz 929.7 kB Without provenance Details for jupyterlab_core_patches_extension-1.0.31.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jupyterlab-core-patches-extension 1.0.31
File Interpreter ABI Platform Actions
jupyterlab_core_patches_extension-1.0.31-py3-none-any.whl Python 3 none any Details for jupyterlab_core_patches_extension-1.0.31-py3-none-any.whl

Total release size: 1.0 MB

Release files / jupyterlab_core_patches_extension-1.0.31.tar.gz

Download URL jupyterlab_core_patches_extension-1.0.31.tar.gz
Size 929.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d7e251150604973a2ace231a6be33ef3d441601d08d6c138efeefb82f308445a
BLAKE2b-256 checksum
How to use checksums
56c98d79cb9a95721b9bbeeed15df4c223bc045839987daa20e772430e70cbcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / jupyterlab_core_patches_extension-1.0.31-py3-none-any.whl

Download URL jupyterlab_core_patches_extension-1.0.31-py3-none-any.whl
Size 102.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a13f60c63f6e4a43a895ae56ab852854338b05c2a69e678153e2697c0d02d3ff
BLAKE2b-256 checksum
How to use checksums
4852c90e9c96fc8a53e7bb058e7e24c047f2508c245c426a832ec34fe77863e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for jupyterlab-core-patches-extension 1.0.31

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page