feat(ui): Steps for servers — route roots, server effects, request/decorator triggers, guards for Python/Java/Kotlin/C#/Go/C

- api/route-roots.ts: the symbol a route runs (references-edge handler, exported page component, or the route itself for an inline handler), shared by steps and screens; the bare Steps tab lists an API's endpoints by router file
- api/effects.ts: database / response / queue / email / payments / cache / auth / process / network / storage / device / telemetry, matched on the call as written per language family, with model + read/write and the literal status on a response site
- graph/branch-guards.ts: callSitesForFile (the whole member chain), memberTypesInTree, decoratorsForFile, request/decorator triggers with the middleware/guard chain; guard + argument rules for Python, Java, Kotlin, C#, Go and C
- steps.ts: classify on the chain before trusting a name match, retarget this.x.y() by declared type, skip test doubles after the effect pre-check, project kind on the wire
- viewer: kindWord/kindWords per project kind, endpoint chooser, response boxes labelled by status codes
- python.ts: FastAPI detected from a monorepo sub-directory; is-test-file: samples/examples package paths are not tests
- tests: ui-steps-api-servers, ui-effects, branch-guards-languages; spec §3.13 Servers paragraph, CHANGELOG, plan doc

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01REFyW9hmNrxhwN5wxRoAkC
This commit is contained in:
Colby McHenry
2026-08-28 13:45:38 -05:00
co-authored by Claude Fable 5
parent 5e06204deb
commit 950686def4
22 changed files with 3869 additions and 190 deletions
+11 -2
View File
@@ -338,7 +338,11 @@ export function isTestPath(filePath: string): boolean {
// CamelCase test source-set dirs (Kotlin Multiplatform / Gradle / Xcode):
// jvmTest/, commonTest/, androidTest/, iosTest/, integrationTest/. Capital-led
// so "latest/" / "manifest/" are not matched.
/(?:^|\/)[A-Za-z0-9]*(?:Test|Tests|Spec)\//.test(filePath)
/(?:^|\/)[A-Za-z0-9]*(?:Test|Tests|Spec)\//.test(filePath) ||
// Test-support modules and doubles by directory name: Gradle's
// `core/data-test/`, `core/datastore-test/`, `:testing`; Go's `testdata/`;
// `testutil(s)/`, `test-utils/`, `fakes/`, `mocks/`, `__mocks__/`.
/(?:^|\/)(?:[\w.]+[-_]test(?:s|ing)?|testdata|testutils?|test[-_]utils?|fakes?|mocks?|__mocks__|stubs)\//.test(lower)
) {
return true;
}
@@ -355,8 +359,13 @@ function matchesNonProductionDir(lowerPath: string): boolean {
'integration', 'sample', 'samples', 'example', 'examples',
'fixture', 'fixtures', 'benchmark', 'benchmarks', 'demo', 'demos',
];
// Only the project layout above a `src/` counts, never the package path
// below it: `core/data/src/main/kotlin/com/google/samples/apps/…` is a
// Google sample by name and production code by layout.
const src = lowerPath.indexOf('/src/');
const scope = src >= 0 ? lowerPath.slice(0, src + 1) : lowerPath.startsWith('src/') ? '' : lowerPath;
for (const dir of dirs) {
if (lowerPath.includes('/' + dir + '/') || lowerPath.startsWith(dir + '/')) {
if (scope.includes('/' + dir + '/') || scope.startsWith(dir + '/')) {
return true;
}
}