fix(ai): contain long markdown code blocks#1907
Open
openai0229 wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
CI baseline note: The
Current The affected files passed targeted ESLint locally, and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Closes #1905
Summary
prewrapper around the custom fenced-code renderer.prewithout widening the chat page.Affected surfaces
Verification
yarn eslint src/blocks/AI/index.tsx src/blocks/AI/style.ts --max-warnings=0- passed with zero warnings.yarn build:web:community- production Community Web build passed.git diff --check origin/main...HEAD- passed.playwright-cliagainst the Community dev frontend with a mocked SSE response containing one 4705 px SQL line.scrollWidthequaledclientWidth, the code block fit the assistant container, and the innerpreretainedscrollWidth > clientWidth.preand no redundant direct outerpre.Risk and compatibility
Reviewer map
chat2db-community-client/src/blocks/AI/index.tsxatrenderMarkdown, thensrc/blocks/AI/style.tsatcodeBlockWrapandcodeBlockPre.78e1beec5dd1c729460c8219cfb1609aa6c2ecf1.Contributor declaration
AI assistance: Substantial AI assistance was used for source tracing, implementation, and Playwright verification; the resulting diff was validated with targeted ESLint, a production Community Web build, and measured browser assertions.