feat(wren-ui): Update View SQL tab content and add adjust SQL UI#1484
feat(wren-ui): Update View SQL tab content and add adjust SQL UI#1484fredalai merged 8 commits intoepic/adjust-answerfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
26f49fd to
1d63986
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the SQL UI in Wren UI by replacing the legacy SQL breakdown functionality with a new Adjust SQL feature. Key changes include:
- Removing the old SQL breakdown UI and associated hooks and components.
- Introducing a new Adjust SQL modal with preview and submission functionalities.
- Updating the store and answer components to support the Adjust SQL feature.
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| wren-ui/src/pages/home/[id].tsx | Added AdjustSQLModal import, initialized modal actions, and integrated modal opening in thread handlers. |
| wren-ui/src/hooks/useAnswerStepContent.tsx | Removed the legacy SQL breakdown hook and related UI actions. |
| wren-ui/src/components/pages/home/promptThread/store.tsx | Added new store function for opening the Adjust SQL modal. |
| wren-ui/src/components/pages/home/promptThread/ViewSQLTabContent.tsx | Created a new component to view SQL and trigger Adjust SQL modal. |
| wren-ui/src/components/pages/home/promptThread/TextBasedAnswer.tsx | Integrated Adjust SQL modal invocation on adjustment action. |
| wren-ui/src/components/pages/home/promptThread/AnswerResult.tsx | Replaced the old BreakdownAnswer with the new ViewSQLTabContent and added a placeholder for adjustment information. |
| wren-ui/src/components/modals/AdjustSQLModal.tsx | Introduced a new modal component for adjusting SQL with preview and submission behavior. |
| wren-ui/src/components/editor/CodeBlock.tsx | Updated the copyable implementation with custom icon buttons and adjusted spacing. |
Files not reviewed (1)
- wren-ui/src/styles/components/button.less: Language not supported
Comments suppressed due to low confidence (1)
wren-ui/src/components/editor/CodeBlock.tsx:46
- [nitpick] Verify that the increased right margin for the copyable text aligns with the overall UI design standards, as this seems to be a deliberate design change.
right: 20px;
1d63986 to
a3590b2
Compare
b55bdf7 to
dad6ed3
Compare
dad6ed3 to
209eb12
Compare
Description
This PR introduces the new Adjust SQL feature and removes the SQL breakdown function.
Here, only update the UI components first, and APIs integration will be completed through other PRs.
Task
UI
View SQL tab content
For allow show original SQL
Adjust SQL Modal
Adjusted answer block