From 9e207a4991d78b7dd6cfa6796f9e2420b7b36c19 Mon Sep 17 00:00:00 2001 From: abccodes Date: Fri, 19 Jun 2026 18:20:26 -0700 Subject: [PATCH] [aidan] chore/backend: remove stale explanatory comments --- backend/apps/agents/agents.py | 3 --- backend/apps/agents/core/models.py | 5 ----- backend/apps/dashboards/models.py | 4 ---- backend/apps/settings/settings.py | 1 - 4 files changed, 13 deletions(-) diff --git a/backend/apps/agents/agents.py b/backend/apps/agents/agents.py index d4265849..1933f463 100644 --- a/backend/apps/agents/agents.py +++ b/backend/apps/agents/agents.py @@ -13,8 +13,6 @@ import time logger = logging.getLogger(__name__) -# Soft per-session throttle so the integration suggestion can fire on any turn -# without nagging every message; only stamped when a suggestion actually emits. MCP_SUGGEST_COOLDOWN_S = 300.0 p_mcp_suggest_cooldown: dict[str, float] = {} @@ -80,7 +78,6 @@ async def send_message(session_id: str, body: dict): raise HTTPException(status_code=400, detail="prompt is required") # Run MCP-suggestion classifier in parallel with the agent launch; fails open. - # Fires on any turn, but a per-session cooldown keeps it from nagging every message. try: last_suggested = p_mcp_suggest_cooldown.get(session_id, 0.0) if time.monotonic() - last_suggested >= MCP_SUGGEST_COOLDOWN_S: diff --git a/backend/apps/agents/core/models.py b/backend/apps/agents/core/models.py index 3aa704af..00313ee0 100644 --- a/backend/apps/agents/core/models.py +++ b/backend/apps/agents/core/models.py @@ -116,11 +116,6 @@ class AgentSession(BaseModel): dashboard_id: Optional[str] = None browser_id: Optional[str] = None parent_session_id: Optional[str] = None - # For workflow Test Agent sessions: "running" while the test drives the - # steps, then "complete"/"error" when it finishes. Drives the test card's - # footer (red Force Stop -> green "workflow complete, close"). None for - # ordinary sessions. A dedicated signal because per-turn status oscillates - # completed/running between steps, so it can't mark "the whole test done". workflow_test_state: Optional[Literal["running", "complete", "error"]] = None # Browser memory signals, drive the subtle "remembered/learned" card chip so # the user feels the agent getting smarter without lifting a finger. diff --git a/backend/apps/dashboards/models.py b/backend/apps/dashboards/models.py index b62c608f..bf307bd2 100644 --- a/backend/apps/dashboards/models.py +++ b/backend/apps/dashboards/models.py @@ -53,10 +53,6 @@ class NotePosition(BaseModel): class DashboardLayout(BaseModel): - # Accept whatever the FE serialises (workflow_cards, configure_panels, - # workflows_hub etc). Pydantic was silently stripping these because - # they weren't declared, which made the dashboard re-render WITHOUT - # the workflow card the user just placed. model_config = ConfigDict(extra="allow") cards: dict[str, CardPosition] = Field(default_factory=dict) view_cards: dict[str, ViewCardPosition] = Field(default_factory=dict) diff --git a/backend/apps/settings/settings.py b/backend/apps/settings/settings.py index 7c8294ef..6eb983fa 100644 --- a/backend/apps/settings/settings.py +++ b/backend/apps/settings/settings.py @@ -299,7 +299,6 @@ class DismissMcpSuggestionPayload(BaseModel): @settings.router.put("/dismiss-mcp-suggestion") async def put_dismiss_mcp_suggestion(body: DismissMcpSuggestionPayload): - """MERGE dismissed integration suggestions; the general PUT replaces the whole object and would blank secrets.""" current = load_settings() now = datetime.now(timezone.utc).isoformat() for tool_id in body.ids: