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,8 +1331,8 @@
|
||||
];
|
||||
case 'idle':
|
||||
return [
|
||||
{ label: 'Rulează Ralph', type: 'secondary', action: () => approveProject(slug) },
|
||||
{ label: 'Șterge', type: 'ghost', action: () => confirmDeleteIdle(slug) },
|
||||
{ label: 'Propune feature', type: 'secondary', action: () => openProposeModal(slug) },
|
||||
{ label: 'Șterge', type: 'ghost', action: () => confirmDeleteIdle(slug) },
|
||||
];
|
||||
default:
|
||||
return [];
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user