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\Development;
|
||||
|
||||
use App\Application\Admin\Service\AdminLayoutProcessor;
|
||||
use App\Framework\Admin\Attributes\AdminPage;
|
||||
use App\Framework\Admin\Attributes\AdminSection;
|
||||
use App\Framework\Attributes\Route;
|
||||
@@ -17,7 +16,6 @@ final readonly class RoutesController
|
||||
{
|
||||
public function __construct(
|
||||
private DiscoveryRegistry $processedResults,
|
||||
private AdminLayoutProcessor $layoutProcessor,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -110,12 +108,10 @@ final readonly class RoutesController
|
||||
'routes' => $routes,
|
||||
];
|
||||
|
||||
$finalData = $this->layoutProcessor->processLayoutFromArray($data);
|
||||
|
||||
return new ViewResult(
|
||||
template: 'routes-overview',
|
||||
metaData: new MetaData('Routes Overview', 'System Routes Overview'),
|
||||
data: $finalData
|
||||
data: $data
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user