Repository navigation
fix(macos): 限制场景长提示词编辑与预览的布局高度 - #52
Open
xiangleili wants to merge 1 commit into
Open
xiangleili wants to merge 1 commit into
xiangleili wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
问题
在 macOS 版粘贴较长的多行场景提示词后,用户报告重新进入「场景」页时出现卡顿或无响应。当前编辑器使用自适应高度的多行
TextField,完整预览则使用没有高度限制的Text,两者位于设置页的外层ScrollView中。本地环境为 Apple Silicon、macOS 26.1、微信流 0.1.15 (23)。排查时重新进入页面未稳定复现持续挂起,采样也没有捕获到阻塞调用栈,因此本 PR 仅针对已识别的长文本布局风险,不声称已证实全部卡死根因。
改动
NSScrollView+NSTextView,视口高度固定为 160 点,内部换行与垂直滚动,完整保留提示词。验证
ScenePromptTextViewTests,覆盖外层 SwiftUI 滚动容器中的固定视口、2,000 段合成长文本的完整性与末尾滚动、只读预览、选择及滚动位置保持、技能插入绑定同步、中文输入组合保护。swift Scripts/check-localizations.swift:通过(zh-Hans / en)。git diff --check:通过。swift test --filter ScenePromptTextViewTests在执行测试前因缺少 SDKPlatformPath失败;完整测试结果以兼容环境中的 CI 为准。action_required,等待维护者批准后执行;尚无完整 CI 测试结果。完整应用回归建议
使用不含真实聊天内容的合成中文多行提示词,检查粘贴、编辑、滚动到末尾、切换场景、离开并重新进入「场景」页,以及技能插入、中文输入、撤销和预览复制。该 PR 未修改本机已安装的应用或用户场景数据,也未包含用户提示词、聊天内容、截图或原始进程采样。