feat(expo-router): add Expo Router support for screens and navigates

Introduce Expo Router integration: a new framework resolver, route-based screen nodes, and navigates edges, plus a /api/screens endpoint and a Screens UI view. Adds branch-guard-driven labeling of edges, resolution logic, and tests to cover extraction, resolution, and end-to-end flow. This enables CodeGraph UI to surface screens and transitions from Expo Router apps.
This commit is contained in:
Colby McHenry
2026-08-27 22:52:18 -05:00
parent ac9580544b
commit 70fd5fefc2
42 changed files with 4257 additions and 33 deletions
+52
View File
@@ -117,6 +117,8 @@ export interface WireEdge {
via?: string;
registeredAt?: string;
valueRef?: boolean;
/** Branch conditions the call site runs under — `!isUploading && isCollected`. */
when?: string;
}
/** Every edge between the focal symbol and ONE other symbol, as a single row. */
@@ -642,6 +644,56 @@ export interface WireMapPayload {
timing: { elapsedMs: number; cached: boolean };
}
/* ---------------------------------------------------------------- screens -- */
export interface WireScreen {
id: string;
path: string;
file: string;
line: number;
component: WireNodeRef | null;
incoming: number;
outgoing: number;
}
export interface WireScreenOrigin {
id: string;
node: WireNodeRef;
outgoing: number;
/** Shared chrome: how many screens render it. */
sharedBy?: number;
}
export interface WireScreenSite {
file: string;
line: number;
href: string;
method: string;
when: string;
}
export interface WireScreenLink {
id: string;
from: string;
to: string;
fromOrigin: boolean;
via: WireNodeRef[];
when: string;
sites: WireScreenSite[];
synthesized: boolean;
}
export interface WireScreensPayload {
routed: boolean;
entry: string | null;
screens: WireScreen[];
origins: WireScreenOrigin[];
links: WireScreenLink[];
dropped: number;
index: { lastIndexedAt: number | null; edges: number; files: number };
timing: { elapsedMs: number };
}
/* -------------------------------------------------------------- dead code -- */
/** One symbol nothing in the index reaches. */