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
address review (claude): scrub app-name from tests/comments, drop dead authorFilter, clean toast count
Adam Eivycc61f996439e
diff --git a/client/src/hooks/useOnDemandTaskToast.test.jsx b/client/src/hooks/useOnDemandTaskToast.test.jsxindex 185efd07c7..13fcb2163d 100644--- a/client/src/hooks/useOnDemandTaskToast.test.jsx+++ b/client/src/hooks/useOnDemandTaskToast.test.jsx@@ -54,7 +54,7 @@ describe('useOnDemandTaskToast — parked outcome', () => {it('renders a bare "no open issues" when the repo is genuinely empty', () => {renderHook(() => useOnDemandTaskToast());fire({- taskType: 'claim-issue', appName: 'aix-university', outcome: 'parked',+ taskType: 'claim-issue', appName: 'App One', outcome: 'parked',parkReason: 'no-open-issues', counts: { open: 0, inFlight: 0, filtered: 0 },parkedUntil: new Date(Date.now() + 23 * 3600 * 1000).toISOString()});@@ -66,9 +66,12 @@ describe('useOnDemandTaskToast — parked outcome', () => {it('explains the author-filter trap (not "no open issues") when open issues exist but none match the filter', () => {renderHook(() => useOnDemandTaskToast());+ // The detector reports filtered: 0 on this path (the issues were excluded by+ // the author filter, not the skip-list), so the toast reads a clean+ // "0 of N open" with no redundant "N filtered".fire({- taskType: 'claim-issue', appName: 'aix-university', outcome: 'parked',- parkReason: 'no-authored-issues', counts: { open: 10, inFlight: 0, filtered: 10 },+ taskType: 'claim-issue', appName: 'App One', outcome: 'parked',+ parkReason: 'no-authored-issues', counts: { open: 10, inFlight: 0, filtered: 0 },parkedUntil: new Date(Date.now() + 23 * 3600 * 1000).toISOString()});const [msg] = toastSpy.mock.calls[0];@@ -76,6 +79,7 @@ describe('useOnDemandTaskToast — parked outcome', () => {expect(msg).toMatch(/none match the author filter/);expect(msg).toMatch(/set it to "any"/);expect(msg).toMatch(/0 of 10 open/);+ expect(msg).not.toMatch(/filtered/);expect(msg).not.toMatch(/re-checked now — no open issues/);});});diff --git a/server/services/perpetualWork.js b/server/services/perpetualWork.jsindex 2f9dbe0d96..52486e8db9 100644--- a/server/services/perpetualWork.js+++ b/server/services/perpetualWork.js@@ -266,10 +266,14 @@ async function detectForgeIssues(forgeKey, app, { issueAuthorFilter = 'self' } =// author, so the filter matches nothing), or `self`/@me when the server's// forge session is a different identity than whoever filed the issues.// Reporting a flat "no open issues" there hid a claimable queue behind a- // full recheck park (the aix-university "10 open but parked" report).- // Re-probe WITHOUT the author filter; if issues exist, park with the- // actionable `no-authored-issues` reason + the real open count so the user- // is told to widen the filter, not that there is nothing to do.+ // full recheck park (the "open issues exist but the task still parked"+ // failure this fixes). Re-probe WITHOUT the author filter; if issues exist,+ // park with the actionable `no-authored-issues` reason + the real open+ // count so the user is told to widen the filter, not that there is nothing+ // to do. The count is raw open issues (any author), not claimable ones —+ // best effort: switching to `any` may still yield `no-actionable-issues`+ // when the other-authored issues are all blocked/assigned/epics. Counting+ // claimable ones would cost the full normalize + skip-list scan here.if (authorApplied) {const openCount = await countOpenIssuesUnfiltered(cfg, repoPath);if (openCount > 0) {@@ -278,9 +282,12 @@ async function detectForgeIssues(forgeKey, app, { issueAuthorFilter = 'self' } =count: 0,total: openCount,inFlightCount: 0,- filteredCount: openCount,- reason: 'no-authored-issues',- authorFilter: issueAuthorFilter+ // These issues were excluded by the author filter upstream, not by+ // the skip-list — the `reason` conveys that cause, so leave the+ // skip-list "filtered" tally at 0 (the toast reads a clean+ // "0 of N open" rather than a redundant "N filtered").+ filteredCount: 0,+ reason: 'no-authored-issues'};}}diff --git a/server/services/perpetualWork.test.js b/server/services/perpetualWork.test.jsindex 9c0cf621c2..114e4e45ab 100644--- a/server/services/perpetualWork.test.js+++ b/server/services/perpetualWork.test.js@@ -202,8 +202,8 @@ describe('perpetualWork', () => {});const out = await detectGithubIssues(app, { issueAuthorFilter: 'self' });expect(out).toMatchObject({- actionable: false, count: 0, total: 3, filteredCount: 3, inFlightCount: 0,- reason: 'no-authored-issues', authorFilter: 'self'+ actionable: false, count: 0, total: 3, filteredCount: 0, inFlightCount: 0,+ reason: 'no-authored-issues'});// Exactly two `gh issue` calls: the filtered probe + the unfiltered re-probe.const issueCalls = spawn.mock.calls.filter(([cmd, a]) => cmd === 'gh' && a[0] === 'issue');@@ -212,7 +212,7 @@ describe('perpetualWork', () => {});it('owner filter that resolves to an org (never an issue author) reports no-authored-issues with the real open count', async () => {- // The exact aix-university trap: `gh repo view` owner is the ORG, so+ // The exact owner-filter trap: `gh repo view` owner is the ORG, so// `--author <org>` matches nothing even though the repo has open issues.spawn.mockImplementation((cmd, args = []) => {if (cmd === 'gh' && args[0] === 'repo') return fakeChild('AcmeOrg\n'); // owner login → org@@ -225,7 +225,7 @@ describe('perpetualWork', () => {return fakeChild('');});const out = await detectGithubIssues(app, { issueAuthorFilter: 'owner' });- expect(out).toMatchObject({ reason: 'no-authored-issues', total: 1, authorFilter: 'owner' });+ expect(out).toMatchObject({ reason: 'no-authored-issues', total: 1, filteredCount: 0 });});it('still reports no-open-issues when the repo is genuinely empty under an author filter', async () => {@@ -354,7 +354,7 @@ describe('perpetualWork', () => {return fakeChild('');});const out = await detectGitlabIssues(app, { issueAuthorFilter: 'self' });- expect(out).toMatchObject({ actionable: false, reason: 'no-authored-issues', total: 1, authorFilter: 'self' });+ expect(out).toMatchObject({ actionable: false, reason: 'no-authored-issues', total: 1, filteredCount: 0 });});});});