feat(sql): add SQL landing/overview page#2541
Draft
c-julin wants to merge 2 commits into
Draft
Conversation
Add a standalone landing/overview page as the default view for the /sql route, independent from the query editor studio. SqlPage switches between the landing and the editor (which gains a back-to-overview affordance); shared catalog/identity fetching is extracted into useSqlCatalogs. The landing renders only the data that has a real backend today (catalogs and tables, role, recent queries from localStorage, derived counts). Observability metric tiles and the connection-details card from the design have no backend yet and are documented as capability-gated extension points, so standalone deployments degrade gracefully without placeholder numbers.
Contributor
✅ Clean — no registry drift, off-token colours, or ad-hoc classesApp:
Generated by lookout audit-changes. |
Match the landing page layout width to line up with other pages and reduce unused space. The catalog and query rows used bg-selected-hover, an undefined token, so hovering did nothing; they were also plain buttons with no pointer cursor. Bump the catalog header to text-sm so it is no longer smaller than the table rows it groups.
3cacc69 to
1cfbf54
Compare
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.
What
Adds a standalone landing/overview page as the default view for the
/sqlroute, independent from the query editor studio. Ported from the "RP SQL" design.sql-page.tsx— new/sqlroute component. Holds the view state (landing | editor, persisted per session) and switches between two independent experiences.sql-landing.tsx— the standalone overview: hero, derived-metric strip, catalogs & tables, suggested queries, recent queries, docs. No studio chrome.sql-workspace.tsx— the editor studio is now editor-only, with a back-to-overview arrow in its header, and accepts entry intent (seedQuery/autoRun/openWizardOnMount) from the landing.use-sql-catalogs.ts— shared catalog/identity/tables fetching, used by whichever view is mounted (only one at a time, so no double-fetch).Capability gating (embedded vs standalone)
The design shows data that has no backend in either deployment yet — observability metric tiles (queries·24h, p50 latency, bytes scanned, bridge-lag) and the connection-details card (host/port/JDBC/psql). The landing renders only the real, wireable data today (catalogs & tables, role, recent queries from
localStorage, derived counts), so standalone deployments degrade gracefully with no placeholder numbers. The unbacked sections are documented as capability-gated extension points insql-landing.tsx.Testing
sql-landing.test.tsx— 6 new tests (populated overview, suggested-query run, open-editor, recent-from-history, admin/viewer onboarding).ultracitelint clean.