Open source alternative to Semrush and Ahrefs
TypeScript backlink-analysisgoogle-search-console-mcpkeyword-researchmcpseoseo-agentseo-auditseo-automationseo-skillsseo-toolssite-audit
Rank tracking: label a missing position "Not found", not "Not in top N" (#895)
Carter Smith82ee840b24c1
diff --git a/src/client/features/rank-tracking/KeywordTrendModal.tsx b/src/client/features/rank-tracking/KeywordTrendModal.tsxindex 99e4ef06..78fde08f 100644--- a/src/client/features/rank-tracking/KeywordTrendModal.tsx+++ b/src/client/features/rank-tracking/KeywordTrendModal.tsx@@ -5,6 +5,11 @@ import { toast } from "sonner";import { useQuery } from "@tanstack/react-query";import { QueryState } from "@/client/components/QueryState";import { Skeleton } from "@/client/components/ui/skeleton";+import {+ Tooltip,+ TooltipContent,+ TooltipTrigger,+} from "@/client/components/ui/tooltip";import { Button } from "@/client/components/ui/button";import {Dialog,@@ -123,7 +128,7 @@ export function KeywordTrendModal({);// Keys ("<ts>:<device>") whose plotted point sits in the bottom band because- // the real position was null — so the tooltip can say "Not in top N"+ // the real position was null — so the tooltip can say "Not found"// unambiguously even when a genuine position equals serpDepth.const bottomBandKeys = useMemo(() => {const keys = new Set<string>();@@ -228,7 +233,7 @@ export function KeywordTrendModal({typeof item.dataKey === "string" &&bottomBandKeys.has(`${checkedAt}:${item.dataKey}`) ? (<span className="font-normal text-muted-foreground">- Not in top {serpDepth}+ Not found</span>) : (String(value)@@ -277,9 +282,19 @@ export function KeywordTrendModal({)}<TableCell>{r.position === null ? (- <span className="text-xs text-muted-foreground">- Not in top {serpDepth}- </span>+ <Tooltip>+ <TooltipTrigger+ delay={150}+ render={+ <span className="cursor-help text-xs text-muted-foreground underline decoration-dotted underline-offset-2" />+ }+ >+ Not found+ </TooltipTrigger>+ <TooltipContent>+ Not ranking, or incomplete results+ </TooltipContent>+ </Tooltip>) : (<span className="font-mono text-sm">{r.position}diff --git a/src/client/features/rank-tracking/RankTrackingTrendChart.tsx b/src/client/features/rank-tracking/RankTrackingTrendChart.tsxindex c7a70f1a..a2db2529 100644--- a/src/client/features/rank-tracking/RankTrackingTrendChart.tsx+++ b/src/client/features/rank-tracking/RankTrackingTrendChart.tsx@@ -20,14 +20,14 @@ export interface TrendSeries {dataKey: string;name: string;color: string;- /** dashed = device line where nulls are plotted in the bottom "not in top N" band */+ /** dashed = device line where nulls are plotted in the bottom "not found" band */strokeDasharray?: string;}/*** Shared inverted-axis line chart for rank trends. Y-axis is reversed so #1 is* pinned at the top and an improving line moves up. The very bottom of the- * plot (= serpDepth) is a muted "Not in top {serpDepth}" band; callers plot+ * plot (= serpDepth) is a muted "Not found" band; callers plot* null positions at `serpDepth` so a drop reads as the line dipping into the* band rather than a silent gap.*/@@ -42,7 +42,7 @@ export function RankTrendChart({series: TrendSeries[];serpDepth: number;valueFormatter?: ComponentProps<typeof ChartTooltipContent>["valueFormatter"];- /** Show the muted "not in top {serpDepth}" band — only meaningful for a+ /** Show the muted "not found" band — only meaningful for a* single keyword's position line, not for an averaged value. */showBottomBand?: boolean;}) {@@ -64,7 +64,7 @@ export function RankTrendChart({margin={{ top: 8, right: 8, bottom: 0, left: 0 }}><ChartGrid />- {/* Muted bottom band: not in top {serpDepth} */}+ {/* Muted bottom band: not found */}{showBottomBand && (<ReferenceAreay1={serpDepth - 0.5}diff --git a/src/server/mcp/tools/get-rank-tracker.ts b/src/server/mcp/tools/get-rank-tracker.tsindex 723e4084..b3aa053c 100644--- a/src/server/mcp/tools/get-rank-tracker.ts+++ b/src/server/mcp/tools/get-rank-tracker.ts@@ -73,7 +73,7 @@ export const getRankTrackerTool = {config: {title: "Get rank tracker",description:- "Read-only access to rank tracker configs and their latest results. With `trackerId`, returns config + latest snapshot per keyword, including `trackingKeywordId` for removals and pins, `pinned` (pinned keywords are listed first), and `googleSerpUrl`, a live Google search for the tracked keyword, language, country, and city. Without it, lists all trackers in the project. Uses no credits. Use create_rank_tracker when no tracker exists; then use add_rank_tracking_keywords, remove_rank_tracking_keywords, pin_rank_tracking_keywords, estimate_rank_tracker_cost, or run_rank_tracker to manage it. `lastCheckedAt` shows position freshness.",+ "Read-only access to rank tracker configs and their latest results. With `trackerId`, returns config + latest snapshot per keyword, including `trackingKeywordId` for removals and pins, `pinned` (pinned keywords are listed first), and `googleSerpUrl`, a live Google search for the tracked keyword, language, country, and city. Without it, lists all trackers in the project. Uses no credits. Use create_rank_tracker when no tracker exists; then use add_rank_tracking_keywords, remove_rank_tracking_keywords, pin_rank_tracking_keywords, estimate_rank_tracker_cost, or run_rank_tracker to manage it. `lastCheckedAt` shows position freshness. A null position means the domain was not found in the results the check returned, which can be fewer than `serpDepth`, so it does not prove the domain ranks below `serpDepth`.",inputSchema,outputSchema: z.object({