Skip to content

Conversation

@shouples
Copy link
Contributor

@shouples shouples commented Oct 15, 2025

Summary of Changes

This PR removes the read-only limitation of the document that appears when clicking a statement item from the Flink Statements view in favor of an editable (untitled-scheme) document. This means instead of having to save a read-only statement document or copy and paste it into a new document, users can edit and resubmit (as a new statement) on the fly.

edit-statement.mov

Optional: Click-testing instructions

  1. Sign in to CCloud
  2. Select a Flink compute pool to populate the Flink Statements view
    • Optionally submit a Flink statement if none exist yet
  3. Click on an existing Flink statement item that appears in the view
  4. Expect the opened document to be editable and show the correct metadata from the original statement submission

Optional: Any additional details or context that should be provided?

  • src/documentMetadataManager.test.ts was reorganized to follow the file->class->method->test hierarchy, so line changes are inflated

Pull request checklist

Please check if your PR fulfills the following (if applicable):

Tests

  • Added new
  • Updated existing
  • Deleted existing

Release notes

  • Does anything in this PR need to be mentioned in the user-facing CHANGELOG?

@sonarqube-confluent

This comment has been minimized.

@shouples shouples marked this pull request as ready for review October 15, 2025 19:07
@shouples shouples requested a review from a team as a code owner October 15, 2025 19:07
Copilot AI review requested due to automatic review settings October 15, 2025 19:07
Copy link

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 removes the read-only limitation of Flink statement documents, allowing users to open them as editable documents instead. When clicking a Flink statement in the view, users now get an editable untitled document rather than a read-only one, enabling direct editing and resubmission.

Key changes:

  • Removed the FlinkStatementDocumentProvider class and its read-only document scheme
  • Updated viewStatementSqlCommand to create editable untitled documents with proper metadata
  • Simplified URI scheme handling to only support file and untitled schemes

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/documentProviders/flinkStatement.ts Completely removed the read-only document provider class
src/documentProviders/flinkStatement.test.ts Removed corresponding test file
src/commands/flinkStatements.ts Updated to create editable untitled documents instead of read-only ones
src/commands/flinkStatements.test.ts Updated tests to verify untitled document creation
src/extension.ts Removed FlinkStatementDocumentProvider from registered providers
src/flinkSql/flinkLanguageClientManager.ts Simplified URI scheme validation to only allow file/untitled
src/flinkSql/flinkLanguageClientManager.test.ts Updated tests to reflect new URI scheme restrictions
src/documentMetadataManager.ts Removed flinkstatement scheme from supported schemes
src/documentMetadataManager.test.ts Restructured tests and removed flinkstatement-specific test cases
CHANGELOG.md Added user-facing description of the new editable statement behavior

@sonarqube-confluent

This comment has been minimized.

@sonarqube-confluent
Copy link

Passed

Analysis Details

0 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 0 Code Smells

Coverage and Duplications

  • Coverage 88.90% Coverage (73.30% Estimated after merge)
  • Duplications No duplication information (0.50% Estimated after merge)

Project ID: vscode

View in SonarQube

@shouples shouples added the needs discussion Needs more input from the team(s) involved label Oct 17, 2025
@shouples shouples marked this pull request as draft October 17, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs discussion Needs more input from the team(s) involved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants