fix: match the background task bar to the activity strip
- draw the task bar in the activity strip's capsule (8px margins, 14px padding, 36px min height, stadium radius) so the two read as one stack - drop the stop button from the bar: its padding pushed the clock off the right edge shared with the strip above; the row opens the sheet instead - in the sheet, show only the clock while running, a stop button with a stop icon, and "已结束" once the command ends; no "运行中" label and no close x (the drag handle and the scrim already close it) - say "读取输出…" while the first page loads instead of claiming the command has printed nothing - rest the pet's feet on the status capsule's edge (4px top margin) instead of sinking 2px into it
This commit is contained in:
1 parent
c4de5e84d8
commit
9564019a91
7 files changed
+142
-86
No files matched your search
@@ -5,6 +5,21 @@
|
||||
|
||||
---
|
||||
|
||||
## 0.4.15 后台任务条细节:外观一致、停止移到弹层、宠物站位(分支 `flutter`)
|
||||
|
||||
| 项 | 结果 |
|
||||
| --- | --- |
|
||||
| 外观一致 | 后台任务条改为与运行状态胶囊同一套形状:8 边距、14 水平内边距、36 最小高度、Stadium 圆角、相同的文字大小与基线,两条叠在一起时读作一组;多条任务在同一条胶囊里逐行排列 |
|
||||
| 停止 | 按反馈去掉任务条上的「停止」按钮:它会把右侧对齐从计时挤开,与上方运行条的右端对不齐。现在点任意一行打开弹层,停止与复制都在弹层里(确认框「停止这个任务?」不变) |
|
||||
| 弹层状态行 | 不再写「运行中」(弹层开着就是在跑,计时已经说明),也没有会让人误以为「点我刷新」的 `sync` 图标:左边只有计时;「停止」改成带方块停止图标的按钮;命令结束后才显示「已结束」 |
|
||||
| 弹层关闭 | 去掉右侧的 x:拖动把手下滑和点遮罩都能关,x 是多余的 |
|
||||
| 宠物 | 宠物站在最上方那条胶囊的边沿:有运行条或后台任务条时按它的 4px 上边距收脚,都不在时按输入框的 6px;之前会陷进胶囊顶边 2px |
|
||||
| 测试 | `test/shell_jobs_test.dart`:任务条不再有「停止」、点行回调打开弹层、计时仍在;80 项全过 |
|
||||
| 验证 | 模拟器:运行中 + 一条后台任务,两条胶囊等高同圆角;点任务行打开弹层:计时、带图标的「停止」与「复制」、实时输出与跟随,没有「运行中」字样与 x;首次读取时显示「读取输出…」转圈,不会误报「等待输出」;弹层内停止 → 确认 → shell 消失,弹层转为「已结束」并保留最后输出;从弹层头部下滑确实能关闭(x 去掉的前提);宠物在只有运行条、只有任务条、两者都有时都踩在胶囊上沿 |
|
||||
| 版本 | **0.4.15(code 415)** |
|
||||
|
||||
---
|
||||
|
||||
## 0.4.14 后台任务:状态条、实时输出与停止(分支 `flutter`)
|
||||
|
||||
| 项 | 结果 |
|
||||
@@ -17,7 +32,7 @@
|
||||
| 结束后 | 命令结束后,工具行与弹层不再轮询,改用会话里 synthetic `<background-result kind="shell" …>` 的最终输出(shell 被删除后仍能看);如果是用户在 App 里停的,显示「用户停止了这条命令。」而不是 Shell.NotFoundError |
|
||||
| 刷新 | 打开会话立即刷新,之后 3 秒一次;会话消息变化时也刷新(新任务立刻出现);服务端无该接口时停止轮询 |
|
||||
| 测试 | 新增 `test/shell_jobs_test.dart`:后台标记识别(前台命令不算)、转录/任务/外壳列表解析、输出页、完成说明与停止标记、计时格式、停止说明,以及状态条 1 条/2 条/多条折叠的布局;80 项全过 |
|
||||
| 验证 | 模拟器(真实任务):`sleep 900` 单条任务条 → 第二条命令变为「正在执行 2 条命令」+ 两条行;弹层实时输出(每秒 tick);弹层内「停止」→ 确认 → 任务与 shell 消失、模型收到 synthetic 停止说明;工具行「后台」标签 + 展开后的最终输出/「用户停止了这条命令。」 |
|
||||
| 验证 | 模拟器(真实任务):`sleep 900` 单条任务条 → 第二条命令变为「正在执行 2 条命令」+ 两条行;弹层实时输出(每秒 tick);弹层内「停止」→ 确认 → 任务与 shell 消失、模型收到 synthetic 停止说明;工具行「后台」标签 + 展开后的最终输出/「用户停止了这条命令。」。后台进程可用前台命令超时后「移到后台」的方式启动(`timeout` 5 秒、不加 background),这样不会像 `background: true` 那样在超时点被 SIGKILL,任务会一直跑到手动停止 |
|
||||
| 版本 | **0.4.14(code 414)** |
|
||||
|
||||
---
|
||||
|
||||
Reference in new issue
Block a user