feat: add daily logging and improve workspace UI and ROS status

This commit is contained in:
2026-09-29 16:42:34 +09:00
parent 0a15102f8c
commit fb8c15dfd3
25 changed files with 328 additions and 283 deletions
+38
View File
@@ -9,6 +9,44 @@ const { createInstance } = require('i18next')
const root = path.resolve(__dirname, '../src/renderer/src')
const dictionary = JSON.parse(fs.readFileSync(path.join(root, 'i18n/en.json'), 'utf8'))
test('close studio modal translates the built-in Local PC title but preserves vehicle names', () => {
const source = fs.readFileSync(path.join(root, 'App.tsx'), 'utf8')
const expression = source.match(/platformTitle=\{(runningPlatformCloseTarget\.platformKey[^\n]+)\}/)?.[1]
assert.ok(expression)
for (const language of ['en', 'ko']) {
const { api } = setup(language)
const title = vm.runInNewContext(expression, {
runningPlatformCloseTarget: { platformKey: 'futuredrive-local-pc', title: '로컬 PC' }, t: api.t
})
assert.equal(title, language === 'en' ? 'Local PC' : '로컬 PC')
if (language === 'en') assert.equal(api.t('{{v0}} 개발 스튜디오를 종료할까요?', { v0: title }), 'Close the Local PC studio?')
assert.equal(vm.runInNewContext(expression, {
runningPlatformCloseTarget: { platformKey: 'vehicle', title: '교육용 차량' }, t: api.t
}), '교육용 차량')
}
})
test('session confirmation uses a localized platform display name', () => {
const source = fs.readFileSync(path.join(root, 'App.tsx'), 'utf8')
const expression = source.match(/const activePlatformDisplayName = ([\s\S]*?)\n const sessionPlatformLabel/)[1]
for (const language of ['en', 'ko']) {
const { api } = setup(language)
const name = vm.runInNewContext(expression, {
workspacePlatform: null,
sessionPlatform: { platformKey: 'futuredrive-local-pc' },
activePlatformName: '로컬 PC', t: api.t
})
assert.equal(name, language === 'en' ? 'Local PC' : '로컬 PC')
if (language === 'en') assert.equal(api.t('{{v0}} 개발 스튜디오 연결만 종료합니다. 플랫폼 제어권은 반납되지 않습니다.', { v0: name }),
'Disconnect from the Local PC studio only. Platform control is retained.')
assert.equal(vm.runInNewContext(expression, {
workspacePlatform: { platformKey: 'vehicle' }, sessionPlatform: null,
activePlatformName: '교육용 차량', t: api.t
}), '교육용 차량')
}
assert.match(source, /<SessionConfirmModal[\s\S]*?platformName=\{activePlatformDisplayName\}/)
})
test('all execution guide page titles have English translations', () => {
const source = fs.readFileSync(path.join(root, 'features/workspace/ModuleListView.tsx'), 'utf8')
const titles = [...source.matchAll(/environment: '([^']+)'/g)].map(match => match[1])