Skip to content

feat(editor): Format button + Save flow (name popover, favorites, rename/delete)#7

Merged
BorisTyshkevich merged 2 commits into
feat/result-header-names-onlyfrom
feat/save-format-ux
Jun 21, 2026
Merged

feat(editor): Format button + Save flow (name popover, favorites, rename/delete)#7
BorisTyshkevich merged 2 commits into
feat/result-header-names-onlyfrom
feat/save-format-ux

Conversation

@BorisTyshkevich

Copy link
Copy Markdown
Collaborator

Editor toolbar + Saved/History UX improvements from the original design. Stacked on #6 (base = its branch); retarget to main once #6 merges.

Editor toolbar

  • Format ({ }) button → runs the existing formatQuery (same action as ⌘⇧Enter).
  • Save button replaces the toolbar star.

Save flow

  • Click Save (or ⌘S) → a "Save query as" name popover, prefilled with the tab name or a name inferred from the SQL.
  • Enter / Save creates the saved entry and links the tab to it. The button then reads "Saved" (accent) until you edit the SQL again (dirty), and re-saving updates the linked entry in place (no duplicate).

Saved list

  • Live count on the tab: "Saved · N".
  • Each row: favorite star (toggle; favorites sort first), inline rename (pencil), delete (trash) — replacing the old single ×.

History list

  • Per-row trash icon instead of × (matches Saved).

Code

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

Verified live on otel: Format/Save buttons, popover prefill + commit, button → "Saved", live count, pencil inline-rename, trash, History trash.

Tests

npm test381 passing; state.js / saved-history.js / shortcuts.js / icons.js at 100%, app.js meets its gate.

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

Isolator acm and others added 2 commits June 21, 2026 17:00
…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
@BorisTyshkevich BorisTyshkevich merged commit 5a39b5c into feat/result-header-names-only Jun 21, 2026
1 check passed
@BorisTyshkevich BorisTyshkevich deleted the feat/save-format-ux 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