fix(dashboard): replace broken Rulează Ralph on idle cards with Propose

The idle-state action called /api/projects/approve, which 404'd because
idle workspace dirs have no approved-tasks.json entry to mutate. Now the
button opens the Propose modal pre-filled with the workspace slug so the
user actually has a path forward.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 10:48:01 +00:00
parent 2bcefe1ab4
commit 608668d8a6

View File

@@ -1331,7 +1331,7 @@
];
case 'idle':
return [
{ label: 'Rulează Ralph', type: 'secondary', action: () => approveProject(slug) },
{ label: 'Propune feature', type: 'secondary', action: () => openProposeModal(slug) },
{ label: 'Șterge', type: 'ghost', action: () => confirmDeleteIdle(slug) },
];
default:
@@ -1655,12 +1655,13 @@
proposeDesc.classList.remove('is-invalid');
}
function openProposeModal() {
function openProposeModal(prefilledSlug) {
clearProposeErrors();
proposeSlug.value = '';
proposeSlug.value = prefilledSlug || '';
proposeDesc.value = '';
proposeWithPlanning.checked = true;
openModal(proposeModal, { focusSelector: '#proposeSlug' });
const focusSel = prefilledSlug ? '#proposeDesc' : '#proposeSlug';
openModal(proposeModal, { focusSelector: focusSel });
}
function requestCloseProposeModal() {