feat(results): output-panel polish — column-names-only header + Copy/Export links#6
Merged
Merged
Conversation
…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
…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
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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