(msg, max = 80)
| 1872 | }; |
| 1873 | |
| 1874 | const truncateTestMessage = (msg, max = 80) => { |
| 1875 | const clean = String(msg || '').replace(/\s+/g, ' ').trim(); |
| 1876 | if (clean.length <= max) return clean; |
| 1877 | return clean.slice(0, max) + '...'; |
| 1878 | }; |
| 1879 | |
| 1880 | const testStatusLabel = (state, message) => { |
| 1881 | if (state === 'testing') return tf('source_test_running', 'Testing...'); |