test(FN-5098): complete Step 6 — update lazy-view inventory docs
Fusion-Task-Id: FN-5098 Fusion-Task-Lineage: 67ff982f-f0fa-453a-9b73-32ddc3ae5b3a
This commit is contained in:
committed by
gsxdsm
parent
da2d3632ab
commit
6dc67204da
@@ -442,13 +442,14 @@ Breakpoints: 768px (primary mobile), 1024px (tablet `min-width: 769px and max-wi
|
||||
|
||||
### Lazy-Loaded Heavy Views
|
||||
|
||||
These 18 views are lazy-loaded via `React.lazy()` with `<Suspense fallback={null}>`. `prefetchLazyViews()` warms chunks once on mount via `requestIdleCallback`. **Do not make these eager.**
|
||||
These 19 views are lazy-loaded via `React.lazy()` with `<Suspense fallback={null}>`. `prefetchLazyViews()` warms chunks once on mount via `requestIdleCallback`. **Do not make these eager.**
|
||||
|
||||
- `AgentsView`
|
||||
- `NodesView`
|
||||
- `ChatView`
|
||||
- `MemoryView`
|
||||
- `DevServerView`
|
||||
- `SecretsView`
|
||||
- `InsightsView`
|
||||
- `DocumentsView`
|
||||
- `SkillsView`
|
||||
|
||||
@@ -8,6 +8,7 @@ const EXPECTED_DOCUMENTED_VIEWS = new Set([
|
||||
"ChatView",
|
||||
"MemoryView",
|
||||
"DevServerView",
|
||||
"SecretsView",
|
||||
"InsightsView",
|
||||
"DocumentsView",
|
||||
"SkillsView",
|
||||
@@ -33,6 +34,7 @@ const EXPECTED_APP_LEVEL_VIEWS = new Set([
|
||||
"ChatView",
|
||||
"SkillsView",
|
||||
"MemoryView",
|
||||
"SecretsView",
|
||||
"ReliabilityView",
|
||||
"DevServerView",
|
||||
"TodoView",
|
||||
@@ -72,18 +74,18 @@ function extractAppLazyViews(appSource: string): Set<string> {
|
||||
}
|
||||
|
||||
describe("AGENTS lazy-loaded views inventory", () => {
|
||||
it("documents the App-level lazy views accurately and keeps the curated 18-view list in sync", () => {
|
||||
it("documents the App-level lazy views accurately and keeps the curated 19-view list in sync", () => {
|
||||
const agentsDoc = readFileSync(resolve(__dirname, "../../../../AGENTS.md"), "utf-8");
|
||||
const appSource = readFileSync(resolve(__dirname, "../App.tsx"), "utf-8");
|
||||
|
||||
const section = extractLazyLoadedSection(agentsDoc);
|
||||
const countMatch = section.match(/These\s+(\d+)\s+views\s+are lazy-loaded/);
|
||||
expect(countMatch).toBeTruthy();
|
||||
expect(Number(countMatch?.[1])).toBe(18);
|
||||
expect(Number(countMatch?.[1])).toBe(19);
|
||||
|
||||
const documentedViews = extractBacktickedNamesFromBullets(section);
|
||||
expect(new Set(documentedViews)).toEqual(EXPECTED_DOCUMENTED_VIEWS);
|
||||
expect(documentedViews).toHaveLength(18);
|
||||
expect(documentedViews).toHaveLength(19);
|
||||
|
||||
expect(section).toContain("`ResearchView`");
|
||||
expect(section).toContain("`TodoView`");
|
||||
|
||||
Reference in New Issue
Block a user