Skip to content

fix(sql-editor): FoxScript review fixes (tokens, Out[n], CRLF, Play) - #126

Merged
huyplb merged 1 commit into
mainfrom
cursor/foxscript-7e48
Jul 29, 2026
Merged

fix(sql-editor): FoxScript review fixes (tokens, Out[n], CRLF, Play)#126
huyplb merged 1 commit into
mainfrom
cursor/foxscript-7e48

Conversation

@huyplb

@huyplb huyplb commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up after Bugbot + Security review of the FoxScript / notebook SQL Editor work (already on main via #124/#125).

Bugbot fixes

  • Monaco semantic tokens: 0-based line/column deltas (table/column highlights were shifted)
  • Virtual docs: slice parent buffer for cell body (CRLF-safe hover/complete projection)
  • Fence markers: allow trailing \r
  • Out [n] aligns with In [n] via ranStatementIndices
  • SQL cell ▶ disabled (with warning) when no Destination is checked
  • SQL completions suppressed inside code fences (reuse projectToVirtualDoc)

Security

  • No medium+ findings; Safe mode / password / write-confirm still gate per-cell Play
  • No new execution or eval paths; kept reusing parseSetDirectives / existing splitter

Test plan

  • vitest 618 passed
  • tsc --noEmit for apps/web
  • Manual: schema-loaded SQL identifiers tint correctly; Play on SQL without destination shows warning / disabled; run cell 3 alone → Out [3]
Open in Web Open in Cursor 

- Encode Monaco semantic tokens as 0-based line/column deltas
- Build virtual docs from parent buffer slices (CRLF-safe projection)
- Recognize fence markers with trailing CR; align Out [n] with In [n]
- Disable SQL cell Play without a Destination; suppress SQL suggests in fences

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
@huyplb
huyplb marked this pull request as ready for review July 29, 2026 00:34
@huyplb
huyplb merged commit de35f6e into main Jul 29, 2026
6 checks passed
@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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: serverGenReqId_cae12afd-6087-4968-9fb4-9e211e63de96)

@huyplb
huyplb deleted the cursor/foxscript-7e48 branch July 29, 2026 00:35
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.

2 participants