feat: tab context menu, inline quoting, session restore, handleSave target DB, PSQL console windows fix#210
Conversation
…arget DB, PSQL console windows fix
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughPR ChangesTab Editing & Execution Improvements
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds a right-click context menu to query editor tabs (Close, Close Others, Close All, Rename, Duplicate, Copy File Path, Open in Explorer), fixes inline-editing SQL to properly quote identifiers with
quoteIdentifier(), fixes session restore to show tabs without requiring a connection click first, fixeshandleSaveto respect tab-scoped target databases (preventing "relation does not exist" errors), and fixes PSQL Console output disappearing on Windows WebView2 due to React 18 batch splitting.Related issue
N/A
Changes
textarea + execCommand('copy')for Linux WebKitGTK wherenavigator.clipboard.writeTextmay be unavailable. Open in Explorer creates parent directories (mkdir recursive) before callingrevealItemInDir, withopenPath(parentDir)as fallback.INSERT/UPDATE/DELETESQL generated by results-grid row edits now quotes all table/column names withquoteIdentifier()— handles mixed-case, reserved words, and schema-qualified ("schema"."table") identifiers correctly across PostgreSQL, MySQL, SQLite, and CockroachDB.queryTabs.length > 0and editor renders onactiveTabexisting, removing theisDatabaseReadygate. Toolbar (Run/Save/Format) stays gated behindisDatabaseReadysince those need a live DB.activeTab.targetfor the tab-scoped database name, resolves the target connection's credentials viaconnections.find(), and always creates a dedicatedDatabase.load(...)instead of reusingcurrentDb. Prevents "relation does not exist" when saving rows from a tab scoped to a different database/schema.psqlOutputin a ref inMainContent, always passes it asliveOutput.PsqlWindowuses ashowLiveGracestate that keeps the live section visible up to 300ms post-execution (cancelled early when entries reflect the output). Bridges the WebView2 React 18 batch-split gap.opener:allow-open-pathtosrc-tauri/capabilities/default.json(needed for theopenPathfallback in Open in Explorer).Testing notes
npx tsc --noEmitpasses with zero errors.storage.rsorupdater.rs).Checklist
npm run tauri devornpm run tauri build) and verified the change works.npx tsc --noEmit).cargo check --manifest-path src-tauri/Cargo.toml).#[tauri::command], I registered it insrc-tauri/src/lib.rs'sgenerate_handler!.CHANGELOG.mdunder## [Unreleased].storage.rs,updater.rs,capabilities/, or the AI assistant code path, I flagged it in the summary above.Summary by CodeRabbit
Release Notes
New Features
Bug Fixes