Skip to content
Merged
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 scripts/validate_bicep_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def parse_parameters_env_vars(json_path: Path) -> dict[str, list[str]]:
data = json.loads(sanitized)
params = data.get("parameters", {})
except json.JSONDecodeError:
# If JSON parsing fails, params remains empty and no variables will be found.
# This is acceptable as the function will return an empty result dict.
pass

# Walk each top-level parameter and scan its entire serialized value
Expand Down
3 changes: 3 additions & 0 deletions src/backend/common/database/cosmosdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ async def create_batch(self, user_id: str, batch_id: UUID) -> BatchRecord:
self.logger.info("Returning existing batch record", batch_id=str(batch_id))
return BatchRecord.fromdb(batchexists)

# This line should never be reached as all paths above either return or raise
raise RuntimeError(f"Unexpected state while processing batch {batch_id}")

except Exception as e:
self.logger.error("Failed to create batch", error=str(e))
raise
Expand Down
1 change: 0 additions & 1 deletion src/backend/sql_agents/convert_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ async def convert_script(
FileResult.ERROR,
),
)
is_complete = True
break

if comms_manager.group_chat.is_complete:
Expand Down
11 changes: 3 additions & 8 deletions src/frontend/src/pages/modernizationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Header from "../components/Header/Header";
import HeaderTools from "../components/Header/HeaderTools";
import PanelLeft from "../components/Panels/PanelLeft";
import webSocketService from "../api/WebSocketService";
import { useSelector } from 'react-redux';
import {
Button,
Text,
Expand Down Expand Up @@ -478,9 +477,6 @@ const getPrintFileStatus = (status: string): string => {
const ModernizationPage = () => {
const { batchId } = useParams<{ batchId: string }>();
const navigate = useNavigate();

// Redux state to listen for start processing completion
const batchState = useSelector((state: any) => state.batch);

const [batchSummary, setBatchSummary] = useState<BatchSummary | null>(null);
Comment on lines 477 to 481
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

batchState/Redux selector usage was removed in this block, but the file still imports useSelector from react-redux (and it’s no longer referenced anywhere). This will typically trip TS/ESLint “unused import” checks—please remove the unused useSelector import (and any other now-unused Redux imports, if present).

Copilot uses AI. Check for mistakes.
const styles = useStyles();
Expand All @@ -497,7 +493,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 All @@ -514,7 +509,7 @@ const ModernizationPage = () => {
const selectedFile = files.find((f) => f.id === selectedFileId);
if (!selectedFile || !selectedFile.translatedCode) {
setFileLoading(true);
const newFileUpdate = await fetchFileFromAPI(selectedFile?.fileId || "");
await fetchFileFromAPI(selectedFile?.fileId || "");
setFileLoading(false);
} else {

Expand Down Expand Up @@ -970,13 +965,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]);

// Poll summary status during inactivity, but do not force completion/navigation by timeout.
useEffect(() => {
Expand Down
Loading