diff --git a/public/css/styles.css b/public/css/styles.css index 4b4fd4548..a4d28459a 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -204,7 +204,7 @@ display: grid; grid-template-columns: 38% 1fr; grid-template-rows: 1fr auto; - gap: 0 var(--spacing-xl); + gap: 0 var(--spacing-2xl); padding: var(--spacing-lg) var(--spacing-lg); opacity: 0; pointer-events: none; @@ -393,6 +393,9 @@ display: flex; align-items: center; justify-content: center; + max-width: 420px; + background: none; + min-height: auto; } .commands-container { display: grid; diff --git a/public/css/workflow.css b/public/css/workflow.css index 46de535ea..23ba1082e 100644 --- a/public/css/workflow.css +++ b/public/css/workflow.css @@ -122,7 +122,7 @@ display: grid; grid-template-columns: 38% 1fr; grid-template-rows: 1fr auto; - gap: 0 var(--spacing-xl); + gap: 0 var(--spacing-2xl); padding: var(--spacing-lg) var(--spacing-lg); opacity: 0; pointer-events: none; @@ -342,6 +342,9 @@ display: flex; align-items: center; justify-content: center; + max-width: 420px; + background: none; + min-height: auto; } /* (nav moved to fisheye list) */ diff --git a/public/js/components/framework-viz.js b/public/js/components/framework-viz.js index 8cc41039d..28ba69f60 100644 --- a/public/js/components/framework-viz.js +++ b/public/js/components/framework-viz.js @@ -333,6 +333,22 @@ export class PeriodicTable { el.addEventListener('click', () => { activate(); const scrollTarget = display ? display.scrollTo : cmd; + + // Navigate the fisheye scroller to this command + const fisheyeList = document.getElementById('fisheye-list'); + if (fisheyeList) { + const items = [...fisheyeList.querySelectorAll('.fisheye-item')]; + const idx = items.findIndex(item => item.dataset.id === scrollTarget); + if (idx >= 0 && fisheyeList._scrollToCommand) { + // Scroll the commands section into view first + const section = document.querySelector('.commands-subsection'); + if (section) section.scrollIntoView({ behavior: 'smooth', block: 'start' }); + fisheyeList._scrollToCommand(idx); + return; + } + } + + // Fallback: scroll to the spread element const target = document.getElementById(`cmd-${scrollTarget}`); if (target) { target.scrollIntoView({ behavior: 'smooth', block: 'center' }); diff --git a/public/js/components/glass-terminal.js b/public/js/components/glass-terminal.js index 6a7829ddf..be239b944 100644 --- a/public/js/components/glass-terminal.js +++ b/public/js/components/glass-terminal.js @@ -80,12 +80,30 @@ function renderDesktopLayout(container, commands) { 'create': 'Create', 'evaluate': 'Evaluate', 'refine': 'Refine', 'simplify': 'Simplify', 'harden': 'Harden', 'system': 'System' }; + // Preferred order within each category (unlisted commands append at end) + const categoryCommandOrder = { + 'create': ['impeccable', 'shape', 'onboard', 'overdrive'], + 'evaluate': ['critique', 'audit'], + 'refine': ['typeset', 'arrange', 'colorize', 'animate', 'delight', 'bolder', 'quieter'], + 'simplify': ['distill', 'clarify', 'adapt'], + 'harden': ['normalize', 'polish', 'optimize', 'harden'], + 'system': ['extract'] + }; const grouped = {}; filteredCommands.forEach(cmd => { const cat = commandCategories[cmd.id] || 'other'; if (!grouped[cat]) grouped[cat] = []; grouped[cat].push(cmd); }); + // Sort each group by preferred order + Object.entries(grouped).forEach(([cat, cmds]) => { + const order = categoryCommandOrder[cat] || []; + cmds.sort((a, b) => { + const ai = order.indexOf(a.id); + const bi = order.indexOf(b.id); + return (ai === -1 ? 999 : ai) - (bi === -1 ? 999 : bi); + }); + }); const orderedCommands = []; const headerIndices = []; categoryOrder.forEach(cat => { diff --git a/public/js/demo-renderer.js b/public/js/demo-renderer.js index d435e5d63..7247e3a97 100644 --- a/public/js/demo-renderer.js +++ b/public/js/demo-renderer.js @@ -25,39 +25,70 @@ export function renderCommandDemo(commandId) { const demo = getCommandDemo(commandId); if (!demo) { - // impeccable is a setup command, not a visual transform — show usage guide instead + // impeccable has multiple modes — show a usage guide if (commandId === 'impeccable') { return `