fix(console): comprehensive TUI rendering fixes
- Fix Enter key detection: handle multiple Enter key formats (\n, \r, \r\n) - Reduce flickering: lower render frequency from 60 FPS to 30 FPS - Fix menu bar visibility: re-render menu bar after content to prevent overwriting - Fix content positioning: explicit line positioning for categories and commands - Fix line shifting: clear lines before writing, control newlines manually - Limit visible items: prevent overflow with maxVisibleCategories/Commands - Improve CPU usage: increase sleep interval when no events processed This fixes: - Enter key not working for selection - Strong flickering of the application - Menu bar not visible or being overwritten - Top half of selection list not displayed - Lines being shifted/misaligned
This commit is contained in:
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Application\Admin\Analytics;
|
||||
|
||||
use App\Application\Admin\Service\AdminLayoutProcessor;
|
||||
use App\Application\Analytics\Service\AnalyticsDashboardService;
|
||||
use App\Application\Analytics\Service\AnalyticsRealTimeService;
|
||||
use App\Application\Analytics\Service\AnalyticsReportService;
|
||||
@@ -22,10 +21,9 @@ use App\Framework\Admin\Attributes\AdminPage;
|
||||
use App\Framework\Admin\Attributes\AdminSection;
|
||||
|
||||
#[AdminSection(name: 'Analytics', icon: 'chart-bar', order: 4, description: 'Analytics and reporting')]
|
||||
final class AnalyticsController
|
||||
final readonly class AnalyticsController
|
||||
{
|
||||
public function __construct(
|
||||
private AdminLayoutProcessor $layoutProcessor,
|
||||
private AnalyticsDashboardService $dashboardService,
|
||||
private AnalyticsStorage $storage,
|
||||
private AnalyticsReportService $reportService,
|
||||
@@ -69,12 +67,10 @@ final class AnalyticsController
|
||||
'last_update' => date('Y-m-d H:i:s'),
|
||||
];
|
||||
|
||||
$finalData = $this->layoutProcessor->processLayoutFromArray($data);
|
||||
|
||||
return new ViewResult(
|
||||
template: 'analytics-dashboard',
|
||||
metaData: new MetaData('Analytics Dashboard', 'Website Analytics and User Behavior'),
|
||||
data: $finalData
|
||||
data: $data
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user