mirror of
https://github.com/Rohithgilla12/data-peek
synced 2026-04-21 12:57:16 +00:00
* feat(notebooks): add shared types for notebooks and cells * feat(notebooks): add SQLite storage layer with full CRUD Implements NotebookStorage class backed by better-sqlite3 with WAL mode, foreign-key cascading deletes, and full CRUD for notebooks and cells. * feat(notebooks): add IPC handlers for notebook CRUD * feat(notebooks): add preload bridge for notebook IPC * feat(notebooks): add NotebookTab type and createNotebookTab action Adds 'notebook' to TabType union, NotebookTab interface, notebookId to PersistedTab, createNotebookTab action with deduplication, persistence handling, and notebook type guards in tab-query-editor.tsx. * feat(notebooks): add Zustand store for notebook state management * feat(notebooks): add NotebookEditor component and wire into TabContainer * feat(notebooks): add sidebar section for browsing and creating notebooks * feat(notebooks): add export functions for .dpnb and Markdown formats * feat(notebooks): add NotebookCell component and dependencies Add react-markdown and remark-gfm for markdown cell rendering. NotebookCell handles SQL execution, markdown rendering, result pinning, and keyboard shortcuts. * fix: address review feedback for SQL notebooks - Wrap JSON.parse in try/catch for corrupt pinned_result data - Fix IPC type mismatches: update/duplicate/updateCell return actual data - Remove non-functional Run All button from notebook editor - Replace confirm() dialog with immediate delete + toast notification - Remove dead notebook placeholder branch in tab-query-editor - Remove duplicate react-markdown/remark-gfm from root package.json * chore: lock files * docs(notebooks): add feature docs, demo runbook, and nav entry - SQL Notebooks feature documentation page for docs site - Demo runbook .dpnb file for ACME SaaS health checks - Add sql-notebooks to features navigation * content(notebooks): add release notes, social posts, and 3 blog posts - Release notes for v0.20.0 (SQL Notebooks) - Social media posts (Twitter, Reddit, Dev.to) - Blog 11: Feature announcement - Blog 12: Storage architecture deep dive - Blog 13: Lazy-loading Monaco in notebook cells * content(notebooks): add Threads posts and posting strategy 4 Threads posts: launch carousel thread, technical behind-the-scenes, runbook showcase, and conversation starter. Includes posting cadence and format tips. * docs(notebooks): add demo recording script * feat(video): add release video and demo video for SQL Notebooks - ReleaseVideo020: 24s release announcement (4 feature scenes) - NotebookDemo: 45s feature walkthrough with animated notebook mockup showing cells typing in, queries executing, results sliding in, keyboard navigation, and export formats * feat(video): add new background music for notebook videos Screen Saver by Kevin MacLeod (CC BY 4.0) as primary track, Equatorial Complex as alternative. Both compositions updated to use the new track. * fix: apply CodeRabbit auto-fixes Fixed 5 file(s) based on 5 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> --------- Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
118 lines
5.2 KiB
Markdown
118 lines
5.2 KiB
Markdown
# Release Notes: v0.20.0
|
|
|
|
This document covers the changes from v0.19.0 to v0.20.0.
|
|
|
|
---
|
|
|
|
## SQL Notebooks
|
|
|
|
SQL Notebooks is a major new feature that brings a Jupyter-style cell-based editor to data-peek. Create documents that mix executable SQL cells and Markdown cells in a single view — the primary use case is team runbooks, like a shared "how to debug stuck payments" guide that actually runs the queries.
|
|
|
|
---
|
|
|
|
## What's New
|
|
|
|
### SQL + Markdown Cells
|
|
|
|
Notebooks are composed of two cell types:
|
|
|
|
- **SQL cells** — a Monaco editor with inline results displayed directly below the query. Results show row count, execution duration, and a full scrollable result table.
|
|
- **Markdown cells** — rich text with GitHub Flavored Markdown (tables, task lists, strikethrough). Click to edit, click away to render.
|
|
|
|
Add cells from the toolbar or by hovering between existing cells — a `+` button appears on the dividing line and lets you pick the type.
|
|
|
|
### Pinned Results
|
|
|
|
Run a diagnostic query and pin the output. Pinned results persist across sessions in SQLite, so when you reopen a notebook the last known state is always visible — useful for runbooks that track a baseline or show an example of what "broken" looks like.
|
|
|
|
Pin via the cell overflow menu. An optional notebook-level "Auto-pin results" setting pins every successful run automatically.
|
|
|
|
### Folders for Organization
|
|
|
|
Group notebooks into folders from the sidebar. Folders are lightweight — they exist implicitly when any notebook references them. No separate folder management; remove the last notebook from a folder and the folder disappears.
|
|
|
|
### Export
|
|
|
|
- **Export as `.dpnb`** — a portable JSON format that includes all cells and pinned results. Reimportable into any data-peek instance. Connection IDs are stripped on export; you pick which connection to bind on import.
|
|
- **Export as Markdown** — SQL cells become fenced `sql` code blocks, pinned results become Markdown tables, Markdown cells export as-is. Readable without data-peek.
|
|
|
|
Import `.dpnb` files from File → Import Notebook, or drag a `.dpnb` file onto the sidebar.
|
|
|
|
### Duplicate to Connection
|
|
|
|
Right-click a notebook in the sidebar → "Duplicate to connection..." — pick any of your saved connections. Creates a full copy with all cells and pinned results bound to the new connection. The original is unchanged. Useful for running a production runbook against staging.
|
|
|
|
### Sidebar Integration
|
|
|
|
A "Notebooks" section appears below Saved Queries in the sidebar. Each entry shows the notebook title, connected database name, and last-edited timestamp. The existing sidebar search filters notebooks alongside tables and saved queries.
|
|
|
|
---
|
|
|
|
## Keyboard Shortcuts
|
|
|
|
| Shortcut | Action |
|
|
|---|---|
|
|
| `Shift+Enter` | Run cell and move focus to next cell |
|
|
| `Cmd+Enter` | Run cell, stay in place |
|
|
| `Cmd+Shift+Enter` | Run All (top to bottom, sequential) |
|
|
| `Cmd+J` | Move focus to next cell |
|
|
| `Cmd+K` | Move focus to previous cell |
|
|
| `Enter` | Enter editor mode on focused cell |
|
|
| `Escape` | Exit editor, return to cell-level navigation |
|
|
| `Cmd+Shift+D` | Delete focused cell |
|
|
|
|
Execution stops on the first error — if a diagnostic SELECT fails, the UPDATE cells below won't run.
|
|
|
|
---
|
|
|
|
## How to Use
|
|
|
|
### Quick Start
|
|
|
|
1. Open the Notebooks section in the sidebar and click `+` to create a notebook.
|
|
2. Give it a title. The notebook binds to your active connection.
|
|
3. Add a Markdown cell to describe what the notebook does.
|
|
4. Add a SQL cell and write your query.
|
|
5. Press `Shift+Enter` to run and advance — or `Cmd+Enter` to run in place.
|
|
6. Pin a result via the cell `...` menu if you want it to persist across sessions.
|
|
|
|
### Building a Runbook
|
|
|
|
A typical runbook pattern:
|
|
|
|
1. Markdown cell — context and prerequisites ("Run this when payments stop processing")
|
|
2. SQL cell — diagnostic query ("Show all payments stuck in `processing` state")
|
|
3. Markdown cell — what to look for in the results
|
|
4. SQL cell — follow-up query or remediation step
|
|
|
|
Export as `.dpnb` and share with your team. They import it, pick their connection, and the whole runbook is ready to run.
|
|
|
|
### Running on Multiple Environments
|
|
|
|
Right-click a notebook → "Duplicate to connection..." to create a version bound to your staging or dev database. Run the same queries against different environments without maintaining separate notebooks.
|
|
|
|
---
|
|
|
|
## Technical Notes
|
|
|
|
- Cell content auto-saves with a 500ms debounce — no save button needed. The toolbar shows "Saved [time ago]".
|
|
- Only the focused cell loads a Monaco instance. Unfocused cells render as static `<pre>` elements — notebooks with many cells stay lightweight.
|
|
- Result tables use the same virtualized rendering as query tabs. Large result sets don't slow down the notebook.
|
|
- Pinned results are capped at 500 rows per cell.
|
|
- Run All executes SQL cells sequentially and skips Markdown cells.
|
|
|
|
---
|
|
|
|
## Stats Summary
|
|
|
|
- New tab type: `notebook`
|
|
- New IPC namespace: `window.api.notebooks`
|
|
- New SQLite tables: `notebooks`, `notebook_cells`
|
|
- New stores: `notebook-store.ts`
|
|
- New components: `NotebookTab`, `NotebookCell`, `NotebookSidebar`
|
|
|
|
---
|
|
|
|
## Upgrade
|
|
|
|
Download the latest release from the [releases page](https://github.com/Rohithgilla12/data-peek/releases) or the app will auto-update if you have v0.19.x installed.
|