libredb / libredb/libredb-studio

Results grid has no context menu to copy a cell or a row

Open
#695 2 comments 1 reaction 1 assignee Claimed by @Ehtasham-Yasin View on GitHub
enhancement good first issue hacktoberfest
Dominant language
TypeScript
Stars
726
Forks
119
Avg merge
7h 41m
Merged PRs (30d)
284

Description

The shared `ui/context-menu.tsx` primitive (a shadcn component already part of this codebase) is already wired up and working in `src/components/schema-explorer/TableItem.tsx`, where right-clicking a table gives the user a set of contextual actions. `src/components/ResultsGrid.tsx`, the component that actually renders query results, wires up no `ContextMenu` at all.

The practical consequence is that a cell in the results grid offers no right-click menu whatsoever, and the only way to read a value in full when it is too long to fit in the cell is to open `RowDetailSheet.tsx` for that entire row, which itself has no "copy this row" action either. Copying a single value or a whole row out of a query result, a very ordinary thing to want to do while working with data, currently requires either a manual text selection inside a cramped grid cell or opening a separate detail panel with no copy shortcut of its own.

**Done when:**

- Right-clicking a cell in `ResultsGrid.tsx` shows a context menu with a "Copy Cell" action that copies just that cell's value.
- Right-clicking a row shows a context menu with a "Copy Row as JSON" action that copies the whole row.
- Both are built using the existing `ui/context-menu.tsx` primitive that the schema explorer already uses, so no new dependency needs to be added for this.

---

Curated for Hacktoberfest 2026. Comment to claim the issue before you start so two people do not
work on the same change. A PR must reference the issue and include tests for executable changes;
see [CONTRIBUTING.md](https://github.com/libredb/libredb-studio/blob/main/CONTRIBUTING.md).
Run `bun run test`, never bare `bun test`, so component
tests use their isolated execution groups. The 100% line-coverage gate must stay green.

**CI is the merge gate.** If you cannot run a command locally, list that command and the reason
under a `Testing` heading in your PR body; submit the PR, and a maintainer will approve the fork's
workflow run so CI can verify it. You do not need to withdraw correct work because a local tool
is unavailable.

If your sandbox can reach the npm registry, `npm install -g bun` is another way to install Bun.
Helm is only needed for the chart tests in the test suite. The repository's devcontainer provides
Bun and Helm and installs the JavaScript and chart dependencies automatically.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.