Fix React hook anti-patterns, incorrect mock paths, and unused code
- Replace useState+useEffect sync pattern with useMemo in EdgeSettingsPanel.tsx to eliminate cascading re-renders - Remove redundant draft state in NodeSettingsPanel.tsx and use store data directly, eliminating useEffect sync loop - Fix mock paths in test_tools.py: patch tavily.TavilyClient and pypdf.PdfReader at their source modules (lazy imports) - Remove unused variable assignment in routes.py (god mode reject) - Remove unused node_lookup dicts in dynamic_graph_builder.py - Remove unused imports across test files (Blueprint, CouncilState, pytest, llm assignments) - Remove unused CouncilBlueprint type import in types.test.ts - Run npm audit fix to resolve moderate vulnerability All 107 backend tests and 26 frontend tests pass. Ruff, ESLint, and TypeScript checks are clean. https://claude.ai/code/session_01XqzyT6fhS8sUe9P5fCmuVU
This commit is contained in:
parent
fb0d3ae8f1
commit
7becffcc89
11 changed files with 2332 additions and 65 deletions
|
|
@ -366,9 +366,6 @@ def build_graph_from_blueprint(
|
|||
if not nodes:
|
||||
raise ValueError("Blueprint has no nodes.")
|
||||
|
||||
# Build node lookup
|
||||
node_lookup = {n["id"]: n for n in nodes}
|
||||
|
||||
# Find entry point: the node that has no incoming edges
|
||||
targets = {e["target"] for e in edges}
|
||||
entry_candidates = [n["id"] for n in nodes if n["id"] not in targets]
|
||||
|
|
@ -559,7 +556,6 @@ def _build_graph_with_checkpointer(
|
|||
if not nodes:
|
||||
raise ValueError("Blueprint has no nodes.")
|
||||
|
||||
node_lookup = {n["id"]: n for n in nodes}
|
||||
targets = {e["target"] for e in edges}
|
||||
entry_candidates = [n["id"] for n in nodes if n["id"] not in targets]
|
||||
if not entry_candidates:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue