Repository navigation
feat(dashboard): settle layout selection after resize - #534
Merged
Merged
Conversation
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.
目标与变更范围
dashboard-widgets。[304px, 384px),再断言4x5fixture。基线及 ref 对齐记录
6317cad35bfd94c4257bc3b0a172f331bc924853。9f72efe292975b13b5d9018a9f5641ffbb071c27,工作区干净。frontend/nyanpasu/src/pages/(main)/main/dashboard/index.tsx的SETTLED_RESIZE_MS/handleSizeChange→ Chimerafrontend/chimera/src/pages/(main)/main/dashboard/index.tsx;reffrontend/ui/src/dnd-grid/use-grid-layout.ts的尺寸计算 → 同路径 Chimera DndGrid。floor((width + gap) / (minCellSize + gap))。Chimera 保留其64pxcell、16pxgap 和 200ms settling;拖拽交互的 defer 是必要的 Chimera 扩展。DIFF-061 记录在docs/ref-alignment-progress.md。800×636,最小400×600。本 PR 不修改它。用户入口及业务调用链
主 UI Dashboard →
DndGrid的 ResizeObserver 尺寸 →handleSizeChange→ 200ms settle timer →selectForSize。布局投影保持内存态,保存值保持不变。E2E 通过真实桌面窗口尺寸变化验证此路径;未覆盖同时拖动和窗口 resize。风险等级与审批
实际验证
pnpm typecheck:e2e683a497c6123f852c2f6184c031d337d2be55342git diff --check未在本机运行完整桌面 E2E;远端 Windows run 是此用例的真实桌面验证。旧 SHA 的运行结果不代表当前 head 已通过。
失败诊断与隐私
旧 head
77f00cd6的 Windows run40442050131中,测试请求 680px 后实际 WebView viewport 为 664px,网格仍可显示 8 列;测试却只检查<800px,因此错误地期待4x5fixture。当前测试要求 viewport 和网格容器都处在能形成四列的实际尺寸区间。该失败没有证明产品实现偏离 ref。同一旧 run 的 Profile auto-update main-first 回归也单次失败在 legacy 编辑框等待;该 Profile 源码/测试不属于本 PR 改动,基线 run
40424102601的 Desktop suites 全通过,需由最终 head 的 E2E 结果确认是否复现。截图和 HTML 是隔离 E2E runtime 的原始采集文件,不要未经检查转发。独立 Reviewer
独立只读审查没有发现 P0–P2 阻塞。复核确认 400px 最小窗口目标与 Windows WebDriver 尺寸行为兼容,并补充测量
[304px, 384px)的 DndGrid 容器范围,避免更窄网格仍选中同一最近布局。审查未运行测试;最终 Windows E2E 仍待完成。远端状态及合并
683a497c6123f852c2f6184c031d337d2be55342,GitHub 签名验证为 Verified。