[Feat]: Notebooks: disable SQL cells without deleting their source

Open
#1,510 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
57/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
sql, typescript
Domain
database

Research direction

Start with NotebookCell in packages/web-ui/src/types/notebook.ts and getExecutableCells in packages/web-ui/src/utils/notebookRunAll.ts, then trace run dispatch and prerequisite resolution in NotebookView.tsx. Check notebookFile.ts and notebookUndo.ts for persistence, and the existing notebookRunAll, NotebookView and notebookFile tests. Done means disabled state survives save/load and undo/redo, disabled cells are skipped or block dependents across run paths, and the listed behaviors are tested.

Written by the indexing model from the issue text.

Description

feature request
Prerequisites
  • I have written a descriptive issue title.
  • I have searched existing issues and open pull requests to avoid duplicating an existing feature request.
🚀 Feature Proposal

Add an explicit enabled/disabled state for SQL cells. Disabled cells keep their source and configuration but do not execute through Run All, direct run or automatic prerequisite resolution until re-enabled.

Motivation

Users should be able to temporarily exclude an expensive or experimental query without deleting it or editing its SQL into comments.

Example
Disable an expensive diagnostic cell before Run All. It is counted as skipped; a consumer requiring it is blocked with a link to the disabled prerequisite.
Acceptance criteria
  • Provide an accessible per-SQL-cell enable/disable toggle; default legacy cells to enabled and show a disabled reason on run controls.
  • Exclude disabled cells from Run All and prerequisite execution. Block consumers of disabled inputs rather than silently using cached output or re-enabling the source.
  • Keep source, configuration and existing output for inspection, but label output disabled/noncurrent where appropriate. Re-enabling alone must not execute SQL.
  • Persist the state through save/load, import/export and undo/redo, and account for skipped/blocked cells in the Run All summary.
  • Prevent an in-flight response from changing the new disabled state; disabling is not a claim that an already-sent database query was cancelled.
  • Test direct run, Run All, dependency chains, existing cached output, legacy files and disable/re-enable round-trips.
Where to start

Verified against main at 066e41c34001edbc6c869ed726aa3958d3ae7db5: NotebookCell has an isParallel option but no enabled/disabled state. getExecutableCells selects every nonempty SQL cell and prerequisite resolution can invoke any referenced SQL cell.

Existing test references:

Scope: Execution exclusion only; query cancellation, timed scheduling and connection read-only enforcement remain separate concerns.

Plugin behavior: Apply the execution gate before dispatch for every driver on desktop and web; it is a notebook preference, not an authorization mechanism.

Related notebook proposals:

Contributor notes
  • Follow AGENTS.md and the repository rules. Run upstream GitNexus impact analysis before editing existing symbols and report the blast radius; run change detection before committing.
  • Add new UI strings to every locale under packages/web-ui/src/i18n/locales/. Use design tokens, keyboard access, accessible labels and visible focus.
  • Keep pure frontend helpers under packages/web-ui/src/utils/ and tests under matching packages/web-ui/tests/ paths. Run focused tests, pnpm typecheck, pnpm lint and pnpm build; extend existing notebook tests for the behaviors above.
  • Preserve desktop and web behavior. Any necessary shared backend logic belongs in src-tauri/src/application/ or plain modules, with transport-specific code in the corresponding transport module. For backend changes, run relevant Rust tests and cargo check --no-default-features from src-tauri/.
  • Questions? Ask here or on Discord.
Dominant language
TypeScript
Stars
5.1k
Forks
335
Avg merge
1d 19h
Merged PRs (30d)
240

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TabularisDB/tabularis

All issues in TabularisDB/tabularis

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.