Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/backend/sql_agents/helpers/comms_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ async def select_agent(self, agents, history):
),
None,
)
# No matching case found, so explicitly return None
return None

# class for termination strategy
class ApprovalTerminationStrategy(TerminationStrategy):
Expand Down
2 changes: 0 additions & 2 deletions src/frontend/src/pages/batchView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const BatchStoryPage = () => {
const [selectedFileId, setSelectedFileId] = useState<string>("");
const [expandedSections, setExpandedSections] = useState(["errors"]);
const [batchSummary, setBatchSummary] = useState<BatchSummary | null>(null);
const [selectedFileContent, setSelectedFileContent] = useState<string>("");
const [selectedFileTranslatedContent, setSelectedFileTranslatedContent] = useState<string>("");


Expand Down Expand Up @@ -195,7 +194,6 @@ const BatchStoryPage = () => {
const data = await response.json();

if (data) {
setSelectedFileContent(data.content || "");
setSelectedFileTranslatedContent(data.translated_content || "");
}

Expand Down
5 changes: 2 additions & 3 deletions src/frontend/src/pages/modernizationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ const ModernizationPage = () => {
const [fileId, setFileId] = React.useState<string>("");
const [expandedSections, setExpandedSections] = React.useState<string[]>([]);
const [allFilesCompleted, setAllFilesCompleted] = useState(false);
const [progressPercentage, setProgressPercentage] = useState(0);
const [isZipButtonDisabled, setIsZipButtonDisabled] = useState(true);
const [fileLoading, setFileLoading] = useState(false);
const [lastActivityTime, setLastActivityTime] = useState<number>(Date.now());
Expand Down Expand Up @@ -1017,13 +1016,13 @@ useEffect(() => {
// Set a timeout for initial loading - if no progress after 30 seconds, show error
useEffect(() => {
const loadingTimeout = setTimeout(() => {
if (progressPercentage < 5 && showLoading) {
if (showLoading) {
setLoadingError('Processing is taking longer than expected. You can continue waiting or try again later.');
}
}, 30000);

return () => clearTimeout(loadingTimeout);
}, [progressPercentage, showLoading]);
}, [showLoading]);

// Add timeout mechanism to navigate if no activity for 30 seconds
useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/backend/sql_agents/convert_script_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ async def test_convert_script_cleanup_always_runs(self):
mock_sql_agents
)
except RuntimeError:
pass
pass # Expected exception; verifying cleanup below

# Cleanup should be called even on exception
mock_comms_manager.cleanup.assert_called_once()
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e-test/pages/HomePage.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class HomePage(BasePage):
HARMFUL_FILE_2 = "//span[.='harmful_content_2 2.sql']"

def __init__(self, page):
self.page = page
super().__init__(page)

def navigate_to_base_url(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e-test/pages/loginPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class LoginPage(BasePage):
PERMISSION_ACCEPT_BUTTON = "//input[@type='submit']"

def __init__(self, page):
self.page = page
super().__init__(page)

def authenticate(self, username, password):
# login with username and password in web url
Expand Down