Skip to content

🎬 Open-source, self-hosted AI agent that runs a YouTube channel end to end: researches topics, writes scripts, generates narration, visuals and video, optimizes SEO, and publishes after your approval, then learns from analytics. Works with Gemini, OpenAI, OpenRouter, DeepSeek and more.

fix(dashboard): remove ambient motion, fix doubled nav labels, read version from server (#84)

Haithum Abdelfattahe4a6d58afa4a
diff --git a/dashboard/enhance.js b/dashboard/enhance.js
index ef6e5d8..4fff734 100644
--- a/dashboard/enhance.js
+++ b/dashboard/enhance.js
@@ -1,6 +1,7 @@
/* ============================================================
- YouTube Automation Agent console enhancement layer — motion, command palette,
- instrumentation. Loads after app.js; touches nothing internal.
+ YouTube Automation Agent console enhancement layer — command palette,
+ shortcuts, instrumentation. Loads after app.js; touches nothing internal.
+ Motion is limited to the boot fade, dialogs, toasts, and data refreshes.
Cross-file globals below are declared by app.js.
============================================================ */
/* global ui, renderNotifications */
@@ -44,24 +45,10 @@
window.switchView = function (view) {
if (!VIEW_META[view]) return baseSwitchView(view);
const changed = view !== currentView;
- const previous = currentView;
currentView = view;
baseSwitchView(view);
document.title = `${VIEW_META[view][2]} · YouTube Automation Agent`;
- const section = $(`#${view}-view`);
- if (section) {
- // Directional slide: forward views enter from the right, back from the left.
- const order = Object.keys(VIEW_META);
- section.style.setProperty('--enter-from', order.indexOf(view) >= order.indexOf(previous) ? '1' : '-1');
- delete section.dataset.viewEnter;
- if (changed && !reduceMotion) {
- void section.offsetWidth; // restart animation
- section.dataset.viewEnter = 'true';
- }
- // Restagger static children + arm scroll reveals
- Array.from(section.children).forEach((child, i) => child.style.setProperty('--i', i));
- armReveals(section);
- }
+ if (changed) window.scrollTo({ top: 0, behavior: reduceMotion ? 'auto' : 'smooth' });
};
}
@@ -92,6 +79,8 @@
origRenderDashboard.apply(this, args);
// Rail pause/resume glyph follows real system state
document.body.dataset.automationPaused = String(Boolean(ui.state?.system?.automationPaused));
+ const versionLabel = $('.console-version');
+ if (versionLabel && ui.state?.system?.version) versionLabel.textContent = `v${ui.state.system.version} · local`;
requestAnimationFrame(() => {
['#stat-review', '#stat-scheduled', '#stat-published', '#analytics-total'].forEach(s => countUp($(s)));
const score = $('#stat-score');
@@ -250,85 +239,12 @@
trigger.addEventListener('click', openPalette);
$('.top-actions').prepend(trigger);
- /* ---------- 4. Cursor spotlight + card glow + tilt ---------- */
- if (!reduceMotion) {
- const glowSelector = '.stat, .pipeline-item, .review-card, .job-card, .plan-card, .learning-card, .readiness-check, .retention-scene';
- const spotlight = $('.spotlight');
- let lastGlow = null;
- let spotlightRaf = 0;
- document.addEventListener('pointermove', event => {
- document.body.classList.add('has-pointer');
- if (spotlight) {
- cancelAnimationFrame(spotlightRaf);
- spotlightRaf = requestAnimationFrame(() => {
- spotlight.style.setProperty('--mx', `${event.clientX}px`);
- spotlight.style.setProperty('--my', `${event.clientY}px`);
- });
- }
- const el = event.target.closest?.(glowSelector);
- if (el !== lastGlow && lastGlow) lastGlow.style.setProperty('--gx', '');
- lastGlow = el;
- if (el) {
- const rect = el.getBoundingClientRect();
- el.style.setProperty('--gx', `${event.clientX - rect.left}px`);
- el.style.setProperty('--gy', `${event.clientY - rect.top}px`);
- }
- }, { passive: true });
-
- // Subtle 3D tilt on stat cards
- $$('.stat').forEach(card => {
- card.addEventListener('pointermove', event => {
- const rect = card.getBoundingClientRect();
- const rx = ((event.clientY - rect.top) / rect.height - .5) * -4;
- const ry = ((event.clientX - rect.left) / rect.width - .5) * 4;
- card.style.transform = `perspective(700px) rotateX(${rx.toFixed(2)}deg) rotateY(${ry.toFixed(2)}deg) translateY(-2px)`;
- });
- card.addEventListener('pointerleave', () => { card.style.transform = ''; });
- });
- }
-
- /* ---------- 5. Button ripple ---------- */
- if (!reduceMotion) {
- document.addEventListener('pointerdown', event => {
- const button = event.target.closest('.button.primary, .button.secondary, .nav-item');
- if (!button) return;
- const rect = button.getBoundingClientRect();
- const ripple = document.createElement('span');
- ripple.className = 'ripple';
- const size = Math.max(rect.width, rect.height) * 2.1;
- ripple.style.cssText = `width:${size}px;height:${size}px;left:${event.clientX - rect.left - size / 2}px;top:${event.clientY - rect.top - size / 2}px`;
- button.appendChild(ripple);
- ripple.addEventListener('animationend', () => ripple.remove());
- });
- }
-
- /* ---------- 6. Scroll reveals (static panels only) ---------- */
- const io = 'IntersectionObserver' in window && !reduceMotion
- ? new IntersectionObserver(entries => {
- for (const entry of entries) {
- if (entry.isIntersecting) {
- entry.target.classList.add('revealed');
- io.unobserve(entry.target);
- }
- }
- }, { threshold: .06, rootMargin: '0px 0px -36px 0px' })
- : null;
- function armReveals(scope) {
- if (!io) return;
- (scope || document).querySelectorAll('.panel:not(.revealed)').forEach(panel => {
- panel.classList.add('reveal');
- io.observe(panel);
- });
- }
-
- /* ---------- 7. Sticky topbar elevation ---------- */
- const topbar = $('.topbar');
+ /* ---------- 4. Sticky topbar elevation ---------- */
window.addEventListener('scroll', () => {
document.body.classList.toggle('scrolled', window.scrollY > 10);
}, { passive: true });
- if (topbar) armReveals(document);
- /* ---------- 8. Toast v2 (icon + slide, keeps API) ---------- */
+ /* ---------- 5. Toast v2 (icon + slide, keeps API) ---------- */
const origShowToast = window.showToast;
if (typeof origShowToast === 'function') {
window.showToast = function (message, type = 'success') {
@@ -348,7 +264,7 @@
};
}
- /* ---------- 9. Live relative-time ticker ---------- */
+ /* ---------- 6. Live relative-time ticker ---------- */
setInterval(() => {
if (ui.state && !ui.refreshing && !document.hidden) {
try {
@@ -357,14 +273,14 @@
}
}, 30000);
- /* ---------- 10. Sidebar status cluster (clock + version) ---------- */
+ /* ---------- 7. Sidebar status cluster (clock + version) ---------- */
const footer = $('.sidebar-footer');
if (footer) {
const cluster = document.createElement('div');
cluster.className = 'console-meta';
cluster.innerHTML = `
<div class="console-clock"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3.5 2"/></svg><span>--:--</span></div>
- <span class="console-version">v2.8.0 · local</span>`;
+ <span class="console-version">local</span>`;
footer.prepend(cluster);
const clockLabel = cluster.querySelector('.console-clock span');
const tickClock = () => {
@@ -374,9 +290,8 @@
setInterval(tickClock, 15000);
}
- /* ---------- 11. First-paint boot sequence ---------- */
+ /* ---------- 8. First-paint boot sequence ---------- */
requestAnimationFrame(() => requestAnimationFrame(() => {
document.documentElement.classList.remove('preboot');
- armReveals($('.view.active'));
}));
})();
diff --git a/dashboard/index.html b/dashboard/index.html
index 8105d57..397f58b 100644
--- a/dashboard/index.html
+++ b/dashboard/index.html
@@ -13,8 +13,6 @@
<link rel="stylesheet" href="/styles.css">
</head>
<body>
- <div class="aurora" aria-hidden="true"></div>
- <div class="spotlight" aria-hidden="true"></div>
<div class="app-shell">
<aside class="sidebar">
<a class="brand" href="#overview" aria-label="YouTube Automation Studio home">
diff --git a/dashboard/styles.css b/dashboard/styles.css
index e42739c..1c832dd 100644
--- a/dashboard/styles.css
+++ b/dashboard/styles.css
@@ -151,6 +151,7 @@ nav { display: grid; gap: 3px; }
transition: color .15s ease, background-color .15s ease;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .75; transition: opacity .15s ease; }
+.nav-item .mini-label { display: none; } /* rail-only; shown in the icon-rail media query */
.nav-item:hover { background: rgba(151, 167, 195, .06); color: var(--text-2); }
.nav-item:hover svg { opacity: 1; }
.nav-item.active { background: linear-gradient(90deg, var(--red-soft), rgba(255, 77, 94, .03)); color: var(--text); }
@@ -257,8 +258,7 @@ main { padding: 0 3.2vw 72px; min-width: 0; }
box-shadow: var(--shadow-panel);
}
-.stat { padding: 18px 20px; min-height: 122px; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: transform .16s ease, border-color .16s ease; }
-.stat:hover { transform: translateY(-2px); border-color: var(--line-strong); }
+.stat { padding: 18px 20px; min-height: 122px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.stat::after {
content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 2px;
background: linear-gradient(90deg, var(--red), transparent 70%); opacity: .5; border-radius: 99px 99px 0 0;
@@ -531,8 +531,7 @@ label:has(input:disabled) > span { color: var(--muted); }
.readiness-actions { display: grid; gap: 11px; padding: 16px; border: 1px solid var(--line-strong); background: var(--surface-inset); border-radius: var(--radius); }
.readiness-actions small { color: var(--muted); line-height: 1.45; }
.readiness-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
-.readiness-check { border: 1px solid var(--line); background: linear-gradient(155deg, var(--surface-2), var(--surface-1)); border-radius: var(--radius); padding: 17px; min-height: 180px; transition: border-color .15s ease, transform .15s ease; }
-.readiness-check:hover { transform: translateY(-1px); }
+.readiness-check { border: 1px solid var(--line); background: linear-gradient(155deg, var(--surface-2), var(--surface-1)); border-radius: var(--radius); padding: 17px; min-height: 180px; }
.readiness-check.passed { border-color: rgba(61, 220, 151, .28); }
.readiness-check.failed { border-color: rgba(255, 77, 94, .38); }
.readiness-check.warning, .readiness-check.skipped { border-color: rgba(255, 194, 71, .3); }
@@ -766,7 +765,11 @@ label:has(input:disabled) > span { color: var(--muted); }
}
/* ============================================================
- PRODUCTION LAYER — ambience, choreography, palette, glow
+ PRODUCTION LAYER — boot, topbar, command palette, toast
+ Motion policy: one page-load moment (boot-in), a short fade when a
+ view opens, and motion that answers an action (dialog, toast,
+ data refresh). No ambient animation, cursor effects, or per-card
+ choreography.
============================================================ */
/* ---------- Preboot gate ---------- */
@@ -774,82 +777,10 @@ label:has(input:disabled) > span { color: var(--muted); }
html:not(.preboot) body { animation: boot-in .55s cubic-bezier(.2, .7, .3, 1); }
@keyframes boot-in { from { opacity: 0; transform: translateY(8px) scale(.995); } }
-/* ---------- Aurora ambience ---------- */
-.aurora {
- position: fixed; inset: -20%; z-index: 0; pointer-events: none;
- background:
- radial-gradient(38% 42% at 22% 24%, rgba(217, 44, 70, .13), transparent 68%),
- radial-gradient(34% 38% at 78% 18%, rgba(110, 168, 255, .09), transparent 66%),
- radial-gradient(40% 44% at 62% 82%, rgba(196, 123, 255, .07), transparent 70%),
- radial-gradient(30% 34% at 12% 74%, rgba(61, 220, 151, .05), transparent 64%);
- filter: blur(46px);
-}
-body:not(.cmdk-open) .aurora { animation: aurora-drift 26s ease-in-out infinite alternate; }
-@keyframes aurora-drift {
- 0% { transform: translate3d(0, 0, 0) scale(1); }
- 50% { transform: translate3d(-2.5%, 2%, 0) scale(1.06) rotate(2deg); }
- 100% { transform: translate3d(2%, -2%, 0) scale(1.02) rotate(-2deg); }
-}
-
-/* ---------- Cursor spotlight ---------- */
-.spotlight {
- position: fixed; inset: 0; z-index: 2; pointer-events: none;
- opacity: 0; transition: opacity .5s ease;
-}
-body.has-pointer .spotlight { opacity: 1; }
-.spotlight::before {
- content: ""; position: absolute; inset: 0;
- background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 30%), rgba(110, 168, 255, .055), transparent 65%);
-}
-
-/* ---------- Card cursor glow + gradient border sheen ---------- */
-.stat, .pipeline-item, .review-card, .job-card, .plan-card, .learning-card, .readiness-check, .retention-scene {
- position: relative;
-}
-.stat::before, .pipeline-item::before, .review-card::before, .job-card::before,
-.plan-card::before, .learning-card::before, .readiness-check::before, .retention-scene::before {
- content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
- opacity: 0; transition: opacity .25s ease;
- background: radial-gradient(220px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 77, 94, .08), transparent 60%);
-}
-.stat:hover::before, .pipeline-item:hover::before, .review-card:hover::before, .job-card:hover::before,
-.plan-card:hover::before, .learning-card:hover::before, .readiness-check:hover::before, .retention-scene:hover::before { opacity: 1; }
-.readiness-check::after {
- content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
- background: radial-gradient(170px at var(--gx, 50%) var(--gy, 50%), rgba(255, 77, 94, .55), transparent 65%);
- -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
- -webkit-mask-composite: xor; mask-composite: exclude;
- opacity: 0; transition: opacity .25s ease;
-}
-.readiness-check:hover::after { opacity: 1; }
-
-/* ---------- View enter choreography ---------- */
-.view[data-view-enter] { animation: view-slide .34s cubic-bezier(.2, .75, .25, 1) both; }
-@keyframes view-slide {
- from { opacity: 0; transform: translateX(calc(var(--enter-from, 1) * 26px)); }
- to { opacity: 1; transform: none; }
-}
-.view[data-view-enter] > * { animation: child-rise .4s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--i, 0) * 55ms + 40ms); }
-@keyframes child-rise { from { opacity: 0; transform: translateY(14px); } }
-
-/* ---------- Scroll reveal ---------- */
-.panel.reveal { opacity: 0; transform: translateY(16px); }
-.panel.reveal.revealed { opacity: 1; transform: none; transition: opacity .55s cubic-bezier(.2, .7, .3, 1), transform .55s cubic-bezier(.2, .7, .3, 1); }
-@media (prefers-reduced-motion: reduce) { .panel.reveal { opacity: 1; transform: none; } }
-
-/* ---------- Score pop ---------- */
+/* ---------- Score pop (data refresh) ---------- */
.score-pop { animation: score-pop .6s cubic-bezier(.3, .8, .35, 1.15); display: inline-block; }
@keyframes score-pop { 0% { transform: translateY(8px); opacity: 0; } 100% { transform: none; opacity: 1; } }
-/* ---------- Ripple ---------- */
-.ripple {
- position: absolute; border-radius: 50%; pointer-events: none;
- background: radial-gradient(circle, rgba(255, 255, 255, .28) 0%, transparent 62%);
- transform: scale(0); animation: ripple .55s ease-out forwards; mix-blend-mode: screen;
-}
-@keyframes ripple { to { transform: scale(1); opacity: 0; } }
-.nav-item, .button.primary, .button.secondary { position: relative; overflow: hidden; }
-
/* ---------- Sticky topbar elevation ---------- */
.topbar {
position: sticky; top: 0; z-index: 5; margin-top: -1px; padding: 10px 0 14px;
@@ -1030,12 +961,6 @@ body.scrolled .topbar { border-color: rgba(151, 167, 195, .32); }
.loading-bar { left: var(--sidebar-w); }
}
-/* ---------- View slide tuned to new geometry ---------- */
-@keyframes view-slide {
- from { opacity: 0; transform: translateX(calc(var(--enter-from, 1) * 30px)); }
- to { opacity: 1; transform: none; }
-}
-
@media (max-width: 900px) {
.topbar { position: static; margin-top: 4px; }
}
diff --git a/index.js b/index.js
index 50c9667..f0f0a3a 100644
--- a/index.js
+++ b/index.js
@@ -393,6 +393,7 @@ class YouTubeAutomationAgent {
this.app.get('/health', (req, res) => {
res.json({
status: this.setupRequired ? 'setup_required' : 'healthy',
+ version,
initialized: this.isInitialized,
setupRequired: this.setupRequired,
agents: Object.keys(this.agents),
@@ -531,6 +532,7 @@ class YouTubeAutomationAgent {
stats, jobs, pipeline, schedule, events, notifications, profile, settings, ideas, analytics, learning, activation,
channelStrategy, operatorRuns, readiness, engagement, experiments,
system: {
+ version,
initialized: this.isInitialized,
setupRequired: this.setupRequired,
uptime: process.uptime(),