Repository navigation
fix(ui): 模型与思考强度弹层的思考强度/接口栏改用独立横向滚动容器 - #251
Merged
Merged
Conversation
PR 安全初筛 / Safety pre-check改动 3 个文件;高 0 项、中 0 项。 没发现需要特别留意的地方。自动初筛只能挡明显的,合并前仍需人工看过。 |
This branch was successfully 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.
现象与根因
在「模型与思考强度」弹层(
#model-pick)中,当接口数量较多/名称较长或思考强度档位过多时,对应分段栏会被直接裁断且无法左右滑动:overflow-x: auto)直接写在.mp-seg自身,而拾色主题在gateway/web/style.css靠后位置定义了更高优先级的html[data-skin="shise"] .seg { overflow: hidden },直接覆写并锁死了.mp-seg的横向滚动(同时导致手势让路检测/auto|scroll/.test(getComputedStyle(el).overflowX)失效)。.seg自身滚动也会在滚出右边界时出现背景色/圆角截断问题。修复方案
gateway/web/app/12-model-caps.js:将「思考强度」与「接口」两排分段控件统一包裹在独立的横向滚动容器<div class="seg-scroll mp-scroll">…</div>中(.mp-provhint留在滚动容器外保持左对齐),与会话页 / 脉络页 / 档案页的.seg-scroll模式对齐;「思考强度」渲染时同步对当前选中项调用scrollIntoView({ block: "nearest", inline: "nearest" })。gateway/web/style.css:.mp-scroll承接overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x; scrollbar-width: none,给.mp-eff/.mp-prov补齐min-width: 0。.mp-seg改为min-width: 100%; width: max-content; box-sizing: border-box:内容未超宽时仍占满整行均分,超宽时随内容自然撑开并由外层.mp-scroll横向滚动,各皮肤边框与圆角完整保留且不再受shise.seg { overflow: hidden }影响。gateway/tests/ui-skin-contrast.test.mjs:在样式覆写守卫中补充第 8 项回归断言。验证
app.js29 模块 VM 语法校验通过node scripts/test.mjs:ui-skin-contrast(3/3)、replay-flush-179(2/2)、stab-b-client(9/9)、a0610-f1-frontend(20/20)、a0610-f3-frontend(23/23) 全通过node scripts/pr-guard.mjs origin/main HEAD:高 0 项、中 0 项