Skip to content

Commit 46f39d5

Browse files
edyedy
authored andcommitted
fix(tui): per-file polish round 6 — feature-plugins Panel border
Panel snapshotted theme.border into a plain object spread into <box>, freezing the diff-viewer panel border color across theme switches. Read it through a getter so the spread stays reactive, matching the already-correct Separator in the same file.
1 parent 6cf16e7 commit 46f39d5

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

MERGE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ fork 与上游改了同一处(常见于 TUI 视觉/UX、core 加固逻辑)
201201
| 逐文件打磨轮3:`component/prompt/{autocomplete,index,move,workspace}.tsx` + 删除 `component/prompt/creating-dots.ts`、`component/workspace-label.tsx` | 中 | 保留 bug 修复:autocomplete `<Index>` 行内 8 个 setup 期常量改派生函数(行复用时 label/图标/颜色冻结)+ files resource 源补 `store.visible`(弹窗打开且查询未变时不刷新);index shell/斜杠命令失败补 error toast(原静默丢输入)+ extmark 样式 ID 改访问器(主题切换后指向已销毁 SyntaxStyle)+ interrupt 双击计数器补 clearTimeout/onCleanup(陈旧定时器清零新计数)+ 内联 reduce 换用 `expandPastedTextPlaceholders` + `basename ?? "image"` 改 `\|\|`;workspace 死 notice 改为成功 warp 弹 success toast(原 showNotice 从未渲染);删除死代码(Autocomplete sessionID prop、AutocompleteOption.disabled、move creatingDots/pendingNew、workspace label memo、creating-dots.ts 与 workspace-label.tsx 整文件)(上游若已做可取上游版本) |
202202
| 逐文件打磨轮4:`context/{sync,sdk,project,local,theme,route}.tsx` | 高/中 | 保留 bug 修复:sync `message.removed`/`message.part.removed``if (!messages/!parts) break`(未加载会话/被驱逐消息触发 `search(undefined)` 抛错杀死事件循环)+ `lsp.updated` 改无条件调用 debounce(默认无 workspace 时 LSP 状态不再刷新的回归)+ 会话列表排序改用与二分查找一致的码位比较(localeCompare 大小写次序不一致);sdk `onCleanup` 移出 `await` 之后(owner 已失效导致订阅永不清理)+ SSE 重连循环连接/迭代包 try/catch 并在收到事件后重置退避(一次网络错误即永久断连);project/local 事件订阅补 onCleanup;删除死代码(LocalTheme、RouteContext、SyncContext 解构、theme_mode 只写不读的持久化)(上游若已做可取上游版本) |
203203
| 逐文件打磨轮5:`routes/session/{index,dialog-message}.tsx` || 保留 bug 修复:TextPart `tableOptions` 由 setup 期字面量改 `createMemo`(原 `theme.border` 快照在主题切换后冻结表格边框色);`index.tsx` revert 分支与 `dialog-message.tsx` revert/copy/fork 四处 `sync.data.part[id].reduce``?? []`(消息 part 未加载时 `.reduce` 抛错);moveChild 方向语义(`- direction`)疑似与命令名相反但属上游行为,择要跳过(上游若已做可取上游版本) |
204+
| 逐文件打磨轮6:`feature-plugins/system/diff-viewer-ui.tsx``routes/session/{dialog-timeline,permission,dialog-fork-from-timeline,subagent-footer,question}.tsx`+`routes/home*.tsx`+`feature-plugins/{system/*,home/*}` 已审计) || 保留 bug 修复:`Panel` `borderProps.borderColor` 由 setup 期快照改 getter(`theme.border` 随对象展开保持响应式,原主题切换后 diff 查看器面板边框色冻结,`Separator` 已用 `() =>` 正确);fork `.data!.id` 无守卫(与 `dialog-message.tsx` fork 同款上游模式)择要跳过;`diff-viewer-file-tree-utils.moveFileTreeSelectionToFile` 仅测试引用但恐留待键位,暂不删(上游若已做可取上游版本) |
204205

205206
### 其他
206207

packages/tui/src/feature-plugins/system/diff-viewer-ui.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ export function Panel(props: Omit<JSX.IntrinsicElements["box"], "border"> & { bo
3838
? {}
3939
: {
4040
border: panelBorderSides(group?.axis ?? "y", border),
41-
borderColor: theme.border,
41+
get borderColor() {
42+
return theme.border
43+
},
4244
}
4345

4446
return (

0 commit comments

Comments
 (0)