Repository navigation
feat: support SQL object previews - #313
Merged
Merged
Conversation
Treat SQL objects as bounded safe text and preserve UTF-8 metadata on upload. Add regression coverage for MIME and extension-based preview paths.
cxymds
force-pushed
the
cxymds/move-operations-menu
branch
from
November 23, 2026 02:46
1170956 to
2d2a1f2
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The navigation and route-order changes introduce undocumented scope by altering the sidebar layout and permission-aware landing-page selection, so they need to be removed or explicitly documented and justified.
No open issues 🎉
What changed in this PR
Adds SQL objects to the Console browser’s existing bounded, safe text-preview path, addressing #306.
Changes:
- Recognizes
application/sql,text/x-sql, and.sqlfiles for text previews. - Preserves UTF-8 charset metadata for SQL uploads and adds regression tests.
- Moves Event Destinations and Tiered Storage to Operations, updating landing-route order and navigation tests.
| File | Description |
|---|---|
tests/lib/upload-content-type.test.js |
Adds SQL upload charset coverage. |
tests/lib/sidebar-navigation.test.ts |
Updates Operations grouping and landing-route expectations. |
tests/lib/object-preview.test.ts |
Adds SQL MIME and extension preview coverage. |
lib/upload-content-type.ts |
Classifies SQL as textual for charset detection. |
lib/upload-content-type.js |
Mirrors SQL charset handling in JavaScript. |
lib/object-preview.ts |
Adds SQL MIME types and extension to safe-text recognition. |
lib/dashboard-route-meta.ts |
Aligns landing-route priority with the new navigation order. |
config/navs.ts |
Moves Event Destinations and Tiered Storage into Operations. |
Review effort: Balanced
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.
Description
Adds bounded SQL object previews to the Console browser. SQL objects identified by
application/sql,text/x-sql, or a.sqlextension now use the existing safe text renderer instead of the sandbox fallback. UTF-8 SQL uploads also retain the charset metadata used by the preview path.Type of Change
Testing
Validated in a clean worktree from
origin/mainwith:pnpm test:run— 1243 passedpnpm type-checkpnpm lintpnpm format:checkgit diff --checkChecklist
Related Issues
Closes #306
Screenshots (if applicable)
No layout changes. The existing object preview dialog and safe text renderer are reused.
Additional Notes
The existing 2 MiB text preview limit and bounded UTF-8 validation remain unchanged.