Skip to content

fix(shell): 撤销页签等比填满,恢复固定上限+短名实际+长名省略号 - #1971

Merged
lqtdys merged 1 commit into
mainfrom
fix/1843-restore-fixed-width
Dec 2, 2026
Merged

lqtdys merged 1 commit into
mainfrom
fix/1843-restore-fixed-width

Conversation

@lqtdys

@lqtdys lqtdys commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

变更概述

撤销 #1970。维护者确认目标行为是 #1103 的固定宽度模型(页签标题在固定最大宽度内显示、短名按实际长度、长名以 … 结尾、不撑满整条页签栏),而非 #1970 误实现的 flex-1 等比填满。#1970 正是把 #1103/#1231 的「不伸展 + 固定上限」错误回退成「弹性填满」,本 PR 撤回。

关联 Issue

Closes #1843

变更内容

行为验证(对 4 条维护者要求)

  • 固定宽度上限:长标题页签宽度 ≤ --tab-max-width(256px),不随文件名无限撑宽 → 不挤掉后面页签。
  • 短名按实际长度:短名页签宽度 < 长名页签,不被撑到上限/保底。
  • 超长名以 … 收尾:标题 text-overflow: ellipsis、nowrap、实际被裁剪。
  • 不撑满整条:页签条 scrollWidth ≤ clientWidth 且留空白拖窗区。
  • 窄视口:页签等比收缩(宽度随可用宽度减小)。

验证方式

  • tsc 0 错;e2e tab-selection.spec.ts + tab-strip-dblclick.spec.ts 12 passed。
  • 证据探针(验证者独立跑):长名宽 ≤256 且 ellipsis;短名更窄;未铺满留白 >40px;窄视口各页签宽度不增。证据 .artifacts/1843/state-coverage.json(4 态 passed)。

质量门禁引用

风险评估

风险等级: low(撤销一次误合并,恢复用户既确认的 #1231/#1103 模型)
来源: ai-generated

回滚方案

git revert 即可回滚

@lqtdys lqtdys added risk-low CI 绿自动合并 ai-generated AI 生成 labels Dec 2, 2026
@lqtdys
lqtdys merged commit 160590e into main Dec 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated AI 生成 risk-low CI 绿自动合并

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] 页签标题未随窗口等比收缩(E2)

1 participant