Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(cos): make Review Loop independent of Open PR, fix file input Safari compat
Adam Eivy009d876dcadd
diff --git a/client/src/components/cos/TaskAddForm.jsx b/client/src/components/cos/TaskAddForm.jsxindex c86f60f51a..1dab7b1569 100644--- a/client/src/components/cos/TaskAddForm.jsx+++ b/client/src/components/cos/TaskAddForm.jsx@@ -54,7 +54,6 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fasetCreateJiraTicket(!!app?.jira?.enabled);setUseWorktree(defaultUseWorktree);setOpenPR(defaultOpenPR);- if (defaultOpenPR) setReviewLoop(false);}, [newTask.app, apps]);// Get models for selected provider@@ -400,10 +399,7 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fatype="checkbox"checked={openPR}disabled={!useWorktree}- onChange={(e) => {- setOpenPR(e.target.checked);- if (e.target.checked) setReviewLoop(false);- }}+ onChange={(e) => setOpenPR(e.target.checked)}className="w-4 h-4 rounded border-port-border bg-port-bg text-port-accent focus:ring-port-accent focus:ring-offset-0 disabled:opacity-40"/><span className={`flex items-center gap-1.5 text-sm ${useWorktree ? 'text-gray-400' : 'text-gray-600'}`} title="Open a pull request to the default branch. If unchecked with worktree enabled, auto-merges on completion.">@@ -427,12 +423,11 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fa<inputtype="checkbox"checked={reviewLoop}- disabled={openPR}onChange={(e) => setReviewLoop(e.target.checked)}- className="w-4 h-4 rounded border-port-border bg-port-bg text-port-accent focus:ring-port-accent focus:ring-offset-0 disabled:opacity-40"+ className="w-4 h-4 rounded border-port-border bg-port-bg text-port-accent focus:ring-port-accent focus:ring-offset-0"/>- <span className={`flex items-center gap-1.5 text-sm ${openPR ? 'text-gray-600' : 'text-gray-400'}`} title={openPR ? 'Review Loop is incompatible with Open PR — the PR is created after the agent exits, so there is no PR to iterate on during the run.' : 'After the agent opens a PR during its run, keep iterating on review feedback until checks pass.'}>- <RefreshCw size={14} className={openPR ? 'text-gray-600' : 'text-amber-400'} />+ <span className="flex items-center gap-1.5 text-sm text-gray-400" title="After the agent opens a PR during its run, keep iterating on review feedback until checks pass.">+ <RefreshCw size={14} className="text-amber-400" />Review Loop</span></label>@@ -499,8 +494,9 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = faaccept="image/*"multipleonChange={handleFileSelect}- className="hidden"- aria-label="Upload screenshot files"+ className="absolute w-0 h-0 opacity-0 overflow-hidden"+ tabIndex={-1}+ aria-hidden="true"/><buttontype="button"@@ -516,8 +512,9 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = faaccept=".txt,.md,.json,.csv,.xml,.yaml,.yml,.png,.jpg,.jpeg,.gif,.webp,.svg,.pdf,.js,.ts,.jsx,.tsx,.py,.sh,.sql,.html,.css,.zip,.tar,.gz"multipleonChange={handleAttachmentSelect}- className="hidden"- aria-label="Upload attachment files"+ className="absolute w-0 h-0 opacity-0 overflow-hidden"+ tabIndex={-1}+ aria-hidden="true"/>{screenshots.length > 0 && (<span className="text-xs text-gray-500">{screenshots.length} screenshot{screenshots.length > 1 ? 's' : ''}</span>diff --git a/client/src/components/cos/tabs/ResumeAgentModal.jsx b/client/src/components/cos/tabs/ResumeAgentModal.jsxindex a1be2c47c2..37dd987881 100644--- a/client/src/components/cos/tabs/ResumeAgentModal.jsx+++ b/client/src/components/cos/tabs/ResumeAgentModal.jsx@@ -124,8 +124,9 @@ export default function ResumeAgentModal({ agent, taskType = 'user', providers,accept="image/*"multipleonChange={handleFileSelect}- className="hidden"- aria-label="Upload screenshot files"+ className="absolute w-0 h-0 opacity-0 overflow-hidden"+ tabIndex={-1}+ aria-hidden="true"/>{screenshots.length > 0 && (<span className="text-xs text-gray-500">{screenshots.length} screenshot{screenshots.length > 1 ? 's' : ''}</span>diff --git a/client/src/components/meatspace/tabs/GenomeTab.jsx b/client/src/components/meatspace/tabs/GenomeTab.jsxindex 57c9d6e728..631b92da02 100644--- a/client/src/components/meatspace/tabs/GenomeTab.jsx+++ b/client/src/components/meatspace/tabs/GenomeTab.jsx@@ -315,7 +315,9 @@ export default function GenomeTab() {ref={fileInputRef}type="file"accept=".txt,.tsv,.csv,.zip"- className="hidden"+ className="absolute w-0 h-0 opacity-0 overflow-hidden"+ tabIndex={-1}+ aria-hidden="true"onChange={(e) => handleFileUpload(e.target.files[0])}/></div>diff --git a/client/src/components/meatspace/tabs/ImportTab.jsx b/client/src/components/meatspace/tabs/ImportTab.jsxindex 872ccb080f..2f28a5d1a6 100644--- a/client/src/components/meatspace/tabs/ImportTab.jsx+++ b/client/src/components/meatspace/tabs/ImportTab.jsx@@ -124,7 +124,9 @@ export default function ImportTab({ onRefresh }) {type="file"accept=".json"onChange={handleJsonFileSelect}- className="hidden"+ className="absolute w-0 h-0 opacity-0 overflow-hidden"+ tabIndex={-1}+ aria-hidden="true"/><buttononClick={() => jsonFileInputRef.current?.click()}@@ -210,7 +212,9 @@ export default function ImportTab({ onRefresh }) {type="file"accept=".xml,.zip"onChange={handleXmlFileSelect}- className="hidden"+ className="absolute w-0 h-0 opacity-0 overflow-hidden"+ tabIndex={-1}+ aria-hidden="true"/><buttononClick={() => xmlFileInputRef.current?.click()}diff --git a/client/src/pages/DevTools.jsx b/client/src/pages/DevTools.jsxindex 1e7884a752..9b4afc82ab 100644--- a/client/src/pages/DevTools.jsx+++ b/client/src/pages/DevTools.jsx@@ -1135,7 +1135,9 @@ ${prompt.trim()}`;accept="image/*"multipleonChange={handleFileSelect}- className="hidden"+ className="absolute w-0 h-0 opacity-0 overflow-hidden"+ tabIndex={-1}+ aria-hidden="true"/></>)}diff --git a/client/src/pages/Uploads.jsx b/client/src/pages/Uploads.jsxindex dffa31e0e4..27b5674118 100644--- a/client/src/pages/Uploads.jsx+++ b/client/src/pages/Uploads.jsx@@ -190,7 +190,9 @@ export default function Uploads() {type="file"multipleonChange={(e) => handleFileUpload(e.target.files)}- className="hidden"+ className="absolute w-0 h-0 opacity-0 overflow-hidden"+ tabIndex={-1}+ aria-hidden="true"/><Upload size={40} className={`mx-auto mb-4 ${dragActive ? 'text-port-accent' : 'text-gray-500'}`} />diff --git a/server/services/subAgentSpawner.js b/server/services/subAgentSpawner.jsindex 15c5386605..52465cbc33 100644--- a/server/services/subAgentSpawner.js+++ b/server/services/subAgentSpawner.js@@ -1945,7 +1945,9 @@ async function handleAgentCompletion(agentId, exitCode, success, duration) {// Clean up worktree if agent was using one (skip merge when JIRA branch — PR handles merge)if (!jiraBranch) {const taskOpenPR = isTruthyMeta(agent.task?.metadata?.openPR);- await cleanupAgentWorktree(agentId, success, { openPR: taskOpenPR, description: task?.description });+ const taskReviewLoop = isTruthyMeta(agent.task?.metadata?.reviewLoop);+ // When reviewLoop + openPR are both enabled, the agent handles the PR during its run — skip post-exit PR creation+ await cleanupAgentWorktree(agentId, success, { openPR: taskOpenPR && !taskReviewLoop, description: task?.description });}runnerAgents.delete(agentId);@@ -2685,6 +2687,9 @@ async function buildAgentPrompt(task, config, workspaceDir, worktreeInfo = null)// Build worktree context section if applicableconst willOpenPR = isTruthyMeta(task.metadata?.openPR);+ const willReviewLoop = isTruthyMeta(task.metadata?.reviewLoop);+ // When reviewLoop is enabled alongside openPR, the agent opens the PR during its run (reviewLoop takes precedence over post-exit PR creation)+ const prHandledByAgent = willReviewLoop && willOpenPR;const worktreeSection = worktreeInfo ? `## Git Worktree ContextYou are working in an **isolated git worktree** to avoid conflicts with other agents working concurrently.@@ -2692,7 +2697,7 @@ You are working in an **isolated git worktree** to avoid conflicts with other ag- **Worktree Path**: \`${worktreeInfo.worktreePath}\`${worktreeInfo.baseBranch ? `- **Based on**: \`${worktreeInfo.baseBranch}\` (latest from origin)` : ''}-**Important**: Commit your changes to this branch.${willOpenPR ? ' Your commits will be submitted as a pull request to the default branch when your task completes.' : ' Your commits will be automatically merged back to the main development branch when your task completes.'} Do NOT manually switch branches or modify the worktree configuration.+**Important**: Commit your changes to this branch.${willOpenPR && !prHandledByAgent ? ' Your commits will be submitted as a pull request to the default branch when your task completes.' : ' Your commits will be automatically merged back to the main development branch when your task completes.'} Do NOT manually switch branches or modify the worktree configuration.` : '';// Build simplify section if enabled@@ -2701,8 +2706,8 @@ ${worktreeInfo.baseBranch ? `- **Based on**: \`${worktreeInfo.baseBranch}\` (latAfter completing your work and before committing, run \`/simplify\` to review the changed code for reuse, quality, and efficiency. Fix any issues found before committing.` : '';- // Build review loop section if enabled (only when the agent creates the PR itself, not when openPR auto-creates it post-exit)- const reviewLoopSection = (isTruthyMeta(task.metadata?.reviewLoop) && !willOpenPR) ? `+ // Build review loop section if enabled+ const reviewLoopSection = willReviewLoop ? `## Review LoopAfter opening the PR, run \`/do:rpr\` to resolve PR review feedback and complete the merge validation. Continue running the review loop until all checks pass and the PR is approved.` : '';