Symptom
In the browser shell, a statement that ends with ; followed by a -- or /* */ comment stays on the continuation prompt (learn->) instead of running.
Examples that fail to submit:
SELECT 1; -- done
SELECT 1;/* done */
SELECT 1;\n-- done
Expected
isStatementComplete (and the shell docstring) treat the last non-comment, non-whitespace character as decisive — so these should submit like psql.
Red loop (already run)
import { isStatementComplete } from './components/shell/sql-complete.ts';
isStatementComplete('SELECT 1; -- x'); // got false, expect true
Where
components/shell/sql-complete.ts — final check is /;\s*$/, which does not skip trailing comments
- Called from
components/shell/readline.ts on Enter
Notes
Diagnosed with /diagnosing-bugs. Minimized repro is the three inputs above; plain SELECT 1; still works.
Symptom
In the browser shell, a statement that ends with
;followed by a--or/* */comment stays on the continuation prompt (learn->) instead of running.Examples that fail to submit:
SELECT 1; -- doneSELECT 1;/* done */SELECT 1;\n-- doneExpected
isStatementComplete(and the shell docstring) treat the last non-comment, non-whitespace character as decisive — so these should submit like psql.Red loop (already run)
Where
components/shell/sql-complete.ts— final check is/;\s*$/, which does not skip trailing commentscomponents/shell/readline.tson EnterNotes
Diagnosed with
/diagnosing-bugs. Minimized repro is the three inputs above; plainSELECT 1;still works.