fix(control): improve storyline history and graph launch
Append history on revisit instead of truncating, highlight the latest duplicate entry, add Start from this scene to the graph context menu, and keep storyline state isolated from project graph edits. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -77,6 +77,32 @@ void test('ControlApp: сюжетная линия — колонка сверх
|
||||
assert.match(css, /\.branchCard[\s\S]*?background:\s*var\(--color-overlay-dark-2\)/);
|
||||
});
|
||||
|
||||
void test('ControlApp: клик по истории добавляет новый шаг, не подавляет запись', () => {
|
||||
const src = readControlApp();
|
||||
assert.ok(!src.includes('suppressNextHistoryPushRef'));
|
||||
assert.ok(!src.includes('arr.includes(cur)'));
|
||||
assert.ok(src.includes('historyRef.current = [...arr, cur]'));
|
||||
});
|
||||
|
||||
void test('ControlApp: текущая сцена в истории — последнее вхождение', () => {
|
||||
const src = readControlApp();
|
||||
assert.ok(src.includes('history.lastIndexOf(currentGraphNodeId)'));
|
||||
assert.ok(src.includes('idx === currentHistoryIdx'));
|
||||
});
|
||||
|
||||
void test('ControlApp: сюжетная линия не меняет граф и сцены проекта', () => {
|
||||
const src = readControlApp();
|
||||
const story = src.indexOf("t('control.storyLine')");
|
||||
assert.ok(story !== -1);
|
||||
const tail = src.slice(story);
|
||||
assert.ok(!tail.includes('addSceneGraphNode'));
|
||||
assert.ok(!tail.includes('removeSceneGraphNode'));
|
||||
assert.ok(!tail.includes('addSceneGraphEdge'));
|
||||
assert.ok(!tail.includes('removeSceneGraphEdge'));
|
||||
assert.ok(!tail.includes('updateProject'));
|
||||
assert.ok(tail.includes('ipcChannels.project.setCurrentGraphNode'));
|
||||
});
|
||||
|
||||
void test('ControlApp: слой кисти не использует курсор not-allowed (ластик тоже crosshair)', () => {
|
||||
const src = readControlApp();
|
||||
const css = readControlAppCss();
|
||||
|
||||
Reference in New Issue
Block a user