fix: resolve 4 UI/UX issues

1. Fix typewriter double-letter bug (race condition)
2. Replace flag emojis with text labels (NL/AR/EN)
3. Fix health check TLS options for Bun compatibility
4. Translate 'yourname' placeholder per language
This commit is contained in:
Oussama Douhou
2026-01-10 11:39:14 +01:00
parent fe8abda7d3
commit 67069f3bda
4 changed files with 120 additions and 23 deletions

View File

@@ -278,6 +278,10 @@ export class ProductionDeployer {
dockerImage: config.dockerImage,
sourceType: 'docker',
registryId: config.registryId,
memoryLimit: 2048,
memoryReservation: 1024,
cpuLimit: 2,
cpuReservation: 0.5,
});
state.progress = 55;
@@ -353,33 +357,40 @@ export class ProductionDeployer {
throw new Error('Application URL not available');
}
const timeout = config.healthCheckTimeout || 120000; // 2 minutes
const interval = config.healthCheckInterval || 5000; // 5 seconds
const timeout = config.healthCheckTimeout || 120000;
const interval = config.healthCheckInterval || 5000;
const startTime = Date.now();
// Try multiple endpoints - the container may not have /health
const endpoints = ['/', '/health', '/api'];
while (Date.now() - startTime < timeout) {
for (const endpoint of endpoints) {
try {
const checkUrl = `${state.url}${endpoint}`;
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 5000);
const response = await fetch(checkUrl, {
method: 'GET',
signal: AbortSignal.timeout(5000),
tls: { rejectUnauthorized: false },
signal: controller.signal,
});
// Accept ANY HTTP response (even 404) as "server is alive"
// Only connection errors mean the container isn't ready
clearTimeout(timeoutId);
console.log(`Health check ${checkUrl} returned ${response.status}`);
state.message = 'Application is responding';
return;
} catch (error) {
const errorMsg = error instanceof Error ? error.message : String(error);
// SSL cert errors mean server IS responding, just cert issue during provisioning
if (errorMsg.includes('certificate') || errorMsg.includes('SSL') || errorMsg.includes('TLS')) {
if (
errorMsg.includes('certificate') ||
errorMsg.includes('SSL') ||
errorMsg.includes('TLS') ||
errorMsg.includes('CERT') ||
errorMsg.includes('unable to verify') ||
errorMsg.includes('self signed') ||
errorMsg.includes('self-signed')
) {
console.log(`Health check SSL error (treating as alive): ${errorMsg}`);
state.message = 'Application is responding (SSL provisioning)';
return;