Skip to content

feat(jupyter): add JupyterLab 4 and Notebook 7 companion extension POC - #742

Merged
ObservedObserver merged 5 commits into
mainfrom
codex/jupyter-extension-poc
Sep 5, 2026
Merged

ObservedObserver merged 5 commits into
mainfrom
codex/jupyter-extension-poc

Conversation

@ObservedObserver

@ObservedObserver ObservedObserver commented Aug 6, 2026 •

Copy link
Copy Markdown
Member

This adds an opt-in companion extension for JupyterLab 4.2+ and Notebook 7.2+. Users can select a live pandas DataFrame from the notebook kernel and explore it in a resizable host pane without inserting a pyg.walk() cell. The existing anywidget workflow remains available.

The companion reuses PyGWalker's frontend and kernel computation protocol. JupyterLab gets a sidebar and main-area document; Notebook 7 gets a toolbar entry, selector, and native right panel. The first POC supports one active explorer and top-level pandas variables.

Before merge, the review fixes isolate app CSS from notebook Markdown and Jupyter toolbars, pass the host palette into Graphic Walker and its menus, preserve charts across theme changes, and hide Save when there is no spec-file target. Graphic Walker is slotted into the isolated shell so its menu accessibility remains intact. The installation docs now include the separate Notebook 7 dependency.

Validation:

  • 330 Python tests and five notebook tests passed; Ruff lint and format checks passed.
  • Full frontend build and two Playwright tests passed. The mount regression covers host CSS, both palettes, accessible menus, Code Export portals, added-chart preservation, and cleanup.
  • Companion typecheck and production build passed against JupyterLab 4.2.0. CI now builds this package too.
  • Real browser acceptance passed on JupyterLab 4.2.0 and Notebook 7.2.0 with Python 3.10: discovery, kernel table queries, drag-to-chart, live themes, menus, Code Export, and ordinary anywidget output alongside the companion. Both hosts also rendered anywidget with the companion disabled.

Known POC limits: kernel restart/reconnect and notebook-switch recovery remain Round 2 work, along with multiple explorers and persistence. There is no public package release in this PR. A rapid-theme-switch test encountered JupyterLab 4.2's own splash-screen removal race; the application flow passed after the host transition completed.

See docs/JUPYTER_EXTENSION_ROADMAP.md for scope and docs/JUPYTER_EXTENSION_POC_TEST.md for the acceptance procedure and recorded results.

@ObservedObserver ObservedObserver changed the title feat(jupyter): add JupyterLab companion extension POC feat(jupyter): add JupyterLab 4 and Notebook 7 companion extension POC Aug 10, 2026
@ObservedObserver
ObservedObserver marked this pull request as ready for review September 5, 2026 19:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-05T19:17:03.233715Z f012625 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f012625067

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"protocolVersion": PROTOCOL_VERSION,
"sessionId": str(walker.gid),
"name": name,
"props": walker._get_props(env="jupyter_extension"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Omit sampled rows from kernel-mode props

When a nonempty DataFrame is opened, calling _get_props without data_source defaults to walker.origin_data_source, which contains up to 500 sampled rows even in kernel-computation mode. The companion therefore serializes and transfers those values in the open_dataframe response although the frontend ignores them; wide frames or columns containing large objects can substantially delay or even prevent the explorer from opening. Pass an empty data source here, as the existing anywidget kernel path does.

Useful? React with 👍 / 👎.

@ObservedObserver
ObservedObserver merged commit d91e207 into main Sep 5, 2026
15 checks passed
@ObservedObserver
ObservedObserver deleted the codex/jupyter-extension-poc branch September 5, 2026 19:19
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.

1 participant