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:
@@ -6,7 +6,6 @@ namespace App\Application\Admin\Database;
|
||||
|
||||
use App\Framework\Admin\Attributes\AdminPage;
|
||||
use App\Framework\Admin\Attributes\AdminSection;
|
||||
use App\Application\Admin\Service\AdminLayoutProcessor;
|
||||
use App\Framework\Admin\AdminPageRenderer;
|
||||
use App\Framework\Attributes\Route;
|
||||
use App\Framework\Database\Browser\Registry\DatabaseRegistry;
|
||||
@@ -24,7 +23,6 @@ final readonly class DatabaseBrowserController
|
||||
private DatabaseRegistry $databaseRegistry,
|
||||
private TableRegistry $tableRegistry,
|
||||
private AdminPageRenderer $pageRenderer,
|
||||
private AdminLayoutProcessor $layoutProcessor,
|
||||
private PaginationService $paginationService,
|
||||
private DatabaseTableGenerator $tableGenerator,
|
||||
) {
|
||||
@@ -72,12 +70,10 @@ final readonly class DatabaseBrowserController
|
||||
],
|
||||
];
|
||||
|
||||
$finalData = $this->layoutProcessor->processLayoutFromArray($data);
|
||||
|
||||
return new ViewResult(
|
||||
template: 'database/browser',
|
||||
metaData: new MetaData('Database Browser', 'Admin - Database Browser'),
|
||||
data: $finalData
|
||||
data: $data
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user