utopia-ia/elffuss-code public
Changesets · Branches · Tags · Compare
| Changeset | 88b3f553b4fcdd3955a38a3a9bde61d8f80afaffab295856dc66f00f04dbfcbc |
|---|---|
| Author | KikoCis <kikocisneros@gmail.com> · 2026-10-10 19:24 +02:00 |
| Committer | KikoCis <kikocisneros@gmail.com> · 2026-10-11 14:15 +02:00 |
| Parents | 48bc21c757fd |
2 files changed
modified tests/mind-consent.mjs +8 −0
| @@ -75,6 +75,14 @@ | ||
| 75 | 75 | ok('2 · …y con el motor de reglas no se escribe ninguna propuesta', r2.forzado === false && r2.nombres.length === 1, JSON.stringify(r2)); |
| 76 | 76 | await p.click('#cfg-x'); |
| 77 | 77 | |
| 78 | +// 2 · «Reprogramar» no enciende el cerebro: ni en Básico ni si lo pausaste | |
| 79 | +await p.click('#mind-playstop'); // pausarlo a propósito | |
| 80 | +const pausado = await p.evaluate(async () => (await import('/js/ceo.js')).isEnabled()); | |
| 81 | +await p.click('#mind-config'); | |
| 82 | +await p.click('#cfg-save'); | |
| 83 | +const r2b = await p.evaluate(async () => ({ on: (await import('/js/ceo.js')).isEnabled(), boton: document.getElementById('mind-playstop').textContent })); | |
| 84 | +ok('2 · «Reprogramar» no enciende un cerebro pausado (y el botón no cambia)', !pausado && !r2b.on && !/pausar/i.test(r2b.boton), JSON.stringify({ pausado, ...r2b })); | |
| 85 | + | |
| 78 | 86 | // 3 · etiqueta de propuesta pulsable |
| 79 | 87 | await p.waitForSelector('.mind-node-label', { timeout: 10000 }); |
| 80 | 88 | const r3 = await p.evaluate(() => { |
modified web/js/mind.js +4 −1
| @@ -411,9 +411,12 @@ | ||
| 411 | 411 | ceo.setMission(cfg.querySelector('#cfg-mission').value); |
| 412 | 412 | ceo.setSoulDir(cfg.querySelector('#cfg-dir').value); |
| 413 | 413 | ceo.setProfiles(rows); |
| 414 | - if (!ceo.isEnabled()) ceo.enable(); | |
| 414 | + // Reprogramar NO enciende el cerebro: solo ▶ lo hace. Antes lo encendía | |
| 415 | + // (y lo dejaba guardado), también en modo Básico y también si lo habías | |
| 416 | + // pausado a propósito, sin que el botón dijera nada de encender. | |
| 415 | 417 | paintPlay(); |
| 416 | 418 | cfg.classList.remove('show'); |
| 419 | + root.querySelector('#mind-config')?.focus(); | |
| 417 | 420 | }; |
| 418 | 421 | wireRows(); |
| 419 | 422 | function wireRows() { cfg.querySelectorAll('.cp-del').forEach(b => { b.onclick = () => b.closest('.cfg-prof').remove(); }); } |