From 0027752654f51e8130c60fd50a1ba5471abb8d38 Mon Sep 17 00:00:00 2001 From: Chad Curtis Date: Thu, 18 Sep 2025 07:05:56 +0000 Subject: [PATCH] consolidation and visual cleanup --- src/components/Shakespeare/PreviewPane.tsx | 30 ++++++++++------------ src/components/ui/browser-address-bar.tsx | 12 ++++++--- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/components/Shakespeare/PreviewPane.tsx b/src/components/Shakespeare/PreviewPane.tsx index 8cbf5dc5..c153f6d5 100644 --- a/src/components/Shakespeare/PreviewPane.tsx +++ b/src/components/Shakespeare/PreviewPane.tsx @@ -217,16 +217,13 @@ export function PreviewPane({ projectId, activeTab }: PreviewPaneProps) { const { params } = message; // Normalize level to ensure it's one of our supported types - let normalizedLevel: ConsoleMessage['level'] = params.level; - if (!['log', 'warn', 'error', 'info', 'debug'].includes(normalizedLevel)) { - // Map other console methods to appropriate levels - if (['exception', 'assert'].includes(normalizedLevel)) { - normalizedLevel = 'error'; - } else if (['clear', 'count', 'countReset', 'dir', 'dirxml', 'group', 'groupCollapsed', 'groupEnd', 'table', 'time', 'timeEnd', 'timeLog', 'trace'].includes(normalizedLevel)) { - normalizedLevel = 'info'; - } else { - normalizedLevel = 'log'; - } + let normalizedLevel: ConsoleMessage['level'] = 'log'; + if (['log', 'warn', 'error', 'info', 'debug'].includes(params.level as ConsoleMessage['level'])) { + normalizedLevel = params.level as ConsoleMessage['level']; + } else if (['exception', 'assert'].includes(params.level)) { + normalizedLevel = 'error'; + } else if (['clear', 'count', 'countReset', 'dir', 'dirxml', 'group', 'groupCollapsed', 'groupEnd', 'table', 'time', 'timeEnd', 'timeLog', 'trace'].includes(params.level)) { + normalizedLevel = 'info'; } const newConsoleMessage: ConsoleMessage = { @@ -442,17 +439,16 @@ export function PreviewPane({ projectId, activeTab }: PreviewPaneProps) { return ( -
- Console Output + Console Output ({consoleMessages.length}) @@ -495,7 +491,7 @@ export function PreviewPane({ projectId, activeTab }: PreviewPaneProps) { {hasBuiltProject ? (
-
+
0} canGoForward={historyIndex < navigationHistory.length - 1} + extraContent={} /> -