[Feat]: Notebooks: copy a cell's complete source from its header

Open Beginner friendly
#1,511 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript

Research direction

Read NotebookCellHeader.tsx and NotebookCellWrapper.tsx to trace how each cell’s content reaches the header, then inspect usePlatformCapabilities.ts and capabilities.ts for the shared clipboard API. Start with NotebookCellWrapper.test.tsx and add focused coverage for SQL and Markdown, collapsed cells, exact source, empty content, and clipboard rejection. Done when the header action meets the stated accessibility and behavior criteria without changing notebook state.

Written by the indexing model from the issue text.

Description

feature request good first issue
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 a Copy source action to SQL and Markdown cell headers, including when their body is collapsed. Copy the current cell source verbatim through the shared platform clipboard capability.

Motivation

Users should be able to share a query or Markdown block without expanding the cell and selecting all text.

Example
Collapse an SQL cell, choose Copy source from its header, and paste the exact query with its original whitespace and notebook placeholders.
Acceptance criteria
  • Copy exactly cell.content for both SQL and Markdown cells, preserving Unicode, whitespace, comments and unresolved placeholders; do not copy results or substitute parameter values.
  • Use the shared desktop/web clipboard capability and normal localized success/failure feedback; do not import a Tauri-only clipboard API into notebook components.
  • Keep the action available on collapsed cells, keyboard accessible and disabled when the source is empty.
  • Copying does not execute a query or alter notebook content, undo history, selection or collapse state.
  • Add focused component coverage for SQL/Markdown, collapsed state, exact copied content, empty source and clipboard rejection.
Where to start

Verified against main at 066e41c34001edbc6c869ed726aa3958d3ae7db5: NotebookCellHeader exposes run, move, delete, preview and history actions but no whole-cell source copy. Monaco selection copy and result copying do not provide the same collapsed-cell action.

Existing test references:

Scope: One-cell plain-text source copy only; no copy of resolved SQL, clipboard import, result data or new shortcut system.

Plugin behavior: This action is independent of database capabilities and must work for plugin-driver notebooks without a live connection.

Good first issue scope: Bounded header action using the existing cell.content prop flow and platform clipboard abstraction; no format, parser or execution-model change.

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.