All notable changes to this project will be documented in this file.
-
Improved Horizontal Layout Mode:
- output area of cells now pile up vertically in horizontal mode for better readability
-
Improved Shutdown Experience:
- Enhanced shutdown dialog with centered spinners and progress indicators
- Clearer messages during cleanup and shutdown phases
- Smooth transition to goodbye message before server stops
-
Improved rerun Mechanism and Debugging:
- Added optional
debug_msgparameter torerun()for custom debug messages - Prints debug info to console when
DEBUGflag is enabled inrerun.py - Helps trace rerun triggers during development
- fixed issue of to many reruns when opening a new notebook
- Added optional
-
Demo Notebook Loading Fix:
- Fixed issue where loading a notebook caused multiple reloads
- Now tracks last opened demo to prevent redundant loads
- Ensures smooth demo selection experience
-
New Horizontal Layout Mode: Display cells with code on left and output on right
- Enable via
layout={'horizontal': True}or Settings panel - Adjustable split ratio via
vertical_splitparameter (20-80%, default 50%) - Live adjustment slider in sidebar (only visible in horizontal mode)
- Ideal for dashboard development and side-by-side code/visualization
- In app_view mode, output area takes full width (editor hidden, split ignored)
- In edit mode, configurable split between code editor and output areas
- Recommended to use with
layout={'width': 'wide'}for optimal space
- Enable via
-
Demo Notebooks (11 Progressive Tutorials):
- Complete tutorial series covering all features from basics to advanced usage
- Each notebook focuses on specific concepts with interactive examples
-
Agent System Prompt Updates:
- Added dedicated section emphasizing importance of widget keys
- All examples in agent prompt now include unique widget keys
- Best practices section updated to highlight widget key requirement
-
Minimize/Expand All Cells:
- New sidebar buttons to minimize or expand all cells at once
minimize_all()method: Collapse all cells to hide code editorsexpand_all()method: Expand all cells to show code editors- Available in both notebook and app modes
- Useful for presentations or focusing on outputs
Improved sphinx documentation
-
New Advanced settings panel with toggle button in cell UI
- Fragment toggle moved from main UI to Advanced panel (saves UI space)
- Added
run_everyparameter control for auto-refreshing fragments
-
All notebook widgets use
state_key()prefixer to avoid key collisions with user defined widgets in cells. -
API Change:
nb.new_notebook()removed - usenb.open()without arguments to create a new notebooknb.open()creates new notebook with default title "new_notebook" (editable from UI)nb.open(path_or_code)loads existing notebook from file path or code string- Cleaner, more intuitive API without parameter ambiguity
-
Documentation: Complete Sphinx documentation for agent module with Google-style docstrings
Minor bug fixes for v0.3.2 release cloud deployment
-
Shell code extraction to
pynteract: The formerstreamlit_notebook.shellsub-package has been moved to a standalone package (pynteract: here) to improve maintainability and separation of concerns. -
Explicit UTF-8 encoding for file IO to fix Windows compatibility issues.
-
Internal
st.session_statekeys are now consistently prefixed with_streamlit_notebook_to avoid collisions with user-defined keys. -
Sidebar title inputs now properly stays in sync with the current notebook title.
-
Threads spawned by the agent stream processing pipeline are registered in a global pool and joined after response generation to avoid stray background threads.
-
Added
audioop-ltsas an explicit dependency to ensure pydub compatibility with Python >= 3.13 (the standard libaudiooppackage on which pydub relies has been deprecated and removed from latest python versions). Tested working with 3.14. -
Streamlit import/patching is deferred to avoid
missing ScriptRunContextin CLI startup. -
rerun()now supports Streamlit 1.52+ fragment scope:rerun("fragment")for fragment-only reruns,rerun("app")for full app reruns (default). Fragment reruns bypass delay management for immediate execution.
-
Improved UI/UX : better cell UI interface, possibility to minimize cells to free up screen space, new Quit button to close the Streamlit server elegantly (having to hit Ctrl+C in the terminal was not ideal…), and other little stuff.
-
new
layoutparameter in the st_notebook factory. Basically equivalent to st.set_page_config, but letting you choose the initial layout width (in %) of the main display, rather than just 'centered' or 'wide'). I also added a slider in the sidebar to adapt the width live from the interface. Note: You don't need to call st.set_page_config anymore in your notebook files, and attempting to do so will raise an error. -
most features now working properly (many bug fixes)
-
better modularity, organization and documentation of the codebase
-
moved the modict utility used throughout the project to a separate package (here).
New Features:
- Enhanced AI Agent: Added comprehensive document reading capabilities
- Support for PDF, DOCX, XLSX, PPTX, ODT, HTML, and more
- Web page content extraction with
read()tool - Automatic text extraction from URLs and local files
- Lightweight fallback mode when optional dependencies unavailable
- Voice Integration: Added audio autoplay component for seamless voice interaction
- Cross-browser compatible audio playback
- Auto-detection of audio formats (MP3, WAV, OGG, etc.)
- Silent UI integration for voice responses
Code Quality & Structure:
- Module Reorganization: Moved core modules into
streamlit_notebook/core/package- Better separation between core notebook functionality and agent features
- Cleaner import structure and namespace organization
- Agent Modules: Consolidated AI agent code in
streamlit_notebook/agent/package- Modular tool system with
Toolclass - Separate modules for voice, image, and message handling
- Enhanced
modictutility for flexible configuration
- Modular tool system with
- Bug Fixes:
- Fixed typo in
has_fragment_toggleproperty setter - Improved error handling in AI streaming
- Better handling of cell display metadata
- Fixed typo in
Developer Experience:
- Added comprehensive module-level documentation
- Improved type hints throughout codebase
- Enhanced error messages and debugging output
- Better fallback strategies for optional dependencies
Installation Changes:
- Optional Dependencies: Data science packages (matplotlib, pandas, numpy, etc.) are now optional
- Install with
[datascience]extra for full stack, or install core only and add libraries manually - Reduces base install size significantly for lightweight deployments
- Install with
Code Quality & API Improvements:
- Cell Types: Improved type management using internal
CellTypemixins (instead of directCellsubclasses), making it straightforward to support new cell types with custom behaviour while still being able to change a cell's type dynamically without having to recreate the cell instance. - UI/Logic Separation: Moved all UI rendering logic to dedicated
NotebookUIclass (following theCell/CellUIpattern) - Public/Private API Distinction: Renamed internal methods with
_prefix for clear API boundaries - Template-Based Code Generation: Refactored
to_python()to use clean string templates instead of manual concatenation - Enhanced Documentation: Added comprehensive Google-style docstrings with examples for all public methods (~85% coverage)
- Streamlit Patches: Centralized all Streamlit module patches in
_apply_patches()method:st.echo- Transparent patching for code execution trackingst.rerun- UserWarning guiding users to__notebook__.rerun()or package-level importst.stop- RuntimeError to properly stop cell execution
- Rerun API Enhancements:
- Unified API:
rerun(wait)andwait(delay)now accept bool/float for flexible control wait=True(soft rerun),wait=False(hard rerun),wait=<number>(delayed rerun)- Exposed
rerun()andwait()as both public notebook methods and package-level exports - Improved delay merging logic with clear documentation
- Unified API:
- AI Agent Integration:
- Agent now accessible in shell namespace as
__agent__ - Enables dynamic tool registration and programmatic agent control
- Full documentation added to README with examples
- Agent now accessible in shell namespace as
Bug Fixes & UX Improvements:
- Cell type can now be manually changed after creation ('code', 'markdown', or 'html')
- Fixed bug when inserting new cells above/below existing ones
- Safer UI behavior for dynamic cell creation and execution
- Programmatic cell code modifications now automatically reflect in the editor UI
- Updated
.gitignoreto track Sphinx documentation source files while ignoring build artifacts
Breaking Changes:
- Saved notebook
.pyfiles now use simpler API withst_notebook()factory andnb.render()method directly, instead of previousget_notebook()andrender_notebook()helpers- Migration: Update existing notebook files to use new pattern shown in Quick Start
Major update: Notebooks are now pure Python files (.py), not JSON.
- Pure Python format with
@nb.cell()decorator syntax - Self-contained notebook .py files
- Run directly with
streamlit run notebook.py - Locked App mode deployment option
- Removed
.stnbJSON format entirely
- Improved shell behaviour
- Implemented basic magic commands support
.stnbJSON format as defaultst_notebookaccepts file paths or JSON strings
- Custom shell with AST-based execution
- Expression display modes
- HTML cells
- Demo notebooks