# repl: Show add-cell controls in empty notebooks \(\#61329\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d1548bd0133dca80a7530e249d15104c4e0918b0

Requested commit: d1548bd0133dca80a7530e249d15104c4e0918b0

Commit: d1548bd0133dca80a7530e249d15104c4e0918b0

Tree: d25b1f30e82fb4efdc4361017dd6e2c2a88a7463

Author: Arnesh

Committer: GitHub

## Message

```
repl: Show add-cell controls in empty notebooks (#61329)

## Objective

When a notebook has no cells, the editor renders a blank pane with no
visible way to add one. Cells can only be added via the toolbar icons or
keybindings, which aren't discoverable from an empty editor — so a newly
created `.ipynb` looks broken.

This is the follow-up direction suggested in #61296.

## Solution

Render an empty-state in the editor body when the notebook has no cells,
with "Add code cell" / "Add markdown cell" buttons (dispatching the
existing `add_code_block` / `add_markdown_block` handlers), matching the
affordance VSCode provides.

## Testing

Tested locally on macOS with the notebook feature enabled
(`LOCAL_NOTEBOOK_DEV=1`):

- Opening an empty `.ipynb` shows the empty-state instead of a blank
pane.
- Clicking "Add code cell" inserts an editable code cell and marks the
tab dirty.

## Showcase

**Before** — empty notebook renders a blank pane:

![Before: blank
pane](https://raw.githubusercontent.com/ArneshBanerjee/zed-jupyter/pr-assets/61329-before.png)

**After** — empty notebook shows add-cell controls:

![After: add-cell
controls](https://raw.githubusercontent.com/ArneshBanerjee/zed-jupyter/pr-assets/61329-after.png)

Clicking "Add code cell" inserts a cell:

![After clicking Add code
cell](https://raw.githubusercontent.com/ArneshBanerjee/zed-jupyter/pr-assets/61329-after-add-cell.png)

Release Notes:

- N/A

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Finn Evers <finn.evers@outlook.de>
```

## Parents

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

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