Skip to content

chore(JB): cleanup applyToFile logic #5680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 16, 2025
Merged

Conversation

Patrick-Erichsen
Copy link
Collaborator

@Patrick-Erichsen Patrick-Erichsen commented May 15, 2025

Summary by mrge

Refactored the IntelliJ apply-to-file logic into a new ApplyToFileHandler class for better structure and testability, and updated related types and usages across the codebase.

  • Refactors
    • Moved apply-to-file logic out of IdeProtocolClient into ApplyToFileHandler.
    • Updated type names (e.g., ApplyState → UpdateApplyStatePayload) and their usage in both frontend and backend.
    • Added unit tests for ApplyToFileHandler and improved editor utility functions.
    • Creates a rule to specify test execution for Jetbrains unit tests
    • Expands the EditorUtils with additional editor related functionality

@Patrick-Erichsen Patrick-Erichsen requested a review from a team as a code owner May 15, 2025 04:51
@Patrick-Erichsen Patrick-Erichsen requested review from tomasz-stefaniak and removed request for a team May 15, 2025 04:51
Copy link

netlify bot commented May 15, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit 49d65f6
🔍 Latest deploy log https://app.netlify.com/projects/continuedev/deploys/68279a1e302dac000806436c

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label May 15, 2025
Copy link

github-actions bot commented May 15, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Patrick-Erichsen
Copy link
Collaborator Author

Patrick-Erichsen commented May 15, 2025

I have read the CLA Document and I hereby sign the CLA

1 similar comment
@Patrick-Erichsen
Copy link
Collaborator Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request May 15, 2025
@Patrick-Erichsen Patrick-Erichsen requested review from RomneyDa and removed request for tomasz-stefaniak May 15, 2025 20:09
@@ -47,7 +47,7 @@ type SessionState = {
symbols: FileSymbolMap;
mode: MessageModes;
codeBlockApplyStates: {
states: ApplyState[];
states: UpdateApplyStatePayload[];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since CodeToEdit and ApplyState are stored statefully and passed around in other places, I think the original naming makes more sense than adding payload, and is more concise

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

@Patrick-Erichsen does this include that last bug we found with partial rejection/acceptance messing up the file or should we open new ticket for that?

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs May 16, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 16, 2025
@Patrick-Erichsen
Copy link
Collaborator Author

@RomneyDa that is fixed in a subsequent PR 👍

@Patrick-Erichsen Patrick-Erichsen merged commit e55404f into main May 16, 2025
35 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs May 16, 2025
@Patrick-Erichsen Patrick-Erichsen deleted the pe/jb-apply-fixes branch May 16, 2025 21:54
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants