Skip to content

perf(dashboard): de-duplicate overlapping vitest projects - #1700

Merged
gsxdsm merged 2 commits into
mainfrom
perf/dashboard-test-project-dedup
Jun 21, 2026
Merged

perf(dashboard): de-duplicate overlapping vitest projects#1700
gsxdsm merged 2 commits into
mainfrom
perf/dashboard-test-project-dedup

Conversation

@gsxdsm

@gsxdsm gsxdsm commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Problem

pnpm test was running every dashboard test file multiple times. The default vitest run path (no --project) — which pnpm test hits via test-changed's vitest --changed scoping — executed each file in up to 3 overlapping projects:

  • the dashboard-app-quality umbrella (re-runs the exact union of its 8 curated shards),
  • the matching curated shard, and
  • the broad dashboard-app / dashboard-api lanes.

Measured on a real diff: a scoped run selected 1899 executions for 829 unique files — a 2.3× redundancy with zero added coverage. App.test.tsx alone ran in 3 projects.

Change

  • Remove the dead dashboard-app-quality umbrella project. It re-ran the exact union of its eight curated shards and is referenced by nothing — absent from test-inventory-spec.json and dashboardQualityProjectGlobs, used by no script, and package-config's contract test already asserts test:deep must not use it.
  • Gate the broad dashboard-app / dashboard-api includes behind FUSION_DASHBOARD_DEEP. They're empty in the default run (so they stop duplicating the curated shards + backfill) but remain selectable via --project. The explicit deep escape hatches — test:deep / test:app / test:api / test:build — set the flag to opt back in.

Net: the default scoped run now selects 829 executions for 829 files (1×).

Verification

Check Result
Default-run selections 1899 → 829 (1× per file; App.test.tsx 3→1)
Curated-gate inventory guard (check-test-inventory --dashboard-curated) ✓ 828 files, 829 executed, 1 skip-listed — coverage intact
package-config contract test ✓ 31/31 pass
FUSION_DASHBOARD_DEEP=1 hatch ✓ repopulates broad lanes; build-output.test.ts still reachable for test:build

No coverage lost, no contract broken — purely the redundant re-execution removed.

🤖 Generated with Claude Code


Open in Stage

Summary by CodeRabbit

  • Tests
    • Updated test scripts with a flag-based mechanism to control test scope selection.
    • Refactored test configuration to optimize test execution and prevent redundant test runs during default operations.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 723353c1-30fd-46a4-8b48-03ab16ee8450

📥 Commits

Reviewing files that changed from the base of the PR and between d014e88 and 91957d4.

📒 Files selected for processing (2)
  • packages/dashboard/package.json
  • packages/dashboard/vitest.config.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/dashboard/package.json
  • packages/dashboard/vitest.config.ts

📝 Walkthrough

Walkthrough

The Vitest configuration adds a FUSION_DASHBOARD_DEEP=1 environment flag that gates the dashboard-app and dashboard-api projects' include globs: without the flag, those arrays are empty and selecting the projects explicitly triggers a console warning. The dashboard-app-quality umbrella project is removed. The four affected package.json test scripts are prefixed with FUSION_DASHBOARD_DEEP=1.

Changes

Vitest FUSION_DASHBOARD_DEEP Gating

Layer / File(s) Summary
Vitest config: deepLaneEnabled gating, umbrella removal, project include wiring
packages/dashboard/vitest.config.ts
Introduces deepLaneEnabled from process.env.FUSION_DASHBOARD_DEEP; sets deepAppInclude/deepApiInclude to broad globs or empty arrays; emits a console.warn when --project dashboard-app or --project dashboard-api is passed without the flag; removes the dashboard-app-quality umbrella project; wires both project definitions to use the conditional include variables.
Test script env-var prefix
packages/dashboard/package.json
test:app, test:api, test:deep, and test:build are prefixed with FUSION_DASHBOARD_DEEP=1 so those invocations continue to exercise the broad test partitions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop, hop, I set the flag so right,
FUSION_DASHBOARD_DEEP=1 shines bright!
Empty globs by default, no dupes to dread,
The umbrella project? Gone — use deep instead.
A tiny console.warn if you stray,
The curated shards shall rule the day! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'perf(dashboard): de-duplicate overlapping vitest projects' accurately captures the main change: removing redundant test executions by de-duplicating overlapping vitest projects in the dashboard configuration.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch perf/dashboard-test-project-dedup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ghost

ghost commented Jun 21, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 3 individual chapters for you:

Title
1 Remove redundant dashboard-app-quality umbrella project
2 Implement conditional gating for broad test lanes
3 Update scripts to use deep test flag
Open in Stage

Chapters generated by Stage for commit 91957d4 on Jun 21, 2026 9:09am UTC.

The default `vitest run` (no --project) path — used by `pnpm test` via
test-changed's `vitest --changed` scoping — ran every dashboard test file in
up to 3 overlapping projects: the `dashboard-app-quality` umbrella, a curated
shard, and the broad `dashboard-app`/`dashboard-api` lanes. A scoped run
selected 1899 executions for 829 unique files (2.3x redundant work).

- Remove the dead `dashboard-app-quality` umbrella project: it re-ran the exact
  union of its eight curated shards. It is absent from test-inventory-spec.json,
  dashboardQualityProjectGlobs, and every script; package-config's contract test
  already asserts test:deep must not use it.
- Gate the broad `dashboard-app`/`dashboard-api` includes behind
  FUSION_DASHBOARD_DEEP so they are empty in the default run (no longer
  duplicating the curated shards + backfill) but remain selectable via
  --project. The explicit deep escape hatches (test:deep/test:app/test:api/
  test:build) set the flag to opt back in.

Default scoped run now selects 829 executions for 829 files (1x). Verified:
curated-gate inventory guard intact (828 files, 829 executed, 1 skip-listed),
package-config contract test green (31/31), build-output.test.ts still
reachable via test:build, deep hatch repopulates with the flag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/dashboard/app/components/WorkflowSwitcher.tsx (1)

194-196: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Preserve a keyboard path to workflow edit/create actions.

Line 194 closes the menu on Tab while focus stays on the trigger, but edit/create controls now exist only inside the dropdown (Line 264+ and Line 284+). Keyboard-only users can’t reliably reach those actions.

Suggested direction
case "Tab":
-  setIsOpen(false);
+  if (isOpen) {
+    const firstMenuControl = dropdownRef.current?.querySelector<HTMLButtonElement>(
+      ".workflow-switcher-option, .workflow-switcher-edit, .workflow-switcher-create",
+    );
+    if (firstMenuControl) {
+      event.preventDefault();
+      firstMenuControl.focus();
+      return;
+    }
+  }
+  setIsOpen(false);
   break;

Also applies to: 264-295

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/dashboard/app/components/WorkflowSwitcher.tsx` around lines 194 -
196, The Tab key handler in the WorkflowSwitcher component closes the dropdown
immediately, preventing keyboard-only users from reaching the edit and create
controls which now exist only inside the dropdown. Instead of closing the menu
on Tab, allow the default Tab behavior to proceed so focus can move forward
through the dropdown content to reach those actions. Remove or modify the case
statement for Tab so it doesn't call setIsOpen(false), allowing natural keyboard
navigation to continue through the dropdown controls.
🧹 Nitpick comments (2)
packages/dashboard/vitest.config.ts (1)

330-337: ⚡ Quick win

Add an FNXC-formatted requirement header for the deep-lane policy.

Line 330 documents a behavior-defining test-lane policy; please encode it with the repo’s FNXC convention so this requirement remains traceable in future edits.

Suggested update
+/*
+FNXC:DashboardTesting 2026-06-21-00:00:
+Deep lanes (`dashboard-app`/`dashboard-api`) are opt-in via FUSION_DASHBOARD_DEEP=1 to avoid duplicate execution in default scoped runs.
+*/
 // The broad `dashboard-app` / `dashboard-api` lanes fully duplicate the curated
 // shards + backfill projects, which already partition app/ and src/ exactly
 // once. They exist ONLY as the explicit deep escape hatches

As per coding guidelines **/*.{ts,tsx,js,jsx}: “Add FNXC_LOG comments (format: FNXC:Area-of-product yyyy-MM-dd-hh:mm:) …”; based on learnings, follow FNXC format directly (no literal FNXC_LOG token in comment text).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/dashboard/vitest.config.ts` around lines 330 - 337, The comment
block documenting the deep-lane policy (starting with "// The broad
`dashboard-app` / `dashboard-api` lanes") needs to be prefixed with an
FNXC-formatted requirement header to make it traceable. Add a new comment line
at the beginning of this comment block following the format FNXC:Area-of-product
yyyy-MM-dd-hh:mm: (without the literal `FNXC_LOG` token), identifying the
relevant product area and using the current timestamp, then keep the existing
explanatory comments intact below it.

Sources: Coding guidelines, Learnings

packages/engine/src/__tests__/reliability-interactions/merge-runner-spawn-enoent-prevention.test.ts (1)

87-115: ⚡ Quick win

Add FNXC rationale comment above the FN-6817 regression test.

Line 87 introduces requirement-specific fixture-root behavior; please add an FNXC-formatted header so the reason for this invariant remains discoverable.

As per coding guidelines **/*.{ts,tsx,js,jsx}: “Add FNXC_LOG comments (format: FNXC:Area-of-product yyyy-MM-dd-hh:mm:) …”; based on learnings, use the FNXC format directly rather than adding a literal FNXC_LOG token.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/engine/src/__tests__/reliability-interactions/merge-runner-spawn-enoent-prevention.test.ts`
around lines 87 - 115, The test function for "FN-6817: roots the shared
reliability fixture under the Vitest worker root" is missing a FNXC-formatted
header comment that explains the rationale for this requirement-specific
fixture-root behavior. Add an FNXC comment directly above the test function
declaration using the format FNXC:Area-of-product yyyy-MM-dd-hh:mm: to document
why this invariant behavior is necessary for the reliability interactions test.

Sources: Coding guidelines, Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/desktop/src/local-runtime.ts`:
- Around line 53-72: The issue is that if initialization fails after creating
the CentralCore and ProjectEngineManager but before returning the cleanup
function (for example, if app.listen throws an error), the engines and central
core are never properly torn down. Fix this by wrapping the initialization logic
in a try-finally block within the function that contains CentralCore
initialization, ProjectEngineManager creation, and app.listen call. In the
finally block, ensure that engineManager.stopAll() and centralCore.close() are
always called regardless of success or failure. Additionally, ensure that
store.close() is called unconditionally in both the startup error catch handler
and the stopInternal cleanup path to guarantee proper resource cleanup across
all failure scenarios.

In `@packages/desktop/src/local-server.ts`:
- Around line 63-79: The cleanup function is defined only after createServer and
listen are called, so if either throws an error, the already-started
engineManager and centralCore will never be torn down. Additionally, if cleanup
throws in either the catch or stop paths, it prevents store.close() from
running. To fix this, define and populate the cleanup logic before calling
createServer and listen so it can handle early startup failures, and restructure
the error handling to ensure store.close() is always called even if cleanup
throws, likely by using a try-finally block or separating the cleanup execution
from store.close() so both are guaranteed to run.
- Around line 52-55: The dynamic imports of TaskStore, CentralCore,
createServer, and ProjectEngineManager on lines 52-55 must be converted to
static imports at the module level. Move these four import statements to the top
of the local-server.ts file using standard static import syntax (import { ... }
from "...") instead of dynamic await import() calls. Since these imports are
used immediately without lazy-loading justification, there is no valid reason to
keep them as runtime dynamic imports, and they must be statically analyzable per
the repo's requirements for `@fusion/`* packages.

In `@packages/desktop/src/main.ts`:
- Around line 241-249: In the onStartLocalRuntime function, replace the
createdWindow.webContents.reload() call with a pattern that loads a clean
renderer entrypoint instead. The issue is that reload() preserves the current
URL and query parameters, which keeps the UI bound to the remote context even
after switching to local mode. Follow the same loading pattern used in the
resetLaunchModeAndReload function to ensure a fresh start for the local runtime
context.

In `@packages/desktop/src/menu.ts`:
- Around line 18-22: The runMenuAction function has a synchronous error handling
issue where action() is called directly before Promise wrapping, allowing sync
errors to bypass the catch handler. To fix this, modify the Promise.resolve()
call to delay the action() execution by chaining .then(() => action()) instead
of passing action() directly as an argument to Promise.resolve(). This ensures
both synchronous and asynchronous errors thrown by action() are properly caught
by the catch handler.

---

Outside diff comments:
In `@packages/dashboard/app/components/WorkflowSwitcher.tsx`:
- Around line 194-196: The Tab key handler in the WorkflowSwitcher component
closes the dropdown immediately, preventing keyboard-only users from reaching
the edit and create controls which now exist only inside the dropdown. Instead
of closing the menu on Tab, allow the default Tab behavior to proceed so focus
can move forward through the dropdown content to reach those actions. Remove or
modify the case statement for Tab so it doesn't call setIsOpen(false), allowing
natural keyboard navigation to continue through the dropdown controls.

---

Nitpick comments:
In `@packages/dashboard/vitest.config.ts`:
- Around line 330-337: The comment block documenting the deep-lane policy
(starting with "// The broad `dashboard-app` / `dashboard-api` lanes") needs to
be prefixed with an FNXC-formatted requirement header to make it traceable. Add
a new comment line at the beginning of this comment block following the format
FNXC:Area-of-product yyyy-MM-dd-hh:mm: (without the literal `FNXC_LOG` token),
identifying the relevant product area and using the current timestamp, then keep
the existing explanatory comments intact below it.

In
`@packages/engine/src/__tests__/reliability-interactions/merge-runner-spawn-enoent-prevention.test.ts`:
- Around line 87-115: The test function for "FN-6817: roots the shared
reliability fixture under the Vitest worker root" is missing a FNXC-formatted
header comment that explains the rationale for this requirement-specific
fixture-root behavior. Add an FNXC comment directly above the test function
declaration using the format FNXC:Area-of-product yyyy-MM-dd-hh:mm: to document
why this invariant behavior is necessary for the reliability interactions test.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c13d4af4-816d-46dc-a360-ca174c160414

📥 Commits

Reviewing files that changed from the base of the PR and between 2c1cff8 and d014e88.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (59)
  • .changeset/local-starts-engine.md
  • README.md
  • docs/cli-reference.md
  • docs/contributing.md
  • docs/dashboard-guide.md
  • packages/cli/README.md
  • packages/cli/STANDALONE.md
  • packages/cli/skill/fusion/references/cli-commands.md
  • packages/cli/skill/fusion/references/fusion-capabilities.md
  • packages/cli/src/bin.ts
  • packages/cli/src/commands/__tests__/dashboard.test.ts
  • packages/cli/src/commands/__tests__/desktop.test.ts
  • packages/cli/src/commands/dashboard.ts
  • packages/cli/src/commands/desktop.ts
  • packages/dashboard/app/App.tsx
  • packages/dashboard/app/__tests__/mobile-nav-bar-css.test.ts
  • packages/dashboard/app/api/legacy.ts
  • packages/dashboard/app/components/Board.tsx
  • packages/dashboard/app/components/EngineUnavailableBanner.css
  • packages/dashboard/app/components/EngineUnavailableBanner.tsx
  • packages/dashboard/app/components/GoalsView.css
  • packages/dashboard/app/components/Header.css
  • packages/dashboard/app/components/Header.tsx
  • packages/dashboard/app/components/Lane.css
  • packages/dashboard/app/components/LeftSidebarNav.css
  • packages/dashboard/app/components/ListView.tsx
  • packages/dashboard/app/components/WorkflowSwitcher.css
  • packages/dashboard/app/components/WorkflowSwitcher.tsx
  • packages/dashboard/app/components/__tests__/App.test.tsx
  • packages/dashboard/app/components/__tests__/Board.test.tsx
  • packages/dashboard/app/components/__tests__/GoalsView.test.tsx
  • packages/dashboard/app/components/__tests__/Header.test.tsx
  • packages/dashboard/app/components/__tests__/ListView.test.tsx
  • packages/dashboard/app/components/__tests__/WorkflowSwitcher.test.tsx
  • packages/dashboard/app/components/command-center/__tests__/charts.test.tsx
  • packages/dashboard/app/components/command-center/areas/__tests__/areas.test.tsx
  • packages/dashboard/app/components/command-center/charts/LineChart.tsx
  • packages/dashboard/app/components/command-center/charts/charts.css
  • packages/dashboard/package.json
  • packages/dashboard/src/__tests__/server.test.ts
  • packages/dashboard/src/server.ts
  • packages/dashboard/vitest.config.ts
  • packages/desktop/package.json
  • packages/desktop/src/__tests__/local-runtime.test.ts
  • packages/desktop/src/__tests__/local-server.test.ts
  • packages/desktop/src/__tests__/menu.test.ts
  • packages/desktop/src/local-runtime.ts
  • packages/desktop/src/local-server.ts
  • packages/desktop/src/main.ts
  • packages/desktop/src/menu.ts
  • packages/engine/src/__tests__/reliability-interactions/_helpers.ts
  • packages/engine/src/__tests__/reliability-interactions/merge-runner-spawn-enoent-prevention.test.ts
  • packages/i18n/locales/en/app.json
  • packages/i18n/locales/es/app.json
  • packages/i18n/locales/fr/app.json
  • packages/i18n/locales/ko/app.json
  • packages/i18n/locales/zh-CN/app.json
  • packages/i18n/locales/zh-TW/app.json
  • scripts/start-local.mjs
💤 Files with no reviewable changes (1)
  • packages/dashboard/app/components/Lane.css

Comment thread packages/desktop/src/local-runtime.ts Outdated
Comment thread packages/desktop/src/local-server.ts Outdated
Comment thread packages/desktop/src/local-server.ts Outdated
Comment thread packages/desktop/src/main.ts Outdated
Comment thread packages/desktop/src/menu.ts Outdated
@gsxdsm
gsxdsm force-pushed the perf/dashboard-test-project-dedup branch from d014e88 to d92b325 Compare June 21, 2026 07:11
@greptile-apps

greptile-apps Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR eliminates a 2.3× test-execution redundancy in the dashboard's default vitest run path by removing the dead dashboard-app-quality umbrella project and gating the broad dashboard-app / dashboard-api lanes behind a FUSION_DASHBOARD_DEEP=1 environment variable. The result is exactly 1 execution per file (829 → 829) in the default run, with the full broad lanes still reachable via the test:app / test:api / test:deep / test:build npm scripts.

  • Removed the dashboard-app-quality umbrella project, which duplicated the union of the eight curated shards and was unreferenced by any script or inventory spec.
  • Gated include arrays for dashboard-app and dashboard-api to [] unless FUSION_DASHBOARD_DEEP=1, and added a process.argv-based footgun warning when those projects are explicitly selected without the env var.
  • Updated test:app, test:api, test:deep, and test:build in package.json to set FUSION_DASHBOARD_DEEP=1, preserving their original behavior as the opted-in deep escape hatches.

Confidence Score: 5/5

Safe to merge — the change is purely structural (no production code touched) and the partitioning logic has been verified to preserve full test coverage.

The two changed files are test infrastructure only. The curated shards + backfill projects continue to cover every app/ and src/ file exactly once in the default run; the deep lanes are correctly re-activated by the four npm scripts that need them. The footgun guard warns on accidental direct --project invocations without the env var. No coverage is dropped, no contract test is broken, and the removal of the umbrella project is confirmed to have zero downstream references.

No files require special attention.

Important Files Changed

Filename Overview
packages/dashboard/vitest.config.ts Removes the redundant dashboard-app-quality umbrella project and gates dashboard-app / dashboard-api broad lanes behind FUSION_DASHBOARD_DEEP=1; includes a process.argv-based footgun guard warning when the empty projects are explicitly selected.
packages/dashboard/package.json Prepends FUSION_DASHBOARD_DEEP=1 to the test:app, test:api, test:deep, and test:build npm scripts so the now-gated broad lanes re-activate for the explicit deep escape hatches.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["pnpm test / vitest --changed"] --> B{FUSION_DASHBOARD_DEEP=1?}
    B -- No\n(default) --> C["Curated shards\ndashboard-app-quality-*\n(8 projects)"]
    B -- No --> D["dashboard-api-quality"]
    B -- No --> E["Backfill lanes\ndashboard-app-quality-backfill\ndashboard-api-quality-backfill"]
    B -- No --> F["dashboard-app include: []\ndashboard-api include: []"]
    C --> G["829 unique files,\n829 executions (1x)"]
    D --> G
    E --> G
    F --> G
    B -- Yes\n(test:app / test:api\ntest:deep / test:build) --> H["dashboard-app\ninclude: app/**/*.test.*"]
    B -- Yes --> I["dashboard-api\ninclude: src/**/*.test.*"]
    H --> J["Broad deep run\n(all files, no curated sharding)"]
    I --> J
    K["REMOVED: dashboard-app-quality\numbrella (was 3rd copy of\ncurated shards in default run)"] -. removed .-> L["1899 → 829 executions\n2.3x redundancy eliminated"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["pnpm test / vitest --changed"] --> B{FUSION_DASHBOARD_DEEP=1?}
    B -- No\n(default) --> C["Curated shards\ndashboard-app-quality-*\n(8 projects)"]
    B -- No --> D["dashboard-api-quality"]
    B -- No --> E["Backfill lanes\ndashboard-app-quality-backfill\ndashboard-api-quality-backfill"]
    B -- No --> F["dashboard-app include: []\ndashboard-api include: []"]
    C --> G["829 unique files,\n829 executions (1x)"]
    D --> G
    E --> G
    F --> G
    B -- Yes\n(test:app / test:api\ntest:deep / test:build) --> H["dashboard-app\ninclude: app/**/*.test.*"]
    B -- Yes --> I["dashboard-api\ninclude: src/**/*.test.*"]
    H --> J["Broad deep run\n(all files, no curated sharding)"]
    I --> J
    K["REMOVED: dashboard-app-quality\numbrella (was 3rd copy of\ncurated shards in default run)"] -. removed .-> L["1899 → 829 executions\n2.3x redundancy eliminated"]
Loading

Reviews (2): Last reviewed commit: "perf(dashboard): warn on empty deep-lane..." | Re-trigger Greptile

Comment thread packages/dashboard/package.json
Comment thread packages/dashboard/vitest.config.ts
Selecting a gated deep lane explicitly (`vitest run --project dashboard-app`
or `--project dashboard-api`) without FUSION_DASHBOARD_DEEP=1 matches zero
files and exits green in milliseconds — a silent no-op that reads as a passing
run. Emit a loud console.warn so a manual invocation isn't mistaken for
coverage. Exact token match avoids firing on the curated `dashboard-app-*`
shard projects; the deep scripts set the flag, so it never fires through the
intended entry points.

Argv parser validated against space/equals forms, both lanes, every curated
shard, and the default no-`--project` run (10/10).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gsxdsm
gsxdsm merged commit a609c16 into main Jun 21, 2026
6 checks passed
@gsxdsm
gsxdsm deleted the perf/dashboard-test-project-dedup branch June 21, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant