feat: 原创「环序」标志;双视图与侧栏优化;工位管理;帮助完善

- 原创应用标志「环序/Cycle-Step」:tools/gen-icon.py 重写 + 工具栏 Logo 同源,小尺寸简化版

- 条形时序视图:标题/副标题精简、双刻度值置于分区与刻度线之间、时间默认内嵌、依赖线箭头收窄、同泳道箭头接色块外侧、图注自动避让

- 圆周时序视图:去掉色块描边、环宽与间隙优化、度数外侧标时间、方向箭头外移;固定顺时针(移除逆时针)

- 左侧栏:编辑工位/编辑相位分区入口;双击画布色块或动作行进入编辑;至少保留一个动作/泳道

- 右侧栏:移除重复的编辑操作、导出与单位卡片;文件浏览器新增「桌面」快捷入口

- AI 对话框:字号优化并新增「编辑示例」;节拍统计移除无依据的预估产能

- 文档:README 与 docs/HELP.md 全面更新;dist 同步重建
This commit is contained in:
admin
2026-09-18 23:32:36 +08:00
parent 71e84e05aa
commit 43c99fc4b6
18 changed files with 1079 additions and 779 deletions
+38
View File
@@ -0,0 +1,38 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:sequence_diagram/model/models.dart';
import 'package:sequence_diagram/state/app_controller.dart';
void main() {
group('station management', () {
test('setStations reassigns actions of a removed station', () {
final AppController c = AppController(project: Project.demo());
expect(c.project.stations.length, 2);
final String removed = c.project.stations[1].id;
expect(c.project.actions.any((Action a) => a.stationId == removed), isTrue);
c.setStations(<Station>[c.project.stations.first]);
expect(c.project.stations.length, 1);
expect(c.project.actions.every((Action a) => a.stationId == c.project.stations.first.id), isTrue);
expect(c.canUndo, isTrue);
});
test('setStations ignores an empty list (keep at least one station)', () {
final AppController c = AppController(project: Project.demo());
final int before = c.project.stations.length;
c.setStations(<Station>[]);
expect(c.project.stations.length, before);
});
test('setStations can add and rename stations', () {
final AppController c = AppController(project: Project.demo());
final List<Station> next = <Station>[
...c.project.stations,
const Station(id: 'ST3', name: '工位 3', order: 2, color: 0xFF4ADE80),
];
c.setStations(next);
expect(c.project.stations.length, 3);
expect(c.project.stationById('ST3')?.name, '工位 3');
});
});
}