npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

jupyterlab_server_proxy_launcher_fix

v1.0.4

Published

Fix to the issue that when launchers configured in the jupyter config file with svg icons are in a different category than notebooks, icons are not displayed

Readme

jupyterlab_server_proxy_launcher_fix

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

JupyterLab extension that fixes SVG icon display for jupyter-server-proxy launchers when placed in custom categories other than "Notebook" or "Console".

[!WARNING] This extension is a temporary fix for jupyterhub/jupyter-server-proxy. Once the upstream project implements proper icon support for custom launcher categories, this extension will be deprecated. We look forward to our own obsolescence.

The Problem

When configuring jupyter-server-proxy launchers with custom categories (e.g., "Services", "Tools"), SVG icons fail to display. This happens because JupyterLab's launcher widget handles icons differently based on category:

  • Notebook/Console categories: Uses kernelIconUrl property - works correctly
  • Other categories: Calls commands.icon(command, args) to get the icon - server-proxy's server-proxy:open command doesn't define an icon property, so icons are missing

The Fix

This extension wraps JupyterLab's commands.icon() method to intercept calls for the server-proxy:open command and return pre-cached LabIcon instances.

How it works:

  • Fetches server-proxy configuration from /server-proxy/servers-info endpoint
  • Pre-fetches SVG icons and creates LabIcon instances for non-kernel categories
  • Wraps app.commands.icon() to return cached icons when command is server-proxy:open
  • Matches icons by args.title (handles both plain titles and titles with [↗] suffix for new_browser_tab: true)

Implementation details:

  • No command override: Preserves server-proxy's original execute function completely
  • No timing issues: Wrapper intercepts all calls regardless of extension load order
  • No private API access: Uses public method wrapping instead of accessing internal _commands Map
  • Non-destructive: Original behavior preserved for all other commands

Fix Implementation Details

The extension consists of frontend TypeScript code that wraps the commands registry icon method.

Frontend Implementation (src/index.ts):

  • Icon Caching: Fetches server info, creates LabIcon from icon_url for each non-kernel category launcher, caches by title
  • Title Matching: Caches icons under both plain title and ${title} [↗] suffix (server-proxy appends this when new_browser_tab: true)
  • Method Wrapping: const originalIcon = app.commands.icon.bind(app.commands) preserves original, then (app.commands as any).icon = ... installs wrapper
  • Conditional Return: If id === 'server-proxy:open' and args.title matches cache key, returns cached LabIcon; otherwise delegates to original

Icon Utilities (src/iconUtils.ts):

  • SVG Fetching: fetchSvgIcon(url, name) fetches SVG content and creates LabIcon instance
  • Fallback Icons: createTextIcon(name, title) generates simple SVG with first letter when icon_url unavailable

Requirements

Install

To install the extension, execute:

pip install jupyterlab_server_proxy_launcher_fix

Uninstall

To remove the extension, execute:

pip uninstall jupyterlab_server_proxy_launcher_fix