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([issue-3014]): drop the unreachable execution.byScope fallback that would mislabel every row
[._.]/ Adam Eivy7cd2b0300050
diff --git a/client/src/components/apps/LayeredIntelligenceOutcomes.jsx b/client/src/components/apps/LayeredIntelligenceOutcomes.jsxindex 822f018896..6600e0307e 100644--- a/client/src/components/apps/LayeredIntelligenceOutcomes.jsx+++ b/client/src/components/apps/LayeredIntelligenceOutcomes.jsx@@ -119,9 +119,13 @@ export default function LayeredIntelligenceOutcomes({ appId }) {const hiddenCount = Math.max(0, stats.total - visible.length);// Per-scope rows come from `metrics.byScope`, not `execution.byScope`: the latter is// built from approved records only, so a scope whose every proposal was rejected is- // missing from it entirely — exactly the scope a reader most needs to see. Falls back- // to the execution view so an older server (no `metrics` block) still renders rows.- const executionScopes = Object.entries(metrics?.byScope || execution?.byScope || {});+ // missing from it entirely — and among this app's approved scopes, that is the one a+ // reader most needs to see. No fallback to `execution.byScope`: its buckets carry+ // neither `approvalToCompletionRate` nor `rejected`, so every row would render as+ // "none approved" — worse than not rendering. The route always sends `metrics`+ // alongside `execution` when `read` is true, and a falsy `read` already short-circuits+ // to the error banner above, so there is no shape where only one of them arrives.+ const executionScopes = Object.entries(metrics?.byScope || {});return (<div className="space-y-3 bg-port-bg border border-port-border rounded-lg px-3 py-3">diff --git a/client/src/components/apps/LayeredIntelligenceOutcomes.test.jsx b/client/src/components/apps/LayeredIntelligenceOutcomes.test.jsxindex 9e187c38fc..5988bd4144 100644--- a/client/src/components/apps/LayeredIntelligenceOutcomes.test.jsx+++ b/client/src/components/apps/LayeredIntelligenceOutcomes.test.jsx@@ -113,13 +113,19 @@ describe('LayeredIntelligenceOutcomes', () => {expect(screen.getByText(/none approved · 2 rejected/)).toBeInTheDocument();});- it('falls back to the execution breakdown when the server sends no metrics block', async () => {- // An older server predates the `metrics` roll-up; the per-scope rows must still- // render rather than silently emptying the list.+ it('omits per-scope rows rather than mislabelling them when no metrics block arrives', async () => {+ // The route always sends `metrics` beside `execution`, so this shape is not+ // reachable in practice — but if it ever were, `execution.byScope` carries no+ // `approvalToCompletionRate`, and reading it would render a scope with 1/1 delivered+ // as "none approved". Rendering nothing is the honest failure.getAppLayeredIntelligenceOutcomes.mockResolvedValue(ready({ metrics: undefined }));render(<LayeredIntelligenceOutcomes appId="app-001" />);- expect(await screen.findByText('app-improvement')).toBeInTheDocument();+ // The surrounding post-approval block still renders...+ expect(await screen.findByText('post-approval hand-off completion')).toBeInTheDocument();+ // ...but no scope row claims this app approved nothing.+ expect(screen.queryByText('app-improvement')).not.toBeInTheDocument();+ expect(screen.queryByText(/none approved/)).not.toBeInTheDocument();});it('shows a dash for the merge rate when nothing has resolved yet', async () => {