fix(core,engine): OFFSET 순회 중 필터 컬럼 변경으로 인한 처리 누락 수정
Laravel chunk/each 는 OFFSET 기반이라, 콜백이 행의 필터 소속을 바꾸면 (필터 컬럼을 채우거나 매칭 행을 삭제하면) 다음 조회가 그만큼 앞으로 밀려 미처리 행을 조용히 건너뛴다. 250건/청크 100 이면 정확히 100건이 남는다. 코어·번들 확장 전수 조사로 확정한 6곳을 chunkById(키셋 순회)로 통일했다. 브라우저 검수(28축)에서 계획에 없던 결함 12건이 드러나 같은 사슬에서 수정했다. 이 중 layout_strategy=keep 무효화와 수정 감지 실패 시 "수정 없음" 오보는 사용자 작업 소실에 직결된다. 재발 방지로 audit 룰을 추가했고, 수정 6곳을 원복해 red 6건 / 복원 후 green 0건으로 판별력을 검증했다.
This commit is contained in:
1 parent
1866f0d566
commit
1eedbbdda1
55 files changed
+2764
-198
No files matched your search
@@ -5,6 +5,17 @@
|
||||
>
|
||||
> 형식: [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)
|
||||
|
||||
## [engine-v1.54.4] - 2026-07-31
|
||||
|
||||
### Fixed
|
||||
|
||||
#### 노드 `text` 키의 `{{raw:...}}` 바인딩이 평가되지 않고 텍스트가 통째로 사라지던 문제
|
||||
|
||||
- `DynamicRenderer.tsx` `renderChildren` — 노드 레벨 `text` 키 처리에서 `raw:` 접두사를 벗기지 않은 채 표현식 평가로 넘겨, `raw:` 의 콜론이 식의 일부로 파싱되며 `Unexpected token ':'` 로 예외가 났다. props 값 해석(`renderProps`)과 반복 렌더(`RenderHelpers.renderItemChildren`)에는 이미 있던 접두사 처리가 이 경로에만 빠져 있었다.
|
||||
- 증상: 관리자 레이아웃 편집 화면의 파일 목록 등 `text: "{{raw:...}}"` 를 쓰는 자리에서 텍스트가 빈 값으로 렌더된다. 콘솔에는 경고만 남고 에러 화면이 뜨지 않아 조용한 실패로 관측된다(해당 화면 1회 진입에 174건).
|
||||
- 접두사 제거 후 파이프/복합식/단순 경로 분기를 동일하게 태우고, 결과는 `wrapRawDeep` 로 감싸 번역 면제를 유지한다 — 다른 두 경로와 같은 규칙이다.
|
||||
- 기존 동작 무영향: `raw:` 가 없는 `text` 는 종전 경로·결과 그대로다.
|
||||
|
||||
## [engine-v1.54.3] - 2026-07-25
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -2606,13 +2606,24 @@ const DynamicRenderer: React.FC<DynamicRendererProps> = memo(
|
||||
const singleBindingPath = extractSingleBinding(text);
|
||||
|
||||
if (singleBindingPath !== null) {
|
||||
// raw: 접두사 감지 — props 처리(위 renderProps)와 동일 규칙.
|
||||
// 접두사를 벗기지 않으면 `raw:` 의 콜론이 식의 일부로 파싱되어
|
||||
// evaluateExpression 이 `Unexpected token ':'` 로 던지고 텍스트가 통째로 사라진다.
|
||||
// @since engine-v1.54.4
|
||||
let isRawBinding = false;
|
||||
let effectivePath = singleBindingPath;
|
||||
if (singleBindingPath.startsWith(RAW_PREFIX)) {
|
||||
isRawBinding = true;
|
||||
effectivePath = singleBindingPath.slice(RAW_PREFIX.length);
|
||||
}
|
||||
|
||||
// 파이프가 있는 경우 resolveBindings 사용 (파이프 처리 포함)
|
||||
if (hasPipes(singleBindingPath)) {
|
||||
resolvedText = bindingEngine.resolveBindings(text, extendedDataContext, { skipCache: true }, textTrackingInfo);
|
||||
} else if (isComplexExpression(singleBindingPath)) {
|
||||
if (hasPipes(effectivePath)) {
|
||||
resolvedText = bindingEngine.resolveBindings(`{{${effectivePath}}}`, extendedDataContext, { skipCache: true }, textTrackingInfo);
|
||||
} else if (isComplexExpression(effectivePath)) {
|
||||
// 복잡한 표현식인 경우 evaluateExpression 사용
|
||||
try {
|
||||
resolvedText = bindingEngine.evaluateExpression(singleBindingPath, extendedDataContext, textTrackingInfo);
|
||||
resolvedText = bindingEngine.evaluateExpression(effectivePath, extendedDataContext, textTrackingInfo);
|
||||
} catch (error) {
|
||||
logger.warn(
|
||||
`text 표현식 평가 실패 (컴포넌트: ${effectiveComponentDef.id}):`,
|
||||
@@ -2621,7 +2632,11 @@ const DynamicRenderer: React.FC<DynamicRendererProps> = memo(
|
||||
resolvedText = '';
|
||||
}
|
||||
} else {
|
||||
resolvedText = bindingEngine.resolve(singleBindingPath, extendedDataContext, { skipCache: true }, textTrackingInfo);
|
||||
resolvedText = bindingEngine.resolve(effectivePath, extendedDataContext, { skipCache: true }, textTrackingInfo);
|
||||
}
|
||||
|
||||
if (isRawBinding && resolvedText != null) {
|
||||
resolvedText = wrapRawDeep(resolvedText);
|
||||
}
|
||||
} else if (text.includes('{{')) {
|
||||
// 문자열 보간
|
||||
|
||||
@@ -2023,4 +2023,78 @@ describe('DynamicRenderer - TranslationEngine 통합', () => {
|
||||
expect(screen.getByRole('button').textContent).toBe('일반 제목 텍스트');
|
||||
});
|
||||
});
|
||||
|
||||
describe('노드 text 키의 raw: 접두사 (engine-v1.54.4 회귀)', () => {
|
||||
// 배경: props.text 는 raw: 를 벗겼지만 노드 레벨 `text` 키 경로는 접두사를
|
||||
// 그대로 evaluateExpression 에 넘겨 `Unexpected token ':'` 로 던졌다.
|
||||
// 결과적으로 레이아웃 편집 화면의 파일 목록 텍스트가 통째로 빈 값이 되었다.
|
||||
it('노드 text 의 {{raw:복합식}} 이 평가되어 표시되어야 함', () => {
|
||||
const componentDef: ComponentDefinition = {
|
||||
id: 'raw-text-node-1',
|
||||
type: 'basic',
|
||||
name: 'Button',
|
||||
text: '{{raw:file.description || file.name}}',
|
||||
};
|
||||
|
||||
render(
|
||||
<DynamicRenderer
|
||||
componentDef={componentDef}
|
||||
dataContext={{ file: { description: '', name: 'admin_module_list.json' } }}
|
||||
translationContext={translationContext}
|
||||
registry={registry}
|
||||
bindingEngine={bindingEngine}
|
||||
translationEngine={translationEngine}
|
||||
actionDispatcher={actionDispatcher}
|
||||
/>
|
||||
);
|
||||
|
||||
expect(screen.getByRole('button').textContent).toBe('admin_module_list.json');
|
||||
});
|
||||
|
||||
it('노드 text 의 {{raw:단순경로}} 결과의 $t: 토큰은 번역 면제되어야 함', () => {
|
||||
const componentDef: ComponentDefinition = {
|
||||
id: 'raw-text-node-2',
|
||||
type: 'basic',
|
||||
name: 'Button',
|
||||
text: '{{raw:post.title}}',
|
||||
};
|
||||
|
||||
render(
|
||||
<DynamicRenderer
|
||||
componentDef={componentDef}
|
||||
dataContext={{ post: { title: '$t:admin.dashboard' } }}
|
||||
translationContext={translationContext}
|
||||
registry={registry}
|
||||
bindingEngine={bindingEngine}
|
||||
translationEngine={translationEngine}
|
||||
actionDispatcher={actionDispatcher}
|
||||
/>
|
||||
);
|
||||
|
||||
expect(screen.getByRole('button').textContent).toBe('$t:admin.dashboard');
|
||||
});
|
||||
|
||||
it('노드 text 의 raw: 없는 복합식은 종전대로 평가되어야 함 (비회귀)', () => {
|
||||
const componentDef: ComponentDefinition = {
|
||||
id: 'raw-text-node-3',
|
||||
type: 'basic',
|
||||
name: 'Button',
|
||||
text: "{{file.description || file.name}}",
|
||||
};
|
||||
|
||||
render(
|
||||
<DynamicRenderer
|
||||
componentDef={componentDef}
|
||||
dataContext={{ file: { description: '', name: '저장' } }}
|
||||
translationContext={translationContext}
|
||||
registry={registry}
|
||||
bindingEngine={bindingEngine}
|
||||
translationEngine={translationEngine}
|
||||
actionDispatcher={actionDispatcher}
|
||||
/>
|
||||
);
|
||||
|
||||
expect(screen.getByRole('button').textContent).toBe('저장');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user