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:
@@ -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
7029
packages/dashboard/app/api/legacy.ts
Normal file
7029
packages/dashboard/app/api/legacy.ts
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user