Skip to content

Commit 681ed25

Browse files
kahirokunnCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]> Signed-off-by: kahirokunn <[email protected]>
1 parent 8454aef commit 681ed25

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

frontend/src/components/common/Resource/EditorDialog.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,9 @@ function EditorDialogInner(props: EditorDialogInnerProps) {
810810

811811
// Arrays (including when only one side is an array) are treated as atomic values.
812812
// This intentionally handles array/non-array type mismatches as full replacements
813-
// instead of attempting element-wise merges.
813+
// instead of attempting element-wise merges. As a consequence, if both sides modify
814+
// the same array, the merge logic will surface this as a single conflict that always
815+
// requires manual resolution rather than attempting to auto-merge individual elements.
814816
if (Array.isArray(base) || Array.isArray(local)) {
815817
return [{ type: 'set', path, baseValue: base, value: local }];
816818
}
@@ -872,6 +874,9 @@ function EditorDialogInner(props: EditorDialogInnerProps) {
872874

873875
// Ensure root is a container we can assign into.
874876
if (root === null || typeof root !== 'object') {
877+
// We intentionally normalize the incoming root into an object/array here so that the
878+
// rest of this helper can perform in-place updates efficiently. Callers must always
879+
// use the returned root value, so this reassignment does not leak outside the function.
875880
// eslint-disable-next-line no-param-reassign
876881
root = typeof path[0] === 'number' ? [] : {};
877882
}

frontend/src/i18n/locales/de/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@
294294
"Reload from server": "",
295295
"Automatic merge failed due to conflicts. Please resolve manually.": "",
296296
"Merge my changes": "",
297-
"This resource was updated on the server while you were editing.": "",
297+
"This resource was updated on the server while you were editing.": "Diese Ressource wurde auf dem Server aktualisiert, während Sie sie bearbeitet haben.",
298298
"Editor": "Editor",
299299
"Documentation": "Dokumentation",
300300
"Undo": "Rückgängig machen",

frontend/src/i18n/locales/ta/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@
294294
"Reload from server": "",
295295
"Automatic merge failed due to conflicts. Please resolve manually.": "",
296296
"Merge my changes": "",
297-
"This resource was updated on the server while you were editing.": "",
297+
"This resource was updated on the server while you were editing.": "இந்த ரிசோர்ஸ் நீங்கள் திருத்திக் கொண்டிருக்கும் போது சர்வரில் புதுப்பிக்கப்பட்டது.",
298298
"Editor": "எடிட்டர்",
299299
"Documentation": "ஆவணப்படுத்தல்",
300300
"Undo": "செயல்தவிர்",

frontend/src/i18n/locales/zh-tw/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
"Edit": "編輯",
273273
"Loading resource": "讀取資源",
274274
"Error getting resource {{ resourceName }}: {{ errorMessage }}": "取得資源 {{ resourceName }} 時出錯:{{ errorMessage }}",
275-
"Automatic merge is only supported for a single YAML/JSON document.": "",
275+
"Automatic merge is only supported for a single YAML/JSON document.": "自動合併僅支援單一 YAML/JSON 文件。",
276276
"Invalid JSON": "無效的 JSON",
277277
"Invalid YAML": "無效的 YAML",
278278
"Failed to create {{ kind }} {{ name }}.": "新增 {{ kind }} {{ name }} 失敗。",

0 commit comments

Comments
 (0)