Add interactive SQL parser dashboard command - #67
Conversation
Quality resultsQuality gate: success
CLI line, branch, method, and full method coverage must each reach 100%. A missing report is shown as unavailable. See the linked run for test failures, detailed CLI/Site coverage summaries and HTML reports, and scanner results. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85fbb5f454
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| private static string Fit(string text, int width) | ||
| { | ||
| string safe = Safe(text); | ||
| return safe.Length > width ? safe[..width] : safe.PadRight(width); |
There was a problem hiding this comment.
Account for terminal display width when fitting rows
When a filename, identifier, or SQL line contains CJK characters, emoji, or combining marks, string.Length does not equal the number of terminal cells occupied. A row containing double-width glyphs can therefore exceed the reserved final column and wrap, corrupting the dashboard layout; truncation may also split a surrogate pair. Fit, truncate, pad, and horizontally pan content using terminal display-cell width rather than UTF-16 code-unit count.
Useful? React with 👍 / 👎.
Adds
syncsql parser --file <path.sql>to inspect SQL Server and Oracle scripts in a read-only terminal dashboard without a database connection. Seven views expose the syntax tree, tokens, referenced objects, aliases, columns, parse diagnostics, and source, with keyboard navigation, filtering, and detail scrolling.--engine oracleselects PL/SQL;--plainand redirected terminals print a text report.The console boundary is isolated so tests exercise navigation, resize, cancellation, and terminal disconnection. Ctrl+C mode is restored even if writing the terminal cleanup sequence fails. Parser tests cover legacy SQL fallback, lexer diagnostics, semantic references, source positions, and invalid/empty input.
Validation:
85fbb5f4549a276e6879a06fc478fec7ddbe4b6a.The coverage failure reported by the quality bot is fixed. The final Quality gate awaits C# CodeQL; see the current run.