Skip to content

Conversation

@Raubzeug
Copy link
Contributor

@Raubzeug Raubzeug commented Nov 24, 2025

Closes #3119

Stand

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
378 375 0 1 2
Test Changes Summary ⏭️2

⏭️ Skipped Tests (2)

  1. Scroll to row, get shareable link, navigate to URL and verify row is scrolled into view (tenant/diagnostics/tabs/queries.test.ts)
  2. Copy result button copies to clipboard (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: 🔺

Current: 66.10 MB | Main: 66.09 MB
Diff: +5.65 KB (0.01%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes issue #3119 by implementing functionality to insert the actual SHOW CREATE TABLE response into the query editor instead of a template. The implementation fetches the CREATE TABLE statement from the database and uses it directly.

Key changes:

  • Added a new RTK Query endpoint to fetch SHOW CREATE TABLE results for tables
  • Modified the schema template to use the fetched CREATE TABLE statement when available
  • Updated the SchemaTree component to trigger the API call and display loading state

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/store/reducers/showCreateTable/showCreateTable.ts New API endpoint using RTK Query to fetch SHOW CREATE TABLE results with query execution and response parsing
src/containers/Tenant/utils/schemaQueryTemplates.ts Modified template to return actual CREATE TABLE statement when fetched data is available
src/containers/Tenant/utils/schemaActions.tsx Added loading state handling and icon to the show create table action
src/containers/Tenant/utils/schema.ts Added new mapping constant for table types to path types
src/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.tsx Integrated lazy query hook to fetch and pass CREATE TABLE data with loading state

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Raubzeug Raubzeug added this pull request to the merge queue Nov 27, 2025
Merged via the queue into main with commit 247a570 Nov 27, 2025
9 checks passed
@Raubzeug Raubzeug deleted the fix-show-create branch November 27, 2025 08:02
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.

Improve Show create table

3 participants