Skip to content

feat(web-console): dynamic query status indicators, run button per query, run all queries in tab #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 59 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
e5c916c
feat(web-console): individual run button for each query
emrberk May 29, 2025
230fa68
multiple error tracking with line and error markers, error glyph indi…
emrberk Jun 2, 2025
ee262e4
merge main
emrberk Jun 2, 2025
176c921
remove unused single error range
emrberk Jun 2, 2025
0b50037
dynamic notifications based on query results
emrberk Jun 3, 2025
23b00b6
change run button styles, increase size, fix running query notificati…
emrberk Jun 3, 2025
9ac4c04
notifications history
emrberk Jun 3, 2025
ea15914
play button - dropdown menu for getting query plan and run
emrberk Jun 4, 2025
05b47ed
multiple notifications per query & scroll error fix
emrberk Jun 11, 2025
9fe16f4
add test cases
emrberk Jun 12, 2025
14c7e41
update submodule
emrberk Jun 12, 2025
446784e
Merge remote-tracking branch 'origin/main' into feat/multiple-run-but…
emrberk Jun 12, 2025
db7edba
add screenshot step to context path tests
emrberk Jun 12, 2025
8a39b17
remove visibility filter from column
emrberk Jun 12, 2025
5ef8e09
chain commands properly
emrberk Jun 12, 2025
99d2603
wait query execution before returning from dropdown commands
emrberk Jun 12, 2025
f9ec7ab
update submodule
emrberk Jun 12, 2025
ebe5388
Merge remote-tracking branch 'origin/main' into feat/multiple-run-but…
bluestreak01 Jun 13, 2025
6ab7467
fix first query prefixed empty lines issue & update dropdown to open …
emrberk Jun 16, 2025
a02d1bb
update cases & submodule
emrberk Jun 16, 2025
8ce8fff
run script, success buttons, context menu updates
emrberk Jun 17, 2025
b384a15
update submodule
emrberk Jun 17, 2025
8712210
test fixes
emrberk Jun 17, 2025
05b119f
update run script button styling & fix result charts test
emrberk Jun 17, 2025
4a99b89
cleanup grid before running script, set the last query result
emrberk Jun 17, 2025
5f2a9a8
correct null check
emrberk Jun 17, 2025
74d18dc
shift cursorquerydecoration, not to overlap with fold icon
emrberk Jun 18, 2025
387543b
selection run from button, prevent error pomarker changes on selection
emrberk Jun 19, 2025
a34c693
offset-based keys for errors and notifications
emrberk Jun 20, 2025
052609f
fix mixed up indexing 0-based vs 1-based
emrberk Jun 24, 2025
05b54c3
work with normalized queries - simplify moving markers and notifications
emrberk Jun 25, 2025
2c58603
batch process changes to prevent misleading removals
emrberk Jun 25, 2025
781461f
fix susing old offsets on shifting and correct query start column
emrberk Jun 25, 2025
623b4c9
add highlighting for selected query executions
emrberk Jun 25, 2025
38ec2a4
fix grid notificaction being overriden by editor
emrberk Jun 25, 2025
932206c
provide an option to stop a script, store query notifications per buffer
emrberk Jun 25, 2025
e6abd66
fix script running race conditions & infinite update loop
emrberk Jun 26, 2025
a15b2d8
bugfixes, run script shortcut, run multiple selected queries, improve…
emrberk Jun 27, 2025
6f1e574
handle multiple queries in the same line, handle multiple selection r…
emrberk Jun 30, 2025
bf7d65a
fix selection boundaries, improve accesibility for dialog, move run N…
emrberk Jun 30, 2025
8bcb680
dont let explaining explain, stop script after a failure, context men…
emrberk Jun 30, 2025
4afcd1e
sticky button bar & abortion side effect fix for schema
emrberk Jun 30, 2025
66f54fc
execute multiple queries by using query params & chevron styling
emrberk Jun 30, 2025
6310611
bugfix - activeNotifications null check
emrberk Jun 30, 2025
d568d4b
update notification handling, set cursor position after running script
emrberk Jul 1, 2025
7b168d6
Merge remote-tracking branch 'origin/main' into feat/multiple-run-but…
emrberk Jul 1, 2025
dbce325
update submodule
emrberk Jul 1, 2025
cc3e3d0
tweak context icon wrapper
emrberk Jul 1, 2025
37035e5
add test cases
emrberk Jul 2, 2025
cd7bd11
test fixes
emrberk Jul 2, 2025
a6fcc50
try typing differently in test
emrberk Jul 2, 2025
05ba847
fix cleanup problem and jumping to wrong position
emrberk Jul 2, 2025
fd7d141
proper waiting, change typing further
emrberk Jul 2, 2025
9aed1f4
try using monaco api
emrberk Jul 2, 2025
6b7a070
run multiple times
emrberk Jul 2, 2025
b050216
wait glyph to appear, check result from log
emrberk Jul 2, 2025
2fed187
bypass typing issues
emrberk Jul 2, 2025
1b17593
remove action
emrberk Jul 2, 2025
eb56642
prevent execution info being cleared on metrics tab, add clear query …
emrberk Jul 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/tests_with_context_path.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ jobs:
name: questdb-log
path: tmp/dbroot/log/*

- name: Upload Cypress Screenshots
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: cypress-screenshots
path: packages/browser-tests/cypress/screenshots
if-no-files-found: ignore

- name: Stop QuestDB
if: success() || failure()
run: ./tmp/questdb-*-rt-linux-x86-64/bin/questdb.sh stop
731 changes: 731 additions & 0 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
102 changes: 88 additions & 14 deletions packages/browser-tests/cypress/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,15 @@ beforeEach(() => {

Cypress.Commands.add("clearSimulatedWarnings", () => {
cy.typeQuery("select simulate_warnings('', '');");
cy.clickRun();
cy.clickRunIconInLine(1);
});

Cypress.Commands.add("getByDataHook", (name) =>
cy.get(`[data-hook="${name}"]`)
);

Cypress.Commands.add("getByRole", (name) => cy.get(`[role="${name}"]`));

Cypress.Commands.add("getGrid", () =>
cy.get(".qg-viewport .qg-canvas").should("be.visible")
);
Expand All @@ -103,9 +105,9 @@ Cypress.Commands.add("getGridRow", (n) =>
cy.get(".qg-r").filter(":visible").eq(n)
);

Cypress.Commands.add("getColumnName", (n) => {
cy.get(".qg-header-name").filter(":visible").eq(n);
})
Cypress.Commands.add("getColumnName", (n) =>
cy.get(".qg-header-name").eq(n).invoke("text")
);

Cypress.Commands.add("getGridCol", (n) =>
cy.get(".qg-c").filter(":visible").eq(n)
Expand Down Expand Up @@ -137,14 +139,22 @@ Cypress.Commands.add("runLineWithResponse", (response) => {
});

Cypress.Commands.add("clickLine", (n) => {
cy.get(".monaco-editor .view-line")
.eq(n - 1)
.click();
cy.window().then((win) => {
const monacoEditor = win.monaco.editor.getEditors()[0];
monacoEditor.revealLine(n);
monacoEditor.setPosition({
lineNumber: n,
column: monacoEditor.getModel().getLineMaxColumn(n),
});
});
cy.get(".active-line-number").should("contain", n);
});

Cypress.Commands.add("clickRun", () => {
cy.intercept("/exec*").as("exec");
return cy.get("button").contains("Run").click().wait("@exec");
Cypress.Commands.add("scrollToLine", (n) => {
cy.window().then((win) => {
const monacoEditor = win.monaco.editor.getEditors()[0];
monacoEditor.revealLine(n);
});
});

Cypress.Commands.add("clearEditor", () => {
Expand All @@ -169,9 +179,7 @@ Cypress.Commands.add("getMountedEditor", () =>
cy.get(".monaco-scrollable-element")
);

Cypress.Commands.add("getEditor", () => {
cy.get(".monaco-editor.vs-dark");
});
Cypress.Commands.add("getEditor", () => cy.get(".monaco-editor.vs-dark"));

Cypress.Commands.add("getEditorContent", () =>
cy
Expand All @@ -198,6 +206,49 @@ Cypress.Commands.add("getCursorQueryDecoration", () =>

Cypress.Commands.add("getCursorQueryGlyph", () => cy.get(".cursorQueryGlyph"));

Cypress.Commands.add("getRunIconInLine", (lineNumber) => {
cy.getCursorQueryGlyph().should("be.visible");
const selector = `.cursorQueryGlyph-line-${lineNumber}`;
cy.get("body").then(() => {
let element = null;

if (Cypress.$(selector).length > 0) {
element = cy.get(selector).first();
}

if (!element) {
throw new Error(`No run icon found for line ${lineNumber}.`);
}
return element;
});
});

Cypress.Commands.add("openRunDropdownInLine", (lineNumber) => {
cy.getRunIconInLine(lineNumber).rightclick();
});

Cypress.Commands.add("clickRunIconInLine", (lineNumber) => {
cy.getRunIconInLine(lineNumber).click();
});

Cypress.Commands.add("clickDropdownRunQuery", () => {
cy.intercept("/exec*").as("exec");
return cy.getByDataHook("dropdown-item-run-query").click().wait("@exec");
});

Cypress.Commands.add("clickDropdownGetQueryPlan", () => {
cy.intercept("/exec*").as("exec");
return cy.getByDataHook("dropdown-item-get-query-plan").click().wait("@exec");
});

Cypress.Commands.add("clickRunQuery", () => {
cy.intercept("/exec*").as("exec");
cy.getByDataHook("button-run-query")
.should("not.be.disabled")
.click()
.wait("@exec");
});

const numberRangeRegexp = (n, width = 3) => {
const [min, max] = [n - width, n + width];
const numbers = Array.from(
Expand Down Expand Up @@ -226,8 +277,29 @@ Cypress.Commands.add("F9", () => {

Cypress.Commands.add("getSelectedLines", () => cy.get(".selected-text"));

Cypress.Commands.add("selectRange", (startPos, endPos) => {
cy.window().then((win) => {
const monacoEditor = win.monaco.editor.getEditors()[0];
monacoEditor.setSelection({
startLineNumber: startPos.lineNumber,
startColumn: startPos.column,
endLineNumber: endPos.lineNumber,
endColumn: endPos.column,
});
});
});

Cypress.Commands.add("getVisibleLines", () => cy.get(".view-lines"));

Cypress.Commands.add("expandNotifications", () =>
cy.get('[data-hook="expand-notifications"]').click()
);

Cypress.Commands.add("collapseNotifications", () => {
cy.get('[data-hook="collapse-notifications"]').click();
cy.get('[data-hook="notifications-collapsed"]').should("be.visible");
});

Cypress.Commands.add("getCollapsedNotifications", () =>
cy.get('[data-hook="notifications-collapsed"]')
);
Expand Down Expand Up @@ -334,7 +406,9 @@ Cypress.Commands.add("logout", () => {
Cypress.Commands.add("executeSQL", (sql) => {
cy.clearEditor();
cy.typeQuery(sql);
cy.clickRun();
cy.intercept("/exec*").as("exec");
cy.clickRunIconInLine(1);
cy.wait("@exec");
});

Cypress.Commands.add("refreshSchema", () => {
Expand Down
Loading