[Feat]: Notebooks: duplicate a cell to the end of the notebook
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
Research direction
Start with packages/web-ui/src/utils/notebook.ts and the add-cell flow in NotebookView.tsx; then trace how NotebookCellHeader.tsx actions reach the view. Extend the notebook utility and existing tests in packages/web-ui/tests/utils/notebook.test.ts and NotebookView.test.tsx. Done means SQL and Markdown cells append as independent copies with fresh ids and cleared runtime state, without shifting existing cells or executing SQL; undo and redo should cover the edit.
Written by the indexing model from the issue text.
Description
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 Duplicate to end for SQL and Markdown cells, appending a document-only copy with a fresh cell id. Appending is intentional: this first milestone must not shift existing positional cell references.
Motivation
Users often want to try a variation of a query while keeping the original and its output.
Example
Choose Duplicate to end on the second SQL cell. A source/configuration copy appears as the final cell with no output; all pre-existing cell positions remain unchanged.
Acceptance criteria
- Append a new cell with a fresh id, same type/content/name/schema and a deep copy of chart/display configuration. Start Markdown copies in edit mode and keep the new cell body expanded.
- Clear result, error, execution time, loading state and per-cell execution history; do not share mutable configuration objects between original and copy.
- Preserve source references verbatim and leave existing cells and their positions unchanged. If stable aliases are introduced, do not copy a unique result alias.
- Scroll to and focus the new cell using the existing add-cell flow; duplication must not execute SQL.
- Use the existing updateNotebook path so the operation is a single undoable structural edit and persists normally. Disable duplication while notebook execution is active.
- Test SQL/Markdown copies, source with cell references, fresh ids, configuration independence, cleared runtime fields and undo/redo.
Where to start
Verified against main at 066e41c34001edbc6c869ed726aa3958d3ae7db5: notebook.ts provides create/add/remove/move helpers but no duplication helper; NotebookCellHeader has no duplicate action. Existing {{cell_N}} references are position-based.
packages/web-ui/src/utils/notebook.tspackages/web-ui/src/components/notebook/NotebookView.tsxpackages/web-ui/src/components/notebook/NotebookCellWrapper.tsxpackages/web-ui/src/components/notebook/NotebookCellHeader.tsx
Existing test references:
packages/web-ui/tests/utils/notebook.test.tspackages/web-ui/tests/components/notebook/NotebookView.test.tsxpackages/web-ui/tests/utils/notebookUndo.test.ts
Scope: Append-only duplication of one cell; adjacent insertion, reference rewriting and whole-notebook duplication are outside this milestone.
Plugin behavior: Pure document editing; no database calls or driver-specific logic.
Good first issue scope: A pure copy helper and header-to-view callback wiring, using existing insertion and undo infrastructure. Append-only placement avoids a reference migration.
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 matchingpackages/web-ui/tests/paths. Run focused tests,pnpm typecheck,pnpm lintandpnpm 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 andcargo check --no-default-featuresfromsrc-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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TabularisDB/tabularis
-
feature request good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
TabularisDB/tabularis#1513 ·
Maintainers usually reply within 2 days
-
feature request good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
TabularisDB/tabularis#1511 ·
Maintainers usually reply within 2 days
-
feature request good first issue
Difficulty 3/5 1-2 days Newbie friendliness 82/100
TabularisDB/tabularis#1514 ·
Maintainers usually reply within 2 days
-
feature request
Difficulty 4/5 3-5 days Newbie friendliness 57/100
TabularisDB/tabularis#1510 ·
Maintainers usually reply within 2 days
-
feature request
Difficulty 5/5 Over a week Newbie friendliness 35/100
TabularisDB/tabularis#1509 ·
Maintainers usually reply within 2 days
All issues in TabularisDB/tabularis
Similar issues
-
idea-scout idea:453
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
jeanibarz/agent-notebook#453 ·
Maintainers usually reply within 1 day
-
level/task
Difficulty 1/5 Under an hour Newbie friendliness 95/100
wazuh/wazuh-dashboard-plugins#9642 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
unicef/adt-studio#1112 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Autocomplete still accepts an option after becoming disabledPossibly taken @Xapollon430 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day