fix(SEC-WEB-33+35): Fix Mermaid error display + useWorkspaceId error logging
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
SEC-WEB-33: Replace raw diagram source and detailed error messages in MermaidViewer error UI with a generic "Diagram rendering failed" message. Detailed errors are logged to console.error for debugging only. SEC-WEB-35: Add console.warn in useWorkspaceId when no workspace ID is found in localStorage, making it easier to distinguish "no workspace selected" from silent hook failure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -232,6 +232,11 @@ export function useWorkspaceId(): string | null {
|
||||
const stored = localStorage.getItem(WORKSPACE_KEY);
|
||||
if (stored) {
|
||||
setWorkspaceId(stored);
|
||||
} else {
|
||||
console.warn(
|
||||
`useWorkspaceId: No workspace ID found in localStorage (key: "${WORKSPACE_KEY}"). ` +
|
||||
"This may indicate no workspace has been selected yet."
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to load workspace ID from localStorage:", error);
|
||||
|
||||
Reference in New Issue
Block a user