# repl: Open notebooks from single-file worktrees in the notebook editor \(\#61294\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/55ea5baf15027d185390e8aa1b6b7768cc059330)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 55ea5baf15027d185390e8aa1b6b7768cc059330

Requested commit: 55ea5baf15027d185390e8aa1b6b7768cc059330

Commit: 55ea5baf15027d185390e8aa1b6b7768cc059330

Tree: 13e854815a7f57b5604b0bb1580ad2144d4cf226

Author: Arnesh

Committer: GitHub

## Message

```
repl: Open notebooks from single-file worktrees in the notebook editor (#61294)

`NotebookItem::try_open` only checked the worktree-relative path's
extension, which is empty for single-file worktrees. As a result,
opening a notebook directly (`zed foo.ipynb`, or any open outside a
folder worktree) fell through to the text editor and showed raw JSON,
while the same file opened from within a folder workspace opened in the
notebook editor. Fall back to the absolute path when detecting
notebooks.

Tested locally (macOS, with the notebook feature enabled via
`LOCAL_NOTEBOOK_DEV`): `zed /tmp/solo.ipynb` now opens the rendered
notebook view; folder-workspace behavior unchanged.

Release Notes:

- Fixed notebooks opened as single files (e.g. `zed foo.ipynb`)
rendering as raw JSON instead of opening in the notebook editor
(preview-only).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
```

## Parents

- [a0dc9fd13b4cdaaf3ce707f40d634881a9fce60e](https://git.cafe/gitcafe/zed/commit/a0dc9fd13b4cdaaf3ce707f40d634881a9fce60e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/55ea5baf15027d185390e8aa1b6b7768cc059330?format=markdown)
