Skip to content

v0.2.0 — Adaptive Conversation Navigation Rail

Choose a tag to compare

@BananaSoldier01 BananaSoldier01 released this 22 Aug 12:31
· 22 commits to main since this release

本次内容(自 0.1.5)

左缘定位条从「固定列表」升级为 Canvas Minimap 全局导航

  1. 固定高度 + 自适应min(min(70vh,660px), max(48px, 轮次×12px))——轮次少时按 12px/轮 收紧(间距紧凑),轮次多时封顶
  2. Turn 全局均匀映射y = index/(total-1) × railHeight;仅 1 个 canvas + 1 个提示卡,不随 turn 数增长 DOM(2000 turn 每帧 O(N) 矩形无压力)
  3. 鱼眼 hover:hover 附近 ±4 turn 间距放大、远处自动压缩;命中测试与绘制共用同一布局函数(所见即所得,二分命中)
  4. Drag scrubbing:pointer 捕获,拖动时仅预览目标 turn,松手才跳转
  5. 当前 turn 高亮:以「阅读区顶部」为准(含 header 偏移);行位置缓存按「行数/内容高度」变化自动重建(修复折叠导致的坐标漂移),滚动 rAF 节流 + 二分检测
  6. 精确跳转scrollTo 计算,用户消息滚到阅读区顶部(非 viewport 中心、不埋进 header)
  7. 主题自适应:颜色从 CSS 变量读取(深浅色),DPR 处理

兼容性:fold / divider / autoload / diagnostics 均不受影响(rail 数据来自会话快照,与折叠的 CSS 隐藏无关)。

安装 / 更新

dsh plugin --profile web add git+https://github.com/BananaSoldier01/dsh-tidychat.git#v0.2.0
# 或从 main 更新
dsh plugin --profile web update @bananasoldier01/dsh-tidychat

下一版本(候选)

  • Turn Index 层(fold/navigator/autoload 共享索引,替代每次全量扫描)
  • 运行中回合的已完成步骤折叠(issue #2