Skip to content

feat(grid): copy a long cell value without opening the viewer - #748

Merged
EVWorth merged 1 commit into
mainfrom
claude/feat-739-copy-cell
Oct 5, 2026
Merged

EVWorth merged 1 commit into
mainfrom
claude/feat-739-copy-cell

Conversation

@EVWorth

@EVWorth EVWorth commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Closes #739.

What changed

Copying a long value, such as the statement SHOW CREATE TABLE returns, used to mean opening the full-content viewer and using its Copy. Any cell that shows the expand (⤢) button now also shows a Copy button next to it:

  • It shows on hover, like the expand button.
  • It turns into a check mark for 1.5s once the value is on the clipboard.
  • It copies the value as stored, not the viewer's reformatted text, so the DDL comes out exactly as the server sent it.
  • Binary values are copied as hex, the same as the viewer's Copy. That encoding moves into lib/blob.ts as toHex(), and the viewer now uses it too.
  • The click doesn't reach the row, so copying doesn't change the selection.
  • NULL cells get no Copy button.

The issue's "expand/wrap" ask is already covered: the viewer wraps long lines (wordWrap: "on").

Tests

TruncatedCell.test.tsx gets 4 new cases:

  • A long value is copied as stored, without opening the viewer, and the button switches to "Copied".
  • Bytes are copied as hex.
  • Copy shows only where the expand button shows.
  • Copying doesn't also click the row.

Verification

  • vitest run src/components/grid src/lib: 1151/1151 pass.
  • npm run lint: 0 errors, and the warning count (162) is unchanged from main. npm run type-check and dprint check: clean.
  • The browser tests (vitest.browser.config.ts) couldn't run in my container because its Chromium doesn't match the repo's Playwright version; CI runs them.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SCNjpC4VgppHSFs7P6rkZg


Generated by Claude Code

A long value, such as the statement SHOW CREATE TABLE returns, could be
copied only by opening the full-content viewer and using its Copy
(#739). Cells that offer the expand button now offer Copy beside it,
with the same hover visibility, and a check mark for a moment once the
value is on the clipboard.

It copies the value as stored, not the viewer's reformatted text, and
copies bytes as hex, as the viewer does. That hex encoding moves into
lib/blob.ts as toHex(), and the viewer uses it too. The click does not
reach the row, so copying does not change the selection.

The viewer already wraps long lines, which covers the issue's
expand/wrap ask.

Closes #739.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SCNjpC4VgppHSFs7P6rkZg
@EVWorth
EVWorth merged commit 8d4bc19 into main Oct 5, 2026
12 checks passed
@EVWorth
EVWorth deleted the claude/feat-739-copy-cell branch October 5, 2026 03:10
@EVWorth EVWorth mentioned this pull request Oct 5, 2026
EVWorth added a commit that referenced this pull request Oct 5, 2026
Version bump across the three manifests and the two lockfile entries
that record the app's own version.

What 1.2.0 contains since 1.1.0:

- Each editor tab runs on its own server session, so SET @var,
  temporary tables and multi-run transactions carry across runs (#734)
- Separate connection lanes for the agent and for backups/restores, so
  neither can starve the editor; the pool-exhausted message says what
  is holding the pool (#732, #727)
- Copy button beside Expand for long cell values, such as SHOW CREATE
  TABLE (#748)
- Linux/Wayland: WebKitGTK's DMABUF renderer is turned off, for the
  black area left after resizing the window (#742)
- Tauri 2.12 on both the npm and Rust sides (#749), and the dependency
  roll-up in #740
- rustls TLS 1.3 advisory RUSTSEC-2026-0285 patched (#728)

Also the first release built with rustup in place of
dtolnay/rust-toolchain (#746), so the release jobs' toolchain step runs
on Windows and macOS for the first time.


Claude-Session: https://claude.ai/code/session_01SCNjpC4VgppHSFs7P6rkZg

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show create table copy button

2 participants