Remove duplicate unprotected card that was always rendered regardless
of role, causing 403 for non-customer users. Keep only the customer-
only version wrapped in {% if 'customer.*' in roles %}.
Added sageOnLogin(dashboardUrl) function that checks if the SPA Router
has a route (via Router.current() or URL ?page= param) before loading
the dashboard. This prevents user_logined event from overwriting
Router-restored content on page refresh with deep links.
- Add get_user_today_models() function to load_dashboard.py
Shows current user's today model call counts and amounts
- Create api/user_today_models.dspy endpoint
- Create user_today_models_chart.ui ChartBar widget (30s auto-refresh)
- Add '我的今日模型使用' card section to index.ui with refresh button
- Register new paths in load_path.py (logined permission)
- Dark theme: .tabular-cell color was overriding .tabular-row-selected color
due to same specificity and later position. Added !important and combined
selector .tabular-row-selected .tabular-cell to fix.
- Added background-color change for selected rows (both themes)
- Added cursor:pointer on .tabular-row for better UX
- Light theme: added blue-tinted background + darker text for selected rows
- Fix text jumping on right side when screen narrows (min-width:0 on flex item)
- Fix sidebar toggle button not working (retry icon init, proper state sync)
- Mobile adaptation: sidebar as overlay with slide animation
- Auto-collapse sidebar on mobile viewport (<=768px)
- Click outside sidebar to close on mobile
- Responsive padding for stat cards and main content
- Hide brand title on very small screens (<=480px)
- Smooth transitions for sidebar collapse/expand
dashboard_for_sage now only handles dashboard content when the
dashboard menu item is clicked. Shell layout and global menu are
sage-level concerns managed in sage/wwwroot/index.ui and
sage/wwwroot/global_menu.ui.
- shell.ui: add id to menu urlwidget, binds for sage_login/sage_logout events
- shell_theme.js: add sageReloadMenu() to rebuild menu urlwidget
- global_menu.ui: complete with all 22 modules and role-based visibility
- Intercepts buildUrlwidgetHandler to track navigation to sage_main_content
- Updates browser URL via History API (pushState) on page changes
- Restores page state on browser refresh via ?page= URL parameter
- Supports browser back/forward buttons via popstate event
- Supports deep linking (direct URL access to specific pages)
- URL format: /?page=/module/index.ui
1. Quick entry shortcuts: Replace VBox (no native click) with Button
widgets for reliable click event handling. Each entry wraps its
icon+text in a VBox inside the Button for layout.
2. Ranking tables: Changed get_top_users/ providers queries from
today-only (WHERE use_date=today) to all-time data so transaction
counts and amounts always display meaningful results.
3. Background color: Added bgcolor=#0B1120 to top-level index.ui VBox
so the page background matches the shell theme, eliminating the
white-vs-dark-blue contrast.
- Add scripts/load_path.py with all 28 wwwroot paths
- menu.ui set to 'any' role (public nav access)
- All other paths set to 'logined' role (dashboard visible to authenticated users)
- Idempotent: skips already-registered paths