@yemi33/minions 0.1.29 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.31 (2026-03-28)
4
+
5
+ ### Dashboard
6
+ - dashboard/js/settings.js
7
+
8
+ ## 0.1.30 (2026-03-28)
9
+
10
+ ### Dashboard
11
+ - dashboard/js/render-work-items.js
12
+
3
13
  ## 0.1.29 (2026-03-28)
4
14
 
5
15
  ### Dashboard
@@ -226,20 +226,42 @@ async function retryWorkItem(id, source) {
226
226
  function wiPrev() { if (wiPage > 0) { wiPage--; renderWorkItems(allWorkItems); } }
227
227
  function wiNext() { const tp = Math.ceil(allWorkItems.length / WI_PER_PAGE); if (wiPage < tp-1) { wiPage++; renderWorkItems(allWorkItems); } }
228
228
 
229
+ let _feedbackRating = null;
229
230
  function feedbackWorkItem(id, source) {
231
+ _feedbackRating = null;
230
232
  document.getElementById('modal-title').textContent = 'Feedback on ' + id;
231
233
  document.getElementById('modal-body').innerHTML =
232
- '<div style="display:flex;flex-direction:column;gap:16px;align-items:center">' +
233
- '<div style="display:flex;gap:24px">' +
234
- '<button onclick="submitFeedback(\'' + escHtml(id) + '\',\'' + escHtml(source) + '\',\'up\')" style="font-size:40px;background:none;border:2px solid var(--border);border-radius:12px;padding:16px 24px;cursor:pointer;transition:all 0.2s" onmouseover="this.style.borderColor=\'var(--green)\'" onmouseout="this.style.borderColor=\'var(--border)\'">&#x1F44D;</button>' +
235
- '<button onclick="submitFeedback(\'' + escHtml(id) + '\',\'' + escHtml(source) + '\',\'down\')" style="font-size:40px;background:none;border:2px solid var(--border);border-radius:12px;padding:16px 24px;cursor:pointer;transition:all 0.2s" onmouseover="this.style.borderColor=\'var(--red)\'" onmouseout="this.style.borderColor=\'var(--border)\'">&#x1F44E;</button>' +
234
+ '<div style="display:flex;flex-direction:column;gap:16px">' +
235
+ '<div style="display:flex;gap:16px;justify-content:center">' +
236
+ '<button id="fb-up" onclick="_selectRating(\'up\')" style="font-size:36px;background:none;border:2px solid var(--border);border-radius:12px;padding:12px 20px;cursor:pointer;transition:all 0.2s">&#x1F44D;</button>' +
237
+ '<button id="fb-down" onclick="_selectRating(\'down\')" style="font-size:36px;background:none;border:2px solid var(--border);border-radius:12px;padding:12px 20px;cursor:pointer;transition:all 0.2s">&#x1F44E;</button>' +
238
+ '</div>' +
239
+ '<textarea id="feedback-comment" rows="3" style="width:100%;padding:8px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-family:inherit;resize:vertical" placeholder="What was good or needs improvement?"></textarea>' +
240
+ '<div style="display:flex;justify-content:flex-end;gap:8px">' +
241
+ '<button onclick="closeModal()" class="pr-pager-btn">Cancel</button>' +
242
+ '<button id="fb-send" onclick="submitFeedback(\'' + escHtml(id) + '\',\'' + escHtml(source) + '\')" style="padding:6px 16px;background:var(--surface2);color:var(--muted);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:not-allowed" disabled>Select rating first</button>' +
236
243
  '</div>' +
237
- '<textarea id="feedback-comment" rows="3" style="width:100%;padding:8px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-family:inherit;resize:vertical" placeholder="Optional: what was good or needs improvement?"></textarea>' +
238
244
  '</div>';
239
245
  document.getElementById('modal').classList.add('open');
240
246
  }
247
+ function _selectRating(r) {
248
+ _feedbackRating = r;
249
+ document.getElementById('fb-up').style.borderColor = r === 'up' ? 'var(--green)' : 'var(--border)';
250
+ document.getElementById('fb-up').style.background = r === 'up' ? 'rgba(63,185,80,0.1)' : 'none';
251
+ document.getElementById('fb-down').style.borderColor = r === 'down' ? 'var(--red)' : 'var(--border)';
252
+ document.getElementById('fb-down').style.background = r === 'down' ? 'rgba(248,81,73,0.1)' : 'none';
253
+ const btn = document.getElementById('fb-send');
254
+ btn.disabled = false;
255
+ btn.style.background = 'var(--blue)';
256
+ btn.style.color = '#fff';
257
+ btn.style.cursor = 'pointer';
258
+ btn.style.borderColor = 'var(--blue)';
259
+ btn.textContent = 'Send Feedback';
260
+ }
241
261
 
242
- async function submitFeedback(id, source, rating) {
262
+ async function submitFeedback(id, source) {
263
+ const rating = _feedbackRating;
264
+ if (!rating) { alert('Please select a rating first'); return; }
243
265
  const comment = document.getElementById('feedback-comment')?.value || '';
244
266
  try {
245
267
  const res = await fetch('/api/work-items/feedback', {
@@ -134,21 +134,35 @@ async function saveSettings() {
134
134
  }
135
135
  }
136
136
 
137
- async function addProject() {
138
- try {
139
- showToast('cmd-toast', 'Opening folder picker...', true);
140
- const browseRes = await fetch('/api/projects/browse', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: '{}' });
141
- const browseData = await browseRes.json();
142
- if (browseData.cancelled || !browseData.path) return;
137
+ function addProject() {
138
+ document.getElementById('modal-title').textContent = 'Add Project';
139
+ document.getElementById('modal-body').innerHTML =
140
+ '<div style="display:flex;flex-direction:column;gap:12px">' +
141
+ '<label style="color:var(--text);font-size:var(--text-md)">Project Path' +
142
+ '<input id="add-project-path" style="display:block;width:100%;margin-top:4px;padding:8px 10px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-size:13px;font-family:monospace" placeholder="C:\\Users\\you\\repos\\my-project">' +
143
+ '</label>' +
144
+ '<div style="font-size:11px;color:var(--muted)">Enter the full path to a git repository. The engine will auto-detect the repo host, branch, and project name.</div>' +
145
+ '<div style="display:flex;justify-content:flex-end;gap:8px">' +
146
+ '<button onclick="closeModal()" class="pr-pager-btn">Cancel</button>' +
147
+ '<button onclick="_submitAddProject()" style="padding:6px 16px;background:var(--blue);color:#fff;border:none;border-radius:var(--radius-sm);cursor:pointer">Add Project</button>' +
148
+ '</div>' +
149
+ '</div>';
150
+ document.getElementById('modal').classList.add('open');
151
+ setTimeout(() => document.getElementById('add-project-path')?.focus(), 100);
152
+ }
143
153
 
144
- const addRes = await fetch('/api/projects/add', {
154
+ async function _submitAddProject() {
155
+ const pathInput = document.getElementById('add-project-path');
156
+ if (!pathInput?.value.trim()) { alert('Path is required'); return; }
157
+ try {
158
+ const res = await fetch('/api/projects/add', {
145
159
  method: 'POST', headers: { 'Content-Type': 'application/json' },
146
- body: JSON.stringify({ path: browseData.path })
160
+ body: JSON.stringify({ path: pathInput.value.trim() })
147
161
  });
148
- const addData = await addRes.json();
149
- if (!addRes.ok) { alert('Failed: ' + (addData.error || 'unknown')); return; }
150
-
151
- showToast('cmd-toast', 'Project "' + addData.name + '" added — restart engine to pick it up', true);
162
+ const data = await res.json();
163
+ if (!res.ok) { alert('Failed: ' + (data.error || 'unknown')); return; }
164
+ closeModal();
165
+ try { showToast('cmd-toast', 'Project "' + data.name + '" added — restart engine to pick it up', true); } catch {}
152
166
  refresh();
153
167
  } catch (e) { alert('Error: ' + e.message); }
154
168
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"