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