fix(FN-2539): preserve dashboard API compatibility and harden proxy wildcard routing

- Replace app/api.ts with a compatibility barrel that re-exports the legacy client API surface from app/api/legacy.ts
- Move the existing dashboard API implementation into app/api/legacy.ts and update static-analysis tests to include the new module path
- Update proxy wildcard routing to use /proxy/:nodeId/{*splat}, keeping explicit proxy handlers ahead of the fallback route
- Reject proxying to local nodes with a consistent 400 response and expand proxy route tests plus route-ordering compatibility notes
This commit is contained in:
Fusion
2026-04-25 19:56:27 -07:00
committed by gsxdsm
parent 866706308d
commit b0886cdfd4
6 changed files with 7056 additions and 7030 deletions

View File

@@ -10,11 +10,12 @@ const agentsViewPath = path.join(__dirname, "../components/AgentsView.tsx");
const agentDetailViewPath = path.join(__dirname, "../components/AgentDetailView.tsx");
const agentRunHistoryPath = path.join(__dirname, "../components/AgentRunHistory.tsx");
const apiPath = path.join(__dirname, "../api.ts");
const apiLegacyPath = path.join(__dirname, "../api/legacy.ts");
const agentsViewContent = fs.readFileSync(agentsViewPath, "utf-8");
const agentDetailViewContent = fs.readFileSync(agentDetailViewPath, "utf-8");
const agentRunHistoryContent = fs.readFileSync(agentRunHistoryPath, "utf-8");
const apiContent = fs.readFileSync(apiPath, "utf-8");
const apiContent = `${fs.readFileSync(apiPath, "utf-8")}\n${fs.existsSync(apiLegacyPath) ? fs.readFileSync(apiLegacyPath, "utf-8") : ""}`;
describe("Agent runs UI — static analysis", () => {
describe("startAgentRun API function", () => {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff