Skip to content

feat: Add option to create notebook from file tree#8412

Merged
mscolnick merged 4 commits intomarimo-team:mainfrom
daizutabi:feat-create-notebook-from-file-tree
Feb 23, 2026
Merged

feat: Add option to create notebook from file tree#8412
mscolnick merged 4 commits intomarimo-team:mainfrom
daizutabi:feat-create-notebook-from-file-tree

Conversation

@daizutabi
Copy link
Contributor

📝 Summary

This pull request addresses issue #5220 by introducing a streamlined way to create new marimo notebooks directly from the file explorer. Previously, users could only create generic files or folders, making the process of starting a new notebook less intuitive.

Closes #5220

🔍 Description of Changes

  1. Frontend Enhancements:

    • A dedicated "Add notebook" button, featuring the marimo icon, has been integrated into the file explorer's toolbar for quick access.
    • An equivalent "Create notebook" option is now available within the dropdown menu for directories, allowing for notebook creation within specific folders.
  2. Backend Logic for Notebook Creation:

    • The RequestingTree.createFile method in the frontend now accepts an optional type parameter, which can be "notebook".
    • On the backend, marimo/_server/files/os_file_system.py has been updated to handle the new "notebook" file type. When a notebook is requested, it initializes the new file with the standard marimo notebook boilerplate by utilizing AppFileManager. This ensures newly created notebooks are immediately functional.
a b

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Tests have been added for the changes made.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Pull request title is a good summary of the changes - it will be used in the release notes.

@vercel
Copy link

vercel bot commented Feb 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Feb 23, 2026 4:45am

Request Review

@github-actions github-actions bot added the bash-focus Area to focus on during release bug bash label Feb 21, 2026
@Light2Dark Light2Dark added the enhancement New feature or request label Feb 21, 2026
Light2Dark
Light2Dark previously approved these changes Feb 21, 2026
Copy link
Collaborator

@Light2Dark Light2Dark left a comment

Choose a reason for hiding this comment

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

code looks good otherwise :)

Comment on lines +289 to +293
<img
src={marimoIcon}
className="w-4 h-4 shrink-0 filter grayscale"
alt="Marimo"
/>
Copy link
Collaborator

@Light2Dark Light2Dark Feb 21, 2026

Choose a reason for hiding this comment

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

Was trying out some designs, maybe this looks better?

          <span className="relative inline-flex">
            <img
              src={marimoIcon}
              className="w-4 h-4 shrink-0 filter grayscale"
              alt="Marimo"
            />
            <PlusIcon
              className="w-2 h-2 absolute -bottom-0.5 -right-1 bg-background text-muted-foreground rounded-full"
              strokeWidth={3}
            />
          </span>
Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for sharing your design idea. I've actually just finished implementing a similar approach. If you see any areas for improvement or modifications, please let me know or feel free to suggest them.

aa bb cc dd

Copy link
Collaborator

Choose a reason for hiding this comment

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

nice, thanks!

@Yasin197
Copy link

looking forward to this quality of life improvement!

@mscolnick mscolnick merged commit 1bab9a7 into marimo-team:main Feb 23, 2026
37 of 44 checks passed
@daizutabi daizutabi deleted the feat-create-notebook-from-file-tree branch February 23, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash-focus Area to focus on during release bug bash enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to create notebook from file tree

4 participants