Files
Mervin Praison 53b370a9ce fix: eliminate UI flickering, blank homepage, black flash, and sidebar highlighting
- index.html: add anti-flicker CSS in head, remove 300ms delay, call notify() immediately
- homepage.js: move setHomepageMode(true) after article creation, use opacity not display:none
- content-loader.js: move setContentMode(true) after article creation, use opacity/absolute
- topnav.js: URL-based sidebar highlighting via highlightActiveSidebarItem()
- server.py: update anti-flicker CSS to match index.html pattern
2026-03-07 22:01:04 +00:00

21 lines
646 B
Python

"""Dashboard with PraisonAI Agent — no @aiui.reply override.
When no @aiui.reply callback is registered, PraisonAIProvider
falls through to direct mode and creates a praisonaiagents.Agent()
per session with memory=True.
Run:
aiui run app_agent.py --style dashboard --port 8082
"""
import praisonaiui as aiui
# Only register pages — no @aiui.reply so the real Agent() is used
@aiui.page("metrics", title="My Metrics", icon="📊", group="Analytics",
description="Custom analytics dashboard")
async def metrics_page():
return {
"total_users": 1_234,
"active_today": 42,
"revenue": "$12,345",
}