spine-framework 0.4.4 → 0.5.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +13 -3
- package/.framework/cli/commands/bootstrap.ts +392 -0
- package/.framework/cli/commands/dev.ts +91 -218
- package/.framework/cli/commands/doctor.ts +132 -26
- package/.framework/cli/commands/generate.ts +38 -298
- package/.framework/cli/commands/init.ts +20 -1
- package/.framework/cli/commands/migrate.ts +36 -30
- package/.framework/cli/commands/migrations.ts +16 -56
- package/.framework/cli/commands/upgrade.ts +35 -0
- package/.framework/cli/commands/validate-schema.ts +147 -0
- package/.framework/cli/context.ts +223 -110
- package/.framework/cli/index.ts +6 -0
- package/.framework/cli/lib/project-files.ts +241 -1
- package/.framework/functions/_shared/hash-api-key.ts +183 -79
- package/.framework/functions/_shared/logging.ts +562 -224
- package/.framework/functions/_shared/middleware.ts +47 -44
- package/.framework/functions/admin-data.ts +39 -28
- package/.framework/functions/ai-agents.ts +10 -6
- package/.framework/functions/api-keys.ts +301 -122
- package/.framework/functions/apps.ts +43 -26
- package/.framework/functions/cil-ingest.ts +48 -15
- package/.framework/functions/debug-auth.ts +14 -8
- package/.framework/functions/deliveries.ts +39 -12
- package/.framework/functions/embeddings.ts +145 -76
- package/.framework/functions/integration-outbound.ts +67 -27
- package/.framework/functions/integrations.ts +254 -127
- package/.framework/functions/logs.ts +273 -133
- package/.framework/functions/observability.ts +277 -147
- package/.framework/functions/pipeline-executions.ts +1 -1
- package/.framework/functions/pipelines.ts +14 -9
- package/.framework/functions/prompt-configs.ts +7 -4
- package/.framework/functions/roles.ts +8 -5
- package/.framework/functions/security.ts +30 -17
- package/.framework/functions/system-cron.ts +240 -127
- package/.framework/functions/tests.ts +7 -6
- package/.framework/functions/timers.ts +310 -107
- package/.framework/functions/triggers.ts +28 -13
- package/.framework/functions/types.ts +13 -10
- package/.framework/migrations/069_log_stats_window.sql +54 -0
- package/.framework/migrations/070_app_type_schema_rpcs.sql +166 -0
- package/.framework/migrations/071_timer_interval_keys.sql +96 -0
- package/.framework/migrations/072_slug_autofill.sql +77 -0
- package/.framework/migrations/073_seed_member_roles.sql +26 -0
- package/.framework/src/apps/admin/index.tsx +1141 -775
- package/.framework/src/components/ErrorBoundary.tsx +136 -0
- package/.framework/src/components/admin/AdminListPage.tsx +81 -73
- package/.framework/src/components/admin/AdminSidebar.tsx +88 -79
- package/.framework/src/components/admin/EntitySelect.tsx +181 -0
- package/.framework/src/components/admin/PageInstructions.tsx +86 -127
- package/.framework/src/components/app-shell/GenericDetailPage.tsx +37 -13
- package/.framework/src/components/app-shell/GenericListPage.tsx +28 -32
- package/.framework/src/components/layout/Sidebar.tsx +300 -177
- package/.framework/src/components/runtime/DataDetailPage.tsx +67 -35
- package/.framework/src/components/runtime/DataHeader.tsx +96 -48
- package/.framework/src/components/runtime/DataListPage.tsx +3 -26
- package/.framework/src/components/runtime/DataStats.tsx +10 -10
- package/.framework/src/components/runtime/DataTable.tsx +12 -10
- package/.framework/src/components/ui/sheet.tsx +24 -26
- package/.framework/src/components/ui/textarea.tsx +74 -48
- package/.framework/src/hooks/useEntityList.ts +12 -9
- package/.framework/src/hooks/useListSchema.ts +108 -58
- package/.framework/src/instructions/README.md +57 -0
- package/.framework/src/instructions/ai-agents.md +69 -0
- package/.framework/src/instructions/alerts.md +80 -0
- package/.framework/src/instructions/api-keys.md +87 -0
- package/.framework/src/instructions/apps.md +77 -0
- package/.framework/src/instructions/concepts/ai-and-prompts.md +150 -0
- package/.framework/src/instructions/concepts/apps-and-renderers.md +162 -0
- package/.framework/src/instructions/concepts/auth-and-api-keys.md +133 -0
- package/.framework/src/instructions/concepts/automation.md +186 -0
- package/.framework/src/instructions/concepts/concurrency-and-idempotency.md +125 -0
- package/.framework/src/instructions/concepts/core-vs-custom.md +124 -0
- package/.framework/src/instructions/concepts/design-schema.md +152 -0
- package/.framework/src/instructions/concepts/integrations-and-webhooks.md +127 -0
- package/.framework/src/instructions/concepts/observability.md +116 -0
- package/.framework/src/instructions/concepts/permissions.md +150 -0
- package/.framework/src/instructions/concepts/runtime-records.md +111 -0
- package/.framework/src/instructions/concepts/scope-and-accounts.md +112 -0
- package/.framework/src/instructions/concepts/spine-way.md +172 -0
- package/.framework/src/instructions/deliveries.md +59 -0
- package/.framework/src/instructions/guide/00-orientation.md +106 -0
- package/.framework/src/instructions/guide/01-install-and-first-run.md +253 -0
- package/.framework/src/instructions/guide/02-project-map.md +147 -0
- package/.framework/src/instructions/guide/03-domain-model.md +223 -0
- package/.framework/src/instructions/guide/04-first-app.md +227 -0
- package/.framework/src/instructions/guide/05-glossary.md +183 -0
- package/.framework/src/instructions/integrations.md +96 -0
- package/.framework/src/instructions/internal/cil-markers.md +83 -0
- package/.framework/src/instructions/invites.md +60 -0
- package/.framework/src/instructions/kb.md +80 -0
- package/.framework/src/instructions/logs.md +77 -0
- package/.framework/src/instructions/observability.md +61 -0
- package/.framework/src/instructions/operations/deployment.md +115 -0
- package/.framework/src/instructions/operations/migrations.md +125 -0
- package/.framework/src/instructions/operations/security-checklist.md +148 -0
- package/.framework/src/instructions/operations/troubleshooting.md +170 -0
- package/.framework/src/instructions/operations/upgrade.md +116 -0
- package/.framework/src/instructions/pipeline-executions.md +62 -0
- package/.framework/src/instructions/pipelines.md +78 -0
- package/.framework/src/instructions/prompts.md +95 -0
- package/.framework/src/instructions/reference/api/admin-data.md +162 -0
- package/.framework/src/instructions/reference/api/auth.md +113 -0
- package/.framework/src/instructions/reference/api/errors-and-envelopes.md +113 -0
- package/.framework/src/instructions/reference/app-manifest.md +150 -0
- package/.framework/src/instructions/reference/cli.md +124 -0
- package/.framework/src/instructions/reference/database.md +132 -0
- package/.framework/src/instructions/reference/design-schema.md +280 -0
- package/.framework/src/instructions/reference/env-vars.md +133 -0
- package/.framework/src/instructions/reference/functions/account-nodes.md +75 -0
- package/.framework/src/instructions/reference/functions/admin-data.md +195 -0
- package/.framework/src/instructions/reference/functions/admin-funnel.md +90 -0
- package/.framework/src/instructions/reference/functions/admin-install-funnel.md +107 -0
- package/.framework/src/instructions/reference/functions/admin-signals.md +102 -0
- package/.framework/src/instructions/reference/functions/ai-agents.md +148 -0
- package/.framework/src/instructions/reference/functions/ai-interactions.md +156 -0
- package/.framework/src/instructions/reference/functions/api-keys.md +130 -0
- package/.framework/src/instructions/reference/functions/apps.md +140 -0
- package/.framework/src/instructions/reference/functions/auth.md +99 -0
- package/.framework/src/instructions/reference/functions/debug-auth.md +91 -0
- package/.framework/src/instructions/reference/functions/deliveries.md +110 -0
- package/.framework/src/instructions/reference/functions/embeddings.md +166 -0
- package/.framework/src/instructions/reference/functions/eval-harness.md +149 -0
- package/.framework/src/instructions/reference/functions/index.md +103 -0
- package/.framework/src/instructions/reference/functions/integration-outbound.md +200 -0
- package/.framework/src/instructions/reference/functions/integration-routes.md +151 -0
- package/.framework/src/instructions/reference/functions/integrations.md +130 -0
- package/.framework/src/instructions/reference/functions/invites.md +182 -0
- package/.framework/src/instructions/reference/functions/item-progress.md +107 -0
- package/.framework/src/instructions/reference/functions/kb.md +166 -0
- package/.framework/src/instructions/reference/functions/logs.md +141 -0
- package/.framework/src/instructions/reference/functions/observability.md +105 -0
- package/.framework/src/instructions/reference/functions/pipeline-executions.md +132 -0
- package/.framework/src/instructions/reference/functions/pipeline-runner-background.md +121 -0
- package/.framework/src/instructions/reference/functions/pipelines.md +136 -0
- package/.framework/src/instructions/reference/functions/prompt-configs.md +121 -0
- package/.framework/src/instructions/reference/functions/roles.md +121 -0
- package/.framework/src/instructions/reference/functions/security.md +140 -0
- package/.framework/src/instructions/reference/functions/system-cron.md +136 -0
- package/.framework/src/instructions/reference/functions/system.md +106 -0
- package/.framework/src/instructions/reference/functions/tests.md +97 -0
- package/.framework/src/instructions/reference/functions/timers.md +117 -0
- package/.framework/src/instructions/reference/functions/trigger-scheduler.md +102 -0
- package/.framework/src/instructions/reference/functions/triggers.md +140 -0
- package/.framework/src/instructions/reference/functions/types.md +146 -0
- package/.framework/src/instructions/reference/seeds.md +126 -0
- package/.framework/src/instructions/reference/shared-modules.md +127 -0
- package/.framework/src/instructions/reference/spine-config.md +114 -0
- package/.framework/src/instructions/roles.md +80 -0
- package/.framework/src/instructions/runtime-detail.md +70 -0
- package/.framework/src/instructions/runtime-list.md +77 -0
- package/.framework/src/instructions/security.md +67 -0
- package/.framework/src/instructions/tasks/add-a-pipeline.md +110 -0
- package/.framework/src/instructions/tasks/add-a-role.md +96 -0
- package/.framework/src/instructions/tasks/add-a-timer.md +114 -0
- package/.framework/src/instructions/tasks/add-a-trigger.md +106 -0
- package/.framework/src/instructions/tasks/add-a-type.md +151 -0
- package/.framework/src/instructions/tasks/add-a-webhook.md +108 -0
- package/.framework/src/instructions/tasks/add-an-ai-agent.md +108 -0
- package/.framework/src/instructions/tasks/add-an-integration.md +124 -0
- package/.framework/src/instructions/tasks/build-a-custom-page.md +118 -0
- package/.framework/src/instructions/tasks/package-and-install-an-app.md +127 -0
- package/.framework/src/instructions/tasks/test-your-code.md +108 -0
- package/.framework/src/instructions/tasks/write-a-function.md +132 -0
- package/.framework/src/instructions/tasks/write-a-migration.md +110 -0
- package/.framework/src/instructions/testing.md +59 -0
- package/.framework/src/instructions/timers.md +82 -0
- package/.framework/src/instructions/triggers.md +69 -0
- package/.framework/src/instructions/types.md +93 -0
- package/.framework/src/pages/NotFoundPage.tsx +62 -31
- package/.framework/src/pages/admin/AIAgentDetailPage.tsx +117 -106
- package/.framework/src/pages/admin/AIAgentsPage.tsx +86 -48
- package/.framework/src/pages/admin/APIKeyDetailPage.tsx +153 -152
- package/.framework/src/pages/admin/APIKeysPage.tsx +91 -90
- package/.framework/src/pages/admin/AlertsConfigPage.tsx +29 -18
- package/.framework/src/pages/admin/AppDetailPage.tsx +6 -60
- package/.framework/src/pages/admin/AppsPage.tsx +104 -66
- package/.framework/src/pages/admin/DeliveriesPage.tsx +5 -5
- package/.framework/src/pages/admin/EmbeddingDetailPage.tsx +5 -23
- package/.framework/src/pages/admin/EmbeddingsPage.tsx +5 -26
- package/.framework/src/pages/admin/IntegrationDetailPage.tsx +7 -7
- package/.framework/src/pages/admin/IntegrationsPage.tsx +85 -43
- package/.framework/src/pages/admin/LogsPage.tsx +144 -76
- package/.framework/src/pages/admin/ObservabilityDashboard.tsx +223 -140
- package/.framework/src/pages/admin/PipelineDetailPage.tsx +134 -113
- package/.framework/src/pages/admin/PipelineExecutionsPage.tsx +108 -45
- package/.framework/src/pages/admin/PipelinesPage.tsx +160 -115
- package/.framework/src/pages/admin/PromptConfigDetailPage.tsx +96 -98
- package/.framework/src/pages/admin/PromptConfigsPage.tsx +101 -59
- package/.framework/src/pages/admin/RoleDetailPage.tsx +90 -79
- package/.framework/src/pages/admin/RolesPage.tsx +86 -43
- package/.framework/src/pages/admin/SecurityPage.tsx +1 -1
- package/.framework/src/pages/admin/TestingDashboard.tsx +16 -28
- package/.framework/src/pages/admin/TimerDetailPage.tsx +117 -100
- package/.framework/src/pages/admin/TimersPage.tsx +90 -62
- package/.framework/src/pages/admin/TriggerDetailPage.tsx +90 -83
- package/.framework/src/pages/admin/TriggersPage.tsx +124 -99
- package/.framework/src/pages/admin/TypeDetailPage.tsx +152 -138
- package/.framework/src/pages/admin/TypesPage.tsx +90 -48
- package/.framework/src/pages/admin/cil/CILAgentPage.tsx +17 -25
- package/.framework/src/pages/admin/cil/CILChunkDetailPage.tsx +17 -27
- package/.framework/src/pages/admin/cil/CILDashboardPage.tsx +72 -40
- package/.framework/src/pages/admin/cil/CILFileListPage.tsx +321 -129
- package/.framework/src/pages/admin/cil/CILFileSelectPage.tsx +18 -29
- package/.framework/src/pages/admin/cil/CILGraphPage.tsx +26 -38
- package/.framework/src/pages/admin/cil/CILIngestionPage.tsx +34 -46
- package/.framework/src/pages/admin/cil/CILProjectsPage.tsx +189 -103
- package/.framework/src/pages/admin/cil/CILSearchPage.tsx +246 -136
- package/.framework/src/pages/admin/cil/CILSuggestionsPage.tsx +11 -22
- package/.framework/src/pages/admin/cil/CILVersionsPage.tsx +9 -20
- package/.framework/src/pages/admin/cil/FlexiblePipelinePage.tsx +26 -38
- package/.framework/src/pages/admin/kb/KBAdminPage.tsx +7 -26
- package/.framework/templates/agent/AGENTS.md +150 -0
- package/.framework/templates/agent/skills/spine-add-ai-agent/SKILL.md +58 -0
- package/.framework/templates/agent/skills/spine-add-automation/SKILL.md +62 -0
- package/.framework/templates/agent/skills/spine-add-integration/SKILL.md +63 -0
- package/.framework/templates/agent/skills/spine-architect/SKILL.md +86 -0
- package/.framework/templates/agent/skills/spine-install-app/SKILL.md +72 -0
- package/.framework/templates/agent/skills/spine-migration/SKILL.md +75 -0
- package/.framework/templates/agent/skills/spine-new-app/SKILL.md +67 -0
- package/.framework/templates/agent/skills/spine-new-function/SKILL.md +65 -0
- package/.framework/templates/agent/skills/spine-new-type/SKILL.md +65 -0
- package/.framework/templates/agent/skills/spine-schema/SKILL.md +77 -0
- package/.framework/templates/agent/skills/spine-test/SKILL.md +67 -0
- package/.framework/templates/agent/skills/spine-troubleshoot/SKILL.md +74 -0
- package/.framework/templates/agent/skills/spine-upgrade/SKILL.md +69 -0
- package/.framework/templates/project.json +4 -1
- package/.framework/tests/unit/account-scoping-gates.test.ts +392 -0
- package/.framework/tests/unit/agent-files.test.ts +355 -0
- package/.framework/tests/unit/agent-runner.test.ts +479 -44
- package/.framework/tests/unit/api-keys-create-scope-gate.test.ts +160 -0
- package/.framework/tests/unit/api-keys-omit-secret-fields.test.ts +38 -0
- package/.framework/tests/unit/bootstrap.test.ts +242 -0
- package/.framework/tests/unit/cli-context-api-key.test.ts +114 -0
- package/.framework/tests/unit/debug-auth.test.ts +38 -0
- package/.framework/tests/unit/deliveries-account-scoping.test.ts +185 -0
- package/.framework/tests/unit/integration-outbound-credentials.test.ts +167 -0
- package/.framework/tests/unit/integrations-audit-redaction.test.ts +130 -0
- package/.framework/tests/unit/logging-app-id.test.ts +75 -0
- package/.framework/tests/unit/system-context-denial.test.ts +145 -0
- package/.framework/tests/unit/system-cron.test.ts +240 -0
- package/.framework/tests/unit/timers.test.ts +159 -0
- package/README.md +125 -166
- package/config/tsconfig.cli.json +2 -2
- package/package.json +15 -4
- package/templates/project/package-lock.json +2 -2
- package/.framework/docs/admin-routes.md +0 -76
- package/.framework/docs/api-docs-progress.md +0 -38
- package/.framework/docs/api-governance.md +0 -146
- package/.framework/docs/api-testing-results.md +0 -212
- package/.framework/docs/assembly-launch-guide.md +0 -138
- package/.framework/docs/audit-results.md +0 -590
- package/.framework/docs/db-api-inventory.md +0 -95
- package/.framework/docs/gap-remediation-backlog.md +0 -103
- package/.framework/docs/ui-adoption-verification.md +0 -111
- package/.framework/docs/ui-api-coverage.md +0 -84
- package/.framework/docs/v2-compatibility-audit.md +0 -228
- package/.framework/mcp/index.ts +0 -133
- package/.framework/mcp/load-env.ts +0 -60
- package/.framework/mcp/shared/app-manifest.ts +0 -275
- package/.framework/mcp/shared/db.ts +0 -477
- package/.framework/mcp/shared/kb.ts +0 -118
- package/.framework/mcp/tools/architect.ts +0 -431
- package/.framework/mcp/tools/cil/context.ts +0 -345
- package/.framework/mcp/tools/cil/graph.ts +0 -242
- package/.framework/mcp/tools/cil/ingest.ts +0 -1217
- package/.framework/mcp/tools/cil/pipeline-orchestrator.ts +0 -693
- package/.framework/mcp/tools/cil/pipeline.ts +0 -767
- package/.framework/mcp/tools/cil/project.ts +0 -791
- package/.framework/mcp/tools/cil/retrieval.ts +0 -336
- package/.framework/mcp/tools/cil/search-core.ts +0 -454
- package/.framework/mcp/tools/cil/search.ts +0 -97
- package/.framework/mcp/tools/cil/suggest.ts +0 -186
- package/.framework/mcp/tools/cil/validate.ts +0 -1369
- package/.framework/mcp/tools/kb/delete.ts +0 -139
- package/.framework/mcp/tools/kb/index.ts +0 -52
- package/.framework/mcp/tools/kb/ingest.ts +0 -84
- package/.framework/mcp/tools/kb/list-types.ts +0 -102
- package/.framework/mcp/tools/kb/publish.ts +0 -100
- package/.framework/mcp/tools/kb/reindex.ts +0 -86
- package/.framework/mcp/tools/kb/revoke.ts +0 -85
- package/.framework/mcp/tools/kb/search.ts +0 -101
- package/.framework/mcp/tools/kb/upsert.ts +0 -125
- package/.framework/mcp/tools/observability.ts +0 -510
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:module_header:module_header" type="module_header" identity="module_header" parent="
|
|
1
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:module_header:module_header" type="module_header" identity="module_header" parent="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
2
2
|
// CIL[DOC-MACRO purpose="Pass 2 file/folder selection UI for CIL projects"]
|
|
3
3
|
// CIL[DOC-RESPONSIBILITY responsibility="Let users visually select discovered files and folders for a CIL project"]
|
|
4
4
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts"]
|
|
@@ -16,8 +16,8 @@ import { Button } from '@core/components/ui/button'
|
|
|
16
16
|
import { Checkbox } from '@core/components/ui/checkbox'
|
|
17
17
|
import { Skeleton } from '@core/components/ui/skeleton'
|
|
18
18
|
import { ChevronRight, ChevronDown, Folder, FileCode2, Save } from 'lucide-react'
|
|
19
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:module_header:module_header"]
|
|
19
20
|
|
|
20
|
-
import { PageInstructions } from '../../../components/admin/PageInstructions'
|
|
21
21
|
|
|
22
22
|
// CIL[DOC-VECTOR type="context" content="purpose='Pass 2 file/folder selection UI for CIL projects'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/card.tsx,.framework/src/components/ui/button.tsx"]
|
|
23
23
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
@@ -25,9 +25,7 @@ import { PageInstructions } from '../../../components/admin/PageInstructions'
|
|
|
25
25
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
26
26
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
27
27
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
28
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:module_header:module_header"]
|
|
29
28
|
|
|
30
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:project:interface" type="interface" identity="CILProject" parent="none"]
|
|
31
29
|
// CIL[DOC-MACRO purpose="TypeScript interface describing the CIL project record shape"]
|
|
32
30
|
// CIL[DOC-RESPONSIBILITY responsibility="Define the typed contract for CIL project data used by the file selection page"]
|
|
33
31
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
@@ -35,6 +33,7 @@ import { PageInstructions } from '../../../components/admin/PageInstructions'
|
|
|
35
33
|
// CIL[DOC-MICRO logic_summary="Declares CILProject with id, title, description, and a data object containing repo_path and file_statuses." notable_decisions="[]"]
|
|
36
34
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
37
35
|
// CIL[DOC-STABILITY stability="stable"]
|
|
36
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:CILProject:interface" type="interface" identity="CILProject" parent="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
38
37
|
interface CILProject {
|
|
39
38
|
id: string
|
|
40
39
|
title: string
|
|
@@ -45,15 +44,14 @@ interface CILProject {
|
|
|
45
44
|
[key: string]: any
|
|
46
45
|
}
|
|
47
46
|
}
|
|
47
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:CILProject:interface"]
|
|
48
48
|
// CIL[DOC-VECTOR type="context" content="purpose='TypeScript interface describing the CIL project record shape'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/card.tsx,.framework/src/components/ui/button.tsx"]
|
|
49
49
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
50
50
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
51
51
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
52
52
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
53
53
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
54
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:project:interface"]
|
|
55
54
|
|
|
56
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:treenode:interface" type="interface" identity="TreeNode" parent="none"]
|
|
57
55
|
// CIL[DOC-MACRO purpose="Recursive tree node type for file and folder paths"]
|
|
58
56
|
// CIL[DOC-RESPONSIBILITY responsibility="Define the shape of tree nodes used to render the selectable file tree"]
|
|
59
57
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
@@ -61,21 +59,21 @@ interface CILProject {
|
|
|
61
59
|
// CIL[DOC-MICRO logic_summary="Declares a TreeNode with name, path, type, and a recursive children array." notable_decisions="[]"]
|
|
62
60
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
63
61
|
// CIL[DOC-STABILITY stability="stable"]
|
|
62
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:TreeNode:interface" type="interface" identity="TreeNode" parent="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
64
63
|
interface TreeNode {
|
|
65
64
|
name: string
|
|
66
65
|
path: string
|
|
67
66
|
type: 'file' | 'folder'
|
|
68
67
|
children: TreeNode[]
|
|
69
68
|
}
|
|
69
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:TreeNode:interface"]
|
|
70
70
|
// CIL[DOC-VECTOR type="context" content="purpose='Recursive tree node type for file and folder paths'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/card.tsx,.framework/src/components/ui/button.tsx"]
|
|
71
71
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
72
72
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
73
73
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
74
74
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
75
75
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
76
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:treenode:interface"]
|
|
77
76
|
|
|
78
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:buildtree:function" type="function" identity="buildTree" parent="none"]
|
|
79
77
|
// CIL[DOC-MACRO purpose="Build a sorted nested tree from a flat list of file paths"]
|
|
80
78
|
// CIL[DOC-RESPONSIBILITY responsibility="Transform an array of file paths into a hierarchical TreeNode structure grouped by path segments"]
|
|
81
79
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
@@ -83,6 +81,7 @@ interface TreeNode {
|
|
|
83
81
|
// CIL[DOC-MICRO logic_summary="Sorts paths, splits each by '/', and creates nested children on demand, sorting folders before files." notable_decisions="["Sorts children by type (folders first) and then by name"]"]
|
|
84
82
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
85
83
|
// CIL[DOC-STABILITY stability="stable"]
|
|
84
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:buildTree:function" type="function" identity="buildTree" parent="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
86
85
|
function buildTree(filePaths: string[], rootName: string): TreeNode {
|
|
87
86
|
const root: TreeNode = { name: rootName, path: '', type: 'folder', children: [] }
|
|
88
87
|
|
|
@@ -114,15 +113,14 @@ function buildTree(filePaths: string[], rootName: string): TreeNode {
|
|
|
114
113
|
|
|
115
114
|
return root
|
|
116
115
|
}
|
|
116
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:buildTree:function"]
|
|
117
117
|
// CIL[DOC-VECTOR type="context" content="purpose='Build a sorted nested tree from a flat list of file paths'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/card.tsx,.framework/src/components/ui/button.tsx"]
|
|
118
118
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
119
119
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
120
120
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
121
121
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
122
122
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
123
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:buildtree:function"]
|
|
124
123
|
|
|
125
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:filepaths:function" type="function" identity="allFilePaths" parent="none"]
|
|
126
124
|
// CIL[DOC-MACRO purpose="Collect all file paths under a tree node"]
|
|
127
125
|
// CIL[DOC-RESPONSIBILITY responsibility="Recursively flatten a node and its children into a list of file paths"]
|
|
128
126
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
@@ -130,19 +128,19 @@ function buildTree(filePaths: string[], rootName: string): TreeNode {
|
|
|
130
128
|
// CIL[DOC-MICRO logic_summary="If the node is a file, returns its path; otherwise returns flatMap of child paths." notable_decisions="[]"]
|
|
131
129
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
132
130
|
// CIL[DOC-STABILITY stability="stable"]
|
|
131
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:allFilePaths:function" type="function" identity="allFilePaths" parent="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
133
132
|
function allFilePaths(node: TreeNode): string[] {
|
|
134
133
|
if (node.type === 'file') return [node.path]
|
|
135
134
|
return node.children.flatMap(allFilePaths)
|
|
136
135
|
}
|
|
136
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:allFilePaths:function"]
|
|
137
137
|
// CIL[DOC-VECTOR type="context" content="purpose='Collect all file paths under a tree node'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/card.tsx,.framework/src/components/ui/button.tsx"]
|
|
138
138
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
139
139
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
140
140
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
141
141
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
142
142
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
143
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:filepaths:function"]
|
|
144
143
|
|
|
145
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:nodecheck:function" type="function" identity="nodeCheckState" parent="none"]
|
|
146
144
|
// CIL[DOC-MACRO purpose="Determine the checked state of a tree node against a selection set"]
|
|
147
145
|
// CIL[DOC-RESPONSIBILITY responsibility="Compute whether a node is checked, indeterminate, or unchecked based on descendant file selection"]
|
|
148
146
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
@@ -150,6 +148,7 @@ function allFilePaths(node: TreeNode): string[] {
|
|
|
150
148
|
// CIL[DOC-MICRO logic_summary="For files, checks membership in selected. For folders, compares selected descendant count to total descendants." notable_decisions="[]"]
|
|
151
149
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
152
150
|
// CIL[DOC-STABILITY stability="stable"]
|
|
151
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:nodeCheckState:function" type="function" identity="nodeCheckState" parent="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
153
152
|
function nodeCheckState(node: TreeNode, selected: Set<string>): 'checked' | 'indeterminate' | 'unchecked' {
|
|
154
153
|
if (node.type === 'file') {
|
|
155
154
|
return selected.has(node.path) ? 'checked' : 'unchecked'
|
|
@@ -161,15 +160,14 @@ function nodeCheckState(node: TreeNode, selected: Set<string>): 'checked' | 'ind
|
|
|
161
160
|
if (selectedCount === paths.length) return 'checked'
|
|
162
161
|
return 'indeterminate'
|
|
163
162
|
}
|
|
163
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:nodeCheckState:function"]
|
|
164
164
|
// CIL[DOC-VECTOR type="context" content="purpose='Determine the checked state of a tree node against a selection set'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/card.tsx,.framework/src/components/ui/button.tsx"]
|
|
165
165
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
166
166
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
167
167
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
168
168
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
169
169
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
170
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:nodecheck:function"]
|
|
171
170
|
|
|
172
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:filenamenode:function" type="function" identity="FileNameNode" parent="none"]
|
|
173
171
|
// CIL[DOC-MACRO purpose="Render a file or folder label with icon and expand chevron"]
|
|
174
172
|
// CIL[DOC-RESPONSIBILITY responsibility="Display a node name with an appropriate icon and folder expand/collapse chevron"]
|
|
175
173
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
@@ -177,6 +175,7 @@ function nodeCheckState(node: TreeNode, selected: Set<string>): 'checked' | 'ind
|
|
|
177
175
|
// CIL[DOC-MICRO logic_summary="Renders a folder with chevron and folder icon when isFolder is true, otherwise a file icon followed by the name." notable_decisions="[]"]
|
|
178
176
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
179
177
|
// CIL[DOC-STABILITY stability="stable"]
|
|
178
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:FileNameNode:component" type="component" identity="FileNameNode" parent="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
180
179
|
function FileNameNode({ name, isFolder, expanded }: { name: string; isFolder: boolean; expanded: boolean }) {
|
|
181
180
|
return (
|
|
182
181
|
<span className="flex items-center gap-2">
|
|
@@ -192,15 +191,14 @@ function FileNameNode({ name, isFolder, expanded }: { name: string; isFolder: bo
|
|
|
192
191
|
</span>
|
|
193
192
|
)
|
|
194
193
|
}
|
|
194
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:FileNameNode:component"]
|
|
195
195
|
// CIL[DOC-VECTOR type="context" content="purpose='Render a file or folder label with icon and expand chevron'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/card.tsx,.framework/src/components/ui/button.tsx"]
|
|
196
196
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
197
197
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
198
198
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
199
199
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
200
200
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
201
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:filenamenode:function"]
|
|
202
201
|
|
|
203
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:treenode:component" type="component" identity="TreeNodeRow" parent="none"]
|
|
204
202
|
// CIL[DOC-MACRO purpose="Render a selectable, recursively expandable tree row"]
|
|
205
203
|
// CIL[DOC-RESPONSIBILITY responsibility="Display a tree node with a tri-state checkbox, expand/collapse behavior, and recursive child rendering"]
|
|
206
204
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
@@ -208,6 +206,7 @@ function FileNameNode({ name, isFolder, expanded }: { name: string; isFolder: bo
|
|
|
208
206
|
// CIL[DOC-MICRO logic_summary="Computes the checkbox state, renders the label with indentation, and conditionally renders children." notable_decisions="[]"]
|
|
209
207
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
210
208
|
// CIL[DOC-STABILITY stability="stable"]
|
|
209
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:TreeNodeRow:component" type="component" identity="TreeNodeRow" parent="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
211
210
|
function TreeNodeRow({
|
|
212
211
|
node,
|
|
213
212
|
selected,
|
|
@@ -263,15 +262,14 @@ function TreeNodeRow({
|
|
|
263
262
|
</div>
|
|
264
263
|
)
|
|
265
264
|
}
|
|
265
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:TreeNodeRow:component"]
|
|
266
266
|
// CIL[DOC-VECTOR type="context" content="purpose='Render a selectable, recursively expandable tree row'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/card.tsx,.framework/src/components/ui/button.tsx"]
|
|
267
267
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
268
268
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
269
269
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
270
270
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
271
271
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
272
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:treenode:component"]
|
|
273
272
|
|
|
274
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:CILFileSelectPage:component" type="component" identity="CILFileSelectPage" parent="none"]
|
|
275
273
|
// CIL[DOC-MACRO purpose="Main page component for CIL file and folder selection"]
|
|
276
274
|
// CIL[DOC-RESPONSIBILITY responsibility="Load the CIL project, render a tri-state file tree, and submit the selected file set"]
|
|
277
275
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
@@ -279,6 +277,7 @@ function TreeNodeRow({
|
|
|
279
277
|
// CIL[DOC-MICRO logic_summary="Fetches the project, builds the tree, manages selected and expanded sets, renders the tree and instructions, and saves the selection." notable_decisions="["Tree root is derived from repo_path basename","All files under a folder are selected/deselected together"]"]
|
|
280
278
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
281
279
|
// CIL[DOC-STABILITY stability="stable"]
|
|
280
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:CILFileSelectPage:component" type="component" identity="CILFileSelectPage" parent="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx"]
|
|
282
281
|
export default function CILFileSelectPage() {
|
|
283
282
|
const { id: projectId } = useParams<{ id: string }>()
|
|
284
283
|
const navigate = useNavigate()
|
|
@@ -395,16 +394,6 @@ export default function CILFileSelectPage() {
|
|
|
395
394
|
</Button>
|
|
396
395
|
</div>
|
|
397
396
|
</div>
|
|
398
|
-
|
|
399
|
-
<PageInstructions
|
|
400
|
-
description="Select which discovered files should move forward through the CIL pipeline."
|
|
401
|
-
sections={[
|
|
402
|
-
{ title: 'What this page is for', content: 'Pass 2 — selection. Check files or folders to mark them as selected for chunking, documentation, and enrichment.' },
|
|
403
|
-
{ title: 'How to select', content: 'Click a file checkbox to toggle it. Click a folder to select or deselect all files inside that folder.' },
|
|
404
|
-
{ title: 'What happens next', content: 'Saving writes the selected paths to the project and updates each cil_file status to 1-selected. Passes 3-8 are then run by Devin through the CIL MCP tools.' },
|
|
405
|
-
]}
|
|
406
|
-
/>
|
|
407
|
-
|
|
408
397
|
<Card>
|
|
409
398
|
<CardHeader className="pb-2">
|
|
410
399
|
<CardTitle className="text-sm">Discovered Files</CardTitle>
|
|
@@ -423,10 +412,10 @@ export default function CILFileSelectPage() {
|
|
|
423
412
|
</div>
|
|
424
413
|
)
|
|
425
414
|
}
|
|
415
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:CILFileSelectPage:component"]
|
|
426
416
|
// CIL[DOC-VECTOR type="context" content="purpose='Main page component for CIL file and folder selection'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/card.tsx,.framework/src/components/ui/button.tsx"]
|
|
427
417
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
428
418
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
429
419
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
430
420
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
431
421
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
432
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILFileSelectPage.tsx:CILFileSelectPage:component"]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:module_header:module_header" type="module_header" identity="module_header" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
1
2
|
|
|
2
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:module_header:module_header" type="module_header" identity="module_header" parent="none"]
|
|
3
3
|
// CIL[DOC-MACRO purpose="Provide the CIL graph visualization page for exploring file and chunk call graphs."]
|
|
4
4
|
// CIL[DOC-RESPONSIBILITY responsibility="Render an interactive React Flow graph, switch view modes, and display node details."]
|
|
5
5
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts"]
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { useEffect, useState, useCallback } from 'react'
|
|
13
13
|
import { useParams } from 'react-router-dom'
|
|
14
14
|
import {
|
|
15
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:module_header:module_header"]
|
|
15
16
|
ReactFlow,
|
|
16
17
|
Background,
|
|
17
18
|
Controls,
|
|
@@ -42,15 +43,12 @@ import { RefreshCw, ChevronRight, ZoomIn, Layers } from 'lucide-react'
|
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
|
|
45
|
-
import { PageInstructions } from '../../../components/admin/PageInstructions'
|
|
46
46
|
// CIL[DOC-VECTOR type="context" content="purpose='Provide the CIL graph visualization page for exploring file and chunk call graphs.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
47
47
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
48
48
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
49
49
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
50
50
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
51
51
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
52
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:module_header:module_header"]
|
|
53
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:node_width:constant" type="constant" identity="NODE_WIDTH" parent="none"]
|
|
54
52
|
// CIL[DOC-MACRO purpose="Define the default width for graph nodes."]
|
|
55
53
|
// CIL[DOC-RESPONSIBILITY responsibility="Provide a constant node width used by layout and rendering."]
|
|
56
54
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -59,15 +57,15 @@ import { PageInstructions } from '../../../components/admin/PageInstructions'
|
|
|
59
57
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
60
58
|
// CIL[DOC-STABILITY stability="stable"]
|
|
61
59
|
|
|
60
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:NODE_WIDTH:constant" type="constant" identity="NODE_WIDTH" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
62
61
|
const NODE_WIDTH = 180
|
|
62
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:NODE_WIDTH:constant"]
|
|
63
63
|
// CIL[DOC-VECTOR type="context" content="purpose='Define the default width for graph nodes.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
64
64
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
65
65
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
66
66
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
67
67
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
68
68
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
69
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:node_width:constant"]
|
|
70
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:node_height:constant" type="constant" identity="NODE_HEIGHT" parent="none"]
|
|
71
69
|
// CIL[DOC-MACRO purpose="Define the default height for graph nodes."]
|
|
72
70
|
// CIL[DOC-RESPONSIBILITY responsibility="Provide a constant node height used by layout and rendering."]
|
|
73
71
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -76,15 +74,15 @@ const NODE_WIDTH = 180
|
|
|
76
74
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
77
75
|
// CIL[DOC-STABILITY stability="stable"]
|
|
78
76
|
|
|
77
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:NODE_HEIGHT:constant" type="constant" identity="NODE_HEIGHT" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
79
78
|
const NODE_HEIGHT = 60
|
|
79
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:NODE_HEIGHT:constant"]
|
|
80
80
|
// CIL[DOC-VECTOR type="context" content="purpose='Define the default height for graph nodes.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
81
81
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
82
82
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
83
83
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
84
84
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
85
85
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
86
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:node_height:constant"]
|
|
87
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:file_width:constant" type="constant" identity="FILE_WIDTH" parent="none"]
|
|
88
86
|
// CIL[DOC-MACRO purpose="Define the default width for file nodes in the graph."]
|
|
89
87
|
// CIL[DOC-RESPONSIBILITY responsibility="Provide a constant file node width used by layout and rendering."]
|
|
90
88
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -93,15 +91,15 @@ const NODE_HEIGHT = 60
|
|
|
93
91
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
94
92
|
// CIL[DOC-STABILITY stability="stable"]
|
|
95
93
|
|
|
94
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:FILE_WIDTH:constant" type="constant" identity="FILE_WIDTH" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
96
95
|
const FILE_WIDTH = 200
|
|
96
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:FILE_WIDTH:constant"]
|
|
97
97
|
// CIL[DOC-VECTOR type="context" content="purpose='Define the default width for file nodes in the graph.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
98
98
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
99
99
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
100
100
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
101
101
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
102
102
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
103
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:file_width:constant"]
|
|
104
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:file_height:constant" type="constant" identity="FILE_HEIGHT" parent="none"]
|
|
105
103
|
// CIL[DOC-MACRO purpose="Define the default height for file nodes in the graph."]
|
|
106
104
|
// CIL[DOC-RESPONSIBILITY responsibility="Provide a constant file node height used by layout and rendering."]
|
|
107
105
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -110,16 +108,16 @@ const FILE_WIDTH = 200
|
|
|
110
108
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
111
109
|
// CIL[DOC-STABILITY stability="stable"]
|
|
112
110
|
|
|
111
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:FILE_HEIGHT:constant" type="constant" identity="FILE_HEIGHT" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
113
112
|
const FILE_HEIGHT = 40
|
|
113
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:FILE_HEIGHT:constant"]
|
|
114
114
|
// CIL[DOC-VECTOR type="context" content="purpose='Define the default height for file nodes in the graph.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
115
115
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
116
116
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
117
117
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
118
118
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
119
119
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
120
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:file_height:constant"]
|
|
121
120
|
|
|
122
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:viewmode:type" type="type" identity="ViewMode" parent="none"]
|
|
123
121
|
// CIL[DOC-MACRO purpose="Define the allowed graph view modes."]
|
|
124
122
|
// CIL[DOC-RESPONSIBILITY responsibility="Constrain the viewMode state to files, chunks, or mixed display."]
|
|
125
123
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -128,17 +126,17 @@ const FILE_HEIGHT = 40
|
|
|
128
126
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
129
127
|
// CIL[DOC-STABILITY stability="stable"]
|
|
130
128
|
|
|
129
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:ViewMode:type" type="type" identity="ViewMode" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
131
130
|
type ViewMode = 'files' | 'chunks' | 'mixed'
|
|
131
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:ViewMode:type"]
|
|
132
132
|
// CIL[DOC-VECTOR type="context" content="purpose='Define the allowed graph view modes.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
133
133
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
134
134
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
135
135
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
136
136
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
137
137
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
138
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:viewmode:type"]
|
|
139
138
|
|
|
140
139
|
|
|
141
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:layoutgraph:function" type="function" identity="layoutGraph" parent="none"]
|
|
142
140
|
// CIL[DOC-MACRO purpose="Apply a directed graph layout to React Flow nodes and edges."]
|
|
143
141
|
// CIL[DOC-RESPONSIBILITY responsibility="Compute x/y positions for nodes using dagre and return positioned nodes with unchanged edges."]
|
|
144
142
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -147,6 +145,7 @@ type ViewMode = 'files' | 'chunks' | 'mixed'
|
|
|
147
145
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
148
146
|
// CIL[DOC-STABILITY stability="stable"]
|
|
149
147
|
|
|
148
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:layoutGraph:function" type="function" identity="layoutGraph" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
150
149
|
function layoutGraph(nodes: Node[], edges: Edge[]): { nodes: Node[]; edges: Edge[] } {
|
|
151
150
|
const g = new dagre.graphlib.Graph()
|
|
152
151
|
g.setDefaultEdgeLabel(() => ({}))
|
|
@@ -170,19 +169,18 @@ function layoutGraph(nodes: Node[], edges: Edge[]): { nodes: Node[]; edges: Edge
|
|
|
170
169
|
|
|
171
170
|
return { nodes: positionedNodes, edges }
|
|
172
171
|
}
|
|
172
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:layoutGraph:function"]
|
|
173
173
|
// CIL[DOC-VECTOR type="context" content="purpose='Apply a directed graph layout to React Flow nodes and edges.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
174
174
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
175
175
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
176
176
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
177
177
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
178
178
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
179
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:layoutgraph:function"]
|
|
180
179
|
|
|
181
180
|
|
|
182
181
|
|
|
183
182
|
|
|
184
183
|
|
|
185
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:chunk_type_colors:constant" type="constant" identity="CHUNK_TYPE_COLORS" parent="none"]
|
|
186
184
|
// CIL[DOC-MACRO purpose="Map chunk types to display colors for the graph legend and nodes."]
|
|
187
185
|
// CIL[DOC-RESPONSIBILITY responsibility="Provide a color palette used by nodeColor and the graph legend."]
|
|
188
186
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -191,6 +189,7 @@ function layoutGraph(nodes: Node[], edges: Edge[]): { nodes: Node[]; edges: Edge
|
|
|
191
189
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
192
190
|
// CIL[DOC-STABILITY stability="stable"]
|
|
193
191
|
|
|
192
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:CHUNK_TYPE_COLORS:constant" type="constant" identity="CHUNK_TYPE_COLORS" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
194
193
|
const CHUNK_TYPE_COLORS: Record<string, string> = {
|
|
195
194
|
function: '#6366F1',
|
|
196
195
|
class: '#8B5CF6',
|
|
@@ -201,18 +200,17 @@ const CHUNK_TYPE_COLORS: Record<string, string> = {
|
|
|
201
200
|
route: '#EF4444',
|
|
202
201
|
config: '#64748B',
|
|
203
202
|
}
|
|
203
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:CHUNK_TYPE_COLORS:constant"]
|
|
204
204
|
// CIL[DOC-VECTOR type="context" content="purpose='Map chunk types to display colors for the graph legend and nodes.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
205
205
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
206
206
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
207
207
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
208
208
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
209
209
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
210
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:chunk_type_colors:constant"]
|
|
211
210
|
|
|
212
211
|
|
|
213
212
|
|
|
214
213
|
|
|
215
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:nodecolor:function" type="function" identity="nodeColor" parent="none"]
|
|
216
214
|
// CIL[DOC-MACRO purpose="Resolve the display color for a graph node based on its data."]
|
|
217
215
|
// CIL[DOC-RESPONSIBILITY responsibility="Return a color string for React Flow nodes and the MiniMap."]
|
|
218
216
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -221,23 +219,23 @@ const CHUNK_TYPE_COLORS: Record<string, string> = {
|
|
|
221
219
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
222
220
|
// CIL[DOC-STABILITY stability="stable"]
|
|
223
221
|
|
|
222
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:nodeColor:function" type="function" identity="nodeColor" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
224
223
|
function nodeColor(node: Node): string {
|
|
225
224
|
if (node.data?.isFile) return '#1E293B'
|
|
226
225
|
if (node.data?.is_dead_code) return '#94A3B8'
|
|
227
226
|
return CHUNK_TYPE_COLORS[node.data?.chunk_type as string] || '#6366F1'
|
|
228
227
|
}
|
|
228
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:nodeColor:function"]
|
|
229
229
|
// CIL[DOC-VECTOR type="context" content="purpose='Resolve the display color for a graph node based on its data.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
230
230
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
231
231
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
232
232
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
233
233
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
234
234
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
235
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:nodecolor:function"]
|
|
236
235
|
|
|
237
236
|
|
|
238
237
|
|
|
239
238
|
|
|
240
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:projectgraph:interface" type="interface" identity="ProjectGraph" parent="none"]
|
|
241
239
|
// CIL[DOC-MACRO purpose="Describe the shape of the CIL project graph payload."]
|
|
242
240
|
// CIL[DOC-RESPONSIBILITY responsibility="Type the file and chunk nodes plus import and call edges returned by the graph API."]
|
|
243
241
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -246,6 +244,7 @@ function nodeColor(node: Node): string {
|
|
|
246
244
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
247
245
|
// CIL[DOC-STABILITY stability="stable"]
|
|
248
246
|
|
|
247
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:ProjectGraph:interface" type="interface" identity="ProjectGraph" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
249
248
|
interface ProjectGraph {
|
|
250
249
|
nodes: {
|
|
251
250
|
files: any[]
|
|
@@ -256,16 +255,15 @@ interface ProjectGraph {
|
|
|
256
255
|
calls: { source_id: string; target_id: string; metadata?: any }[]
|
|
257
256
|
}
|
|
258
257
|
}
|
|
258
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:ProjectGraph:interface"]
|
|
259
259
|
// CIL[DOC-VECTOR type="context" content="purpose='Describe the shape of the CIL project graph payload.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
260
260
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
261
261
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
262
262
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
263
263
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
264
264
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
265
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:projectgraph:interface"]
|
|
266
265
|
|
|
267
266
|
|
|
268
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:buildflowgraph:function" type="function" identity="buildFlowGraph" parent="none"]
|
|
269
267
|
// CIL[DOC-MACRO purpose="Build React Flow nodes and edges from a CIL project graph."]
|
|
270
268
|
// CIL[DOC-RESPONSIBILITY responsibility="Convert project graph files, chunks, imports, and calls into React Flow elements."]
|
|
271
269
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -274,6 +272,7 @@ interface ProjectGraph {
|
|
|
274
272
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
275
273
|
// CIL[DOC-STABILITY stability="stable"]
|
|
276
274
|
|
|
275
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:buildFlowGraph:function" type="function" identity="buildFlowGraph" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
277
276
|
function buildFlowGraph(graph: ProjectGraph, viewMode: ViewMode): { nodes: Node[]; edges: Edge[] } {
|
|
278
277
|
const nodes: Node[] = []
|
|
279
278
|
const edges: Edge[] = []
|
|
@@ -366,18 +365,17 @@ function buildFlowGraph(graph: ProjectGraph, viewMode: ViewMode): { nodes: Node[
|
|
|
366
365
|
|
|
367
366
|
return layoutGraph(nodes, edges)
|
|
368
367
|
}
|
|
368
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:buildFlowGraph:function"]
|
|
369
369
|
// CIL[DOC-VECTOR type="context" content="purpose='Build React Flow nodes and edges from a CIL project graph.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
370
370
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
371
371
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
372
372
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
373
373
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
374
374
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
375
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:buildflowgraph:function"]
|
|
376
375
|
|
|
377
376
|
|
|
378
377
|
|
|
379
378
|
|
|
380
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:nodedetailpanel:function" type="function" identity="NodeDetailPanel" parent="none"]
|
|
381
379
|
// CIL[DOC-MACRO purpose="Render the inspector panel for a selected graph node."]
|
|
382
380
|
// CIL[DOC-RESPONSIBILITY responsibility="Show file or chunk metadata and provide a link to the chunk contract view."]
|
|
383
381
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -386,6 +384,7 @@ function buildFlowGraph(graph: ProjectGraph, viewMode: ViewMode): { nodes: Node[
|
|
|
386
384
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
387
385
|
// CIL[DOC-STABILITY stability="stable"]
|
|
388
386
|
|
|
387
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:NodeDetailPanel:component" type="component" identity="NodeDetailPanel" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
389
388
|
function NodeDetailPanel({
|
|
390
389
|
node,
|
|
391
390
|
projectId,
|
|
@@ -434,17 +433,16 @@ function NodeDetailPanel({
|
|
|
434
433
|
</div>
|
|
435
434
|
)
|
|
436
435
|
}
|
|
436
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:NodeDetailPanel:component"]
|
|
437
437
|
// CIL[DOC-VECTOR type="context" content="purpose='Render the inspector panel for a selected graph node.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
438
438
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
439
439
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
440
440
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
441
441
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
442
442
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
443
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:nodedetailpanel:function"]
|
|
444
443
|
|
|
445
444
|
|
|
446
445
|
|
|
447
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:cilgraphpage:function" type="function" identity="CILGraphPage" parent="none"]
|
|
448
446
|
// CIL[DOC-MACRO purpose="Render the main CIL graph exploration page for a selected project."]
|
|
449
447
|
// CIL[DOC-RESPONSIBILITY responsibility="Fetch and display the project call graph, manage view mode, selection, and loading state."]
|
|
450
448
|
// CIL[DOC-CONTEXT module="admin-cil-graph" layer="ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
@@ -453,6 +451,7 @@ function NodeDetailPanel({
|
|
|
453
451
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
454
452
|
// CIL[DOC-STABILITY stability="stable"]
|
|
455
453
|
|
|
454
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:CILGraphPage:component" type="component" identity="CILGraphPage" parent="~/.framework/src/pages/admin/cil/CILGraphPage.tsx"]
|
|
456
455
|
export default function CILGraphPage() {
|
|
457
456
|
const { id: projectId } = useParams<{ id: string }>()
|
|
458
457
|
const appPath = (path: string) => '/spine-framework/admin' + (path.startsWith('/') ? path : '/' + path)
|
|
@@ -552,17 +551,6 @@ export default function CILGraphPage() {
|
|
|
552
551
|
</Button>
|
|
553
552
|
</div>
|
|
554
553
|
</div>
|
|
555
|
-
|
|
556
|
-
<PageInstructions
|
|
557
|
-
description="Explore the file and chunk call graph for a project."
|
|
558
|
-
sections={[
|
|
559
|
-
{ title: 'What this page is for', content: 'This page visualizes import links between files and call links between chunks for the selected CIL project.' },
|
|
560
|
-
{ title: 'How to read this page', content: 'The React Flow canvas shows nodes and edges. The legend explains colors by chunk type. The Inspector panel on the right displays details for the selected node.' },
|
|
561
|
-
{ title: 'How to use this page', content: 'Switch the view mode to files or chunks. Click a node to see its details in the inspector. Pan, zoom, and use the minimap to navigate large graphs.' },
|
|
562
|
-
{ title: 'Important notes', content: 'The graph is only available after Pass 1 and Pass 2 ingestion complete. Empty graphs mean no imports or calls were detected yet.' },
|
|
563
|
-
]}
|
|
564
|
-
/>
|
|
565
|
-
|
|
566
554
|
{}
|
|
567
555
|
<div className="flex flex-1 min-h-0">
|
|
568
556
|
<div className="flex-1">
|
|
@@ -629,10 +617,10 @@ export default function CILGraphPage() {
|
|
|
629
617
|
</div>
|
|
630
618
|
)
|
|
631
619
|
}
|
|
620
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:CILGraphPage:component"]
|
|
632
621
|
// CIL[DOC-VECTOR type="context" content="purpose='Render the main CIL graph exploration page for a selected project.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/badge.tsx"]
|
|
633
622
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
634
623
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
635
624
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
636
625
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
637
626
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
638
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILGraphPage.tsx:cilgraphpage:function"]
|