Skip to content

don't expand edit tool codeblocks by default #6467

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 4 commits into from
Jul 5, 2025
Merged

Conversation

sestinj
Copy link
Contributor

@sestinj sestinj commented Jul 5, 2025

Description

Improving the UI for edit tool call UI

  • Collapsed code blocks by default (diff automatically shows up in the editor)
  • Max height with ability to toggle if you do expand it

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Summary by cubic

Code blocks in the edit tool are now collapsed by default to reduce clutter and make the UI cleaner. The diff still appears in the editor, and users can expand code blocks if needed.

Copy link

netlify bot commented Jul 5, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit 923b7e7
🔍 Latest deploy log https://app.netlify.com/projects/continuedev/deploys/6868bd17f8c3190008a60267

@sestinj sestinj marked this pull request as ready for review July 5, 2025 16:31
@sestinj sestinj requested a review from a team as a code owner July 5, 2025 16:31
@sestinj sestinj requested review from Patrick-Erichsen and removed request for a team July 5, 2025 16:31
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 5, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic found 1 issue across 4 files. Review it in cubic.dev

React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.

@@ -18,12 +18,13 @@ export function EditFile(props: EditToolCallProps) {

return (
<StyledMarkdownPreview
expandCodeblocks={props.expandCodeblocks ?? false}
expandCodeblocks={false}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hardcoding expandCodeblocks to false removes the ability to control code block expansion via props, which may break expected behavior if other components rely on this prop for dynamic expansion.

Suggested change
expandCodeblocks={false}
expandCodeblocks={props.expandCodeblocks ?? false}

@sestinj sestinj merged commit ea5e7e3 into main Jul 5, 2025
42 checks passed
@sestinj sestinj deleted the nate/diff-ui-edit branch July 5, 2025 17:30
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PRs Jul 5, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2025
@sestinj
Copy link
Contributor Author

sestinj commented Jul 22, 2025

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
released size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant