Repository navigation
fix: follow-ups from reviewing #542 and #538 — run rail, Install driver, Db2 docs - #546
Merged
Merged
Conversation
…shares one install #542 put Install driver on the schema browser and on every failed run. The route behind it was open to any signed-in account, and it runs npm (a native build for Db2) on the server for every workspace. - New install-wide permission `admin.drivers` (admins by default; a workspace role cannot lend it). POST /driver/install requires it. Without it the banner and the credential form show the command to run instead of a button. - The server runs one npm at a time, and a second request for a package that is installing shares that run: two installs in one node_modules fail or leave it half-written. - One driver status for every Install button (`shared/lib/driverStatus`): an install from one shows on all, a second click joins it, and a finished one refreshes every dialect on the package (MySQL and MariaDB share mysql2). - The banner appears only for the server's own "Database driver … is not installed" message, not any text saying "is not installed" (SQL Server's Full-Text Search error, a missing Postgres extension), and names the package from it instead of "driver". - The banner and the credential form render the same hints (`DriverInstallHints`): why it does not load, the command, Db2's steps. - Side by side — the layout Compare data needs — offers Install too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#542 replaced the strip under the editor with a rail of play buttons and checkboxes, and dropped what the strip said about each statement. - Each row shows its In [n] number — the one the Run tooltip ("In [4] at the caret") and Out [n] use, which nothing showed any more. Clicking it selects the statement. - With Safe mode on the number turns amber for a write Run will confirm, and red with `!` for an UPDATE or DELETE with no WHERE. The tooltip names the cell's kind. Badges are cached by statement text, as the strip did. - A copy button on the row (shown on hover) copies the statement with its variables filled in, secrets masked. The slim Monaco build has no context menu, so it lives on the row, as it did on the strip. - Statements starting on one line (`SELECT 1; SELECT 2;`) or inside a fold no longer draw their controls on top of each other: each row stacks below the one before. A long statement's row stays at the top while its first line is scrolled away. - StatementStrip and its test were left unused; deleted, with SqlEditorPane's dead `reveal` prop. The test-ID catalog no longer lists the strip's IDs. - Samples and comments no longer point at "the strip". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…og has them - DIALECTS.md and the user guide said a Db2 reorg folds a single-case table name to uppercase. The code deliberately does not (`db2ReorgTarget`): only the schema is folded, and the table is quoted as SYSCAT stores it — folding would aim a table created as "orders" at ORDERS. DIALECTS.md is required reading before touching dialect code, so following it would have reintroduced the bug #535 fixed. - The user guide described the statement strip and hovering it to copy a query with values; it now describes the run rail and its copy button. - One transaction: Redis, MongoDB and ClickHouse refuse it rather than rolling back "best-effort". - Install driver needs the Install drivers permission; release notes for both changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: f0602abe-9d30-421a-b94e-515c0bd9ab40) |
Contributor
Test IDsRemoved (7) · a test or recorded flow outside this repo may still use these
Added (6)
|
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 37a74444-11f9-46d0-8b8a-9e989d91f5ab) |
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.
Summary
Fixes the 15 findings from reviewing Cursor's #542 (install a missing driver, run checks on the left) and #538 (docs).
Install driver
POST /driver/installwas open to every signed-in account, and feat(sql-editor): install a missing driver and move run checks into the editor #542 put the button on every failed run. Installing runs npm on the server (and, for Db2, a native build). It now needs a new install-wide permission, Install drivers (admin.drivers), which admins have by default and no workspace role can grant. Without it, the banner and the credential form show the command to run instead of a button.node_modulesat once.Driver "driver".Run rail (#542 dropped what the statement strip showed)
Out [n]refer to. Clicking it selects the statement.!for an UPDATE or DELETE with no WHERE.StatementStrip, its test IDs and the deadrevealprop are deleted.Docs
DIALECTS.mdand the user guide said Db2 reorg should uppercase a single-case table name. The code deliberately doesn't, since uppercasing a table created as"orders"would point the reorg atORDERS. Fixed.Test plan
statementBadgesConnectionModal's permission checkmain.sql-editor-run-rail.test.tspasses 4/4 in a real browser: labels and badges, same-line rows, click-to-select, copy.npm run typecheck,npm run lintandnpm run lint:securitypass.npx vitest run: 526 files and 6,448 tests passed. A rerun under load average around 120 showed one pre-existing timing test incode-cell-execute.service.test.tsflaking: it passed, then failed, on back-to-back runs of the unchanged file. I filed that separately.npm run buildpasses, andbundle:first-loadis 146.3 KB gzip against a 170 KB budget.npm run test-ids: 1,753 IDs, none missing, none duplicated.🤖 Generated with Claude Code
Note
Medium Risk
Driver install is now permission-gated but still runs npm/native builds on the server; run-rail and Safe-mode badge changes affect everyday SQL execution UX.
Overview
Follow-ups to the SQL editor run rail and Install driver work: statement controls move fully into the left rail and driver install is centralized, permission-gated, and safer under concurrency.
Run rail replaces the bottom statement strip. Each statement gets an In [n] label (click selects in Monaco), per-row ▶ and include checkbox, hover copy with values (secrets masked), Safe-mode amber/red
!badges for risky DML, and row stacking so multiple statements on one line or long scrolled statements stay usable.StatementStripand related test IDs are removed; badge/copy logic lives instatementBadges.ts. New browser e2e covers labels, stacking, select-on-click, and copy.Install driver adds install-wide
admin.drivers(guarded onPOST /driver/install), shareddriverStatusso every banner/modal shows one install state (second click joins; one npm per package on the server viacreateInstallQueue).DriverInstallHintsunifies messaging; non-admins see the manual command. Banners only match the server’sDatabase driver "…" is not installedpattern. Side-by-side results panes now show install UI too.Docs/release notes: user guide and UNRELEASED describe the rail and install permission; DIALECTS.md corrects Db2 reorg table quoting (schema uppercased, table as catalog stores it).
Reviewed by Cursor Bugbot for commit 94172b7. Bugbot is set up for automated code reviews on this repo. Configure here.