All files / src/pages/insights pipeline.tsx

100% Statements 1/1
100% Branches 0/0
100% Functions 1/1
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34                                                              3x    
import { Navigate } from "@tanstack/react-router";
 
/**
 * `/insights/pipeline` — now a redirect to `/insights`. Plan §0.3's merge.
 *
 * THE MERGE HAPPENED. This page used to be the sales-pipeline half of
 * Insights, kept separate because merging it needed three product calls the
 * file could not make: whether the merged page gets a period picker (the
 * traffic half has no period dimension), which "Sources" panel survives, and
 * what happens to the twelve panels that would land on one screen.
 *
 * All three are answered in the header of `pages/insights.tsx`. In short: the
 * picker belongs to the pipeline SECTION rather than to the page, both
 * "Sources" panels survive under bands that say which kind of source they
 * count, and every panel from both pages is on the merged screen — nothing
 * was dropped. The six panels this page rendered still live in
 * `pages/insights/analytics-panels.tsx` and are now imported by `/insights`.
 *
 * WHY A REDIRECT COMPONENT AND NOT A DELETED ROUTE
 * Three live things point at this path: a bookmark a pro already has, the
 * `/crm/analytics` → `/insights/pipeline` entry in `LEGACY_REDIRECTS`, and the
 * Analytics button on the leads board. Turning the path into a `legacyRedirect`
 * and deleting the lazy import is the tidy end state, and it is a change to
 * `src/routes.tsx` — a file this group does not own in a worktree several
 * agents are writing to. A component that redirects is the same behaviour from
 * inside the file that is ours, and it leaves `routes.tsx` a one-line edit
 * rather than a merge conflict. See this group's handoff notes.
 *
 * `replace` so the redirect does not sit in the back button's history.
 */
export function PipelineInsightsPage() {
	return <Navigate to="/insights" replace />;
}