fix(core,extensions): 창 크기 변경 후 저장 시 편집기 본문이 사라지던 문제

저장소 B(_global._local)를 동기화하는 두 지점이 저장소 A 계열 스냅샷을 그대로
넘겨 왔다. setGlobalState 는 _local 을 얕게 병합하므로 그 쓰기는 patch 가 아니라
통째 교체이며, A 가 아직 받지 못한 값 — CKEditor 가 setLocal({render:false,
selfManaged:true}) 로 B 에만 쓴 본문 — 이 예외도 로그도 없이 사라진다.

handleSetState COMPONENT 분기의 B 쓰기와 sequence 반환값을 함께 live B 기반으로
바꾼다. 요청 body 는 B 가 아니라 그 반환값에서 오므로, B 쓰기만 고치면 저장은
여전히 422 가 난다. 같은 형태의 setParentLocal 도 함께 정정했다.

트리거는 브레이크포인트 교차가 아니라 19px 폭 변경이다 — 모바일 URL바 숨김·
가상키보드·화면 회전이 모두 해당한다. 작성 화면은 422 로, 수정 화면은 성공
토스트와 함께 조용한 데이터 손실로 나타났다.

함께 담은 것:
- ckeditor5: 미리보기 입력이 설정으로 저장되던 문제, 본문만 고치면 저장 버튼이
 비활성으로 남던 문제
- board: 일괄 적용 확인 창의 항목 목록이 통째로 렌더되지 않던 문제(표현식
 평가기가 콜백 안 멤버 대입을 거부), 「금지어」 라벨 누락
- 확장 문서의 Playwright 명령이 코어 config 를 잡아 "No tests found" 로 조용히
 0건이 지나가던 문제
This commit is contained in:
HeuJung committed 2026-09-01 18:08:40 +09:00
1 parent da5f76a9d8
commit cd189190c2
41 files changed
+1899 -117

No files matched your search

@@ -2,14 +2,10 @@
namespace Tests\Feature\Documentation;
use App\Support\ExtensionDoc\DataModelCollector;
use App\Support\ExtensionDoc\DeclarativeSurfaceCollector;
use App\Support\ExtensionDoc\DependencyGraphCollector;
use App\Support\ExtensionDoc\ExtensionDocContext;
use App\Support\ExtensionDoc\ExtensionDocScaffolder;
use App\Support\ExtensionDoc\ExtensionInventory;
use App\Support\ExtensionDoc\FrontendInventory;
use App\Support\ExtensionDoc\HookInventory;
use App\Support\ExtensionDoc\TestPathCollector;
use Tests\TestCase;
@@ -436,19 +432,19 @@ class ExtensionDocContractTest extends TestCase
*/
public function test_empty_intent_axis_agrees_across_tooling(): void
{
$filled = "<!-- @intent START -->
$filled = '<!-- @intent START -->
서술이 있다.
<!-- @intent END -->";
$empty = "<!-- @intent START -->
<!-- @intent END -->';
$empty = '<!-- @intent START -->
<!-- @intent END -->";
<!-- @intent END -->';
$this->assertSame(0, ExtensionDocScaffolder::emptyIntentBlocks($filled));
$this->assertSame(1, ExtensionDocScaffolder::emptyIntentBlocks($empty));
$this->assertSame(2, ExtensionDocScaffolder::emptyIntentBlocks($empty."
".$empty));
$this->assertSame(1, ExtensionDocScaffolder::emptyIntentBlocks($filled."
".$empty));
$this->assertSame(2, ExtensionDocScaffolder::emptyIntentBlocks($empty.'
'.$empty));
$this->assertSame(1, ExtensionDocScaffolder::emptyIntentBlocks($filled.'
'.$empty));
$script = (string) file_get_contents(base_path('.claude/scripts/check-extension-docs.cjs'));
@@ -1341,4 +1337,80 @@ class ExtensionDocContractTest extends TestCase
// 결과는 "생성기를 다시 돌려라" 인데 아무리 돌려도 사라지지 않는 드리프트다.
return app(ExtensionDocContext::class)->build($record);
}
/**
* 문서가 싣는 Playwright 명령이 그 확장의 config 를 잡는지 단언합니다.
*
* 확장은 자기 config 를 `tests/Playwright/playwright.config.ts` 에 두므로, 저장소
* 루트에서 spec 경로만 넘기면 코어 config(`testDir: tests/Playwright/specs`)가 잡혀
* 그 spec 이 모집단 밖이 됩니다. 결과는 실패가 아니라 **"No tests found"** 입니다 —
* 문서대로 따른 사람은 테스트를 돌렸다고 믿는데 0건이 지나가고, 코어 globalSetup 이
* 개발 사이트에 시드 화면을 설치·제거하는 부작용만 남습니다.
*
* 모집단은 열거하지 않고 실측에서 파생합니다 — Playwright 테스트를 새로 갖추는 확장이
* 생기면 자동으로 편입됩니다.
*/
public function test_playwright_command_resolves_the_extension_config(): void
{
$collector = new TestPathCollector;
$checked = [];
foreach ((new ExtensionInventory)->collect('all') as $record) {
$collected = $collector->collect($record);
// 명령 문자열이 아니라 **라벨**로 고른다 — 명령은 `npm run test:e2e` 처럼
// 도구 이름을 담지 않을 수 있고, 그러면 이 검사가 대상을 못 찾은 채 통과한다.
$command = null;
foreach ($collected['commands'] as $entry) {
if (str_contains($entry['label'], 'Playwright')) {
$command = $entry['command'];
break;
}
}
if ($command === null) {
$this->assertSame(
0,
$collected['playwright']['count'],
"{$record['type']}:{$record['id']} — Playwright 테스트가 있는데 실행 명령이 없습니다.",
);
continue;
}
$rel = $record['relPath'];
$config = $record['path'].DIRECTORY_SEPARATOR.'tests'.DIRECTORY_SEPARATOR
.'Playwright'.DIRECTORY_SEPARATOR.'playwright.config.ts';
$this->assertFileExists(
$config,
"{$rel} — Playwright 명령을 싣는 확장은 자기 config 를 가져야 합니다.",
);
// 확장 디렉토리로 이동하거나(그 자리의 npm 스크립트가 --config 를 품는다),
// 명령이 직접 --config 를 지목하거나. 둘 중 하나여야 코어 config 를 피한다.
$entersExtensionDir = str_contains($command, "cd {$rel} &&");
$namesConfig = str_contains($command, '--config=');
$this->assertTrue(
$entersExtensionDir || $namesConfig,
"{$rel} — 명령이 코어 config 를 잡습니다(실행 결과가 \"No tests found\"). "
."확장 디렉토리로 이동하거나 --config 를 지목해야 합니다: {$command}",
);
$this->assertStringNotContainsString(
"npx playwright test {$rel}/tests/Playwright/specs/",
$command,
"{$rel} — 루트 기준 spec 경로 형태는 코어 config 로 해석됩니다.",
);
$checked[] = $rel;
}
// 하한 — 모집단이 비면 위 루프가 통째로 돌지 않고도 통과한다.
$this->assertNotEmpty(
$checked,
'Playwright 명령을 싣는 확장을 하나도 찾지 못했습니다 — 모집단 파생이 죽었습니다.',
);
}
}