Skip to content

feat(results): output-panel polish — column-names-only header + Copy/Export links#6

Merged
BorisTyshkevich merged 5 commits into
mainfrom
feat/result-header-names-only
Jun 21, 2026
Merged

feat(results): output-panel polish — column-names-only header + Copy/Export links#6
BorisTyshkevich merged 5 commits into
mainfrom
feat/result-header-names-only

Conversation

@BorisTyshkevich

@BorisTyshkevich BorisTyshkevich commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Two changes to the results (data output) panel, matching the original design.

1. Header shows column names only (no types)

The table header rendered <name> <type> (e.g. me String); now just the column name. Types stay in the data model (still drive numeric-column alignment).

2. Copy + Export links in the footer

Adds Copy and Export buttons to the results footer, after the timing / rows / scanned-bytes stats.

  • Copy -> clipboard. TSV for table results (header + rows, CH-style escaping); raw text as-is when output format is TSV/JSON. Toast feedback.
  • Export -> downloads a file. CSV (RFC-4180) for table results; raw TSV/JSON as-is otherwise. Filename from the sanitized tab name (falls back to result.).
  • core/export.js: pure toTSV/toCSV serializers (100% covered).
  • app.js: copyResult/exportResult actions + injectable env.download seam.
  • icons.js: copy + download glyphs; styles.css: .res-act button.

Tests

npm test -> 374 passing; export.js, results.js at 100%, app.js 100% lines.

Generated with Claude Code
https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef

Isolator acm and others added 2 commits June 21, 2026 16:15
…types)

The table header rendered "<name> <type>" (e.g. `me String`); drop the type so
the header is just the column name. Types remain in the data model (still used
for numeric cell alignment) — only the header span and its CSS are removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef
Adds Copy and Export buttons to the results footer (after the timing/rows/
bytes stats), matching the original design.

- Copy → clipboard as TSV (raw text as-is for TSV/JSON output); toast feedback.
- Export → downloads a file: CSV for table results, or the raw TSV/JSON as-is;
  filename from the (sanitized) tab name.
- core/export.js: pure toTSV/toCSV serializers (CH-style TSV escaping, RFC-4180
  CSV quoting), 100% covered.
- app.js: copyResult/exportResult actions + an injectable download seam
  (env.download) so the Blob/anchor path is testable.
- icons.js: copy + download glyphs. styles.css: .res-act button.

npm test → 374 passing; export.js/results.js 100%, app.js 100% lines.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef
@BorisTyshkevich BorisTyshkevich changed the title feat(results): show only column names in the result-table header (no types) feat(results): output-panel polish — column-names-only header + Copy/Export links Jun 21, 2026
…ame/delete)

Editor toolbar + Saved/History UX from the original design:
- Format ({ }) button → runs formatQuery (same as ⌘⇧Enter).
- Save button replaces the toolbar star. Click (or ⌘S) → "Save query as"
  name popover, prefilled with the tab name or one inferred from the SQL.
  Enter/Save creates the saved entry and LINKS the tab; the button then reads
  "Saved" (accent) until the SQL is edited (dirty), and re-saving updates the
  linked entry in place.
- Saved list: live count on the tab ("Saved · N"); each row has a favorite
  star (toggle, favorites sort first), inline rename (pencil) and delete
  (trash) instead of the old single ×.
- History rows: trash icon instead of × (matches Saved).

state.js: saveQuery (create-or-update + link), savedForTab, renameSaved,
toggleFavorite, sortedSaved replace the old toggleSaved/findSavedBySql.
icons.js: braces, bookmark, pencil, trash. shortcuts.js: ⌘S opens the popover.

npm test → 381 passing; state/saved-history/shortcuts/icons 100%, app.js gate met.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef
Isolator acm and others added 2 commits June 21, 2026 17:01
braces now reuses the same path as the json icon so the toolbar Format button
renders identically to the { } JSON result-view tab.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef
feat(editor): Format button + Save flow (name popover, favorites, rename/delete)
@BorisTyshkevich BorisTyshkevich merged commit 8173933 into main Jun 21, 2026
2 checks passed
@BorisTyshkevich BorisTyshkevich deleted the feat/result-header-names-only branch June 22, 2026 16:43
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.

1 participant