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\Content;
|
||||
|
||||
use App\Application\Admin\Service\AdminLayoutProcessor;
|
||||
use App\Domain\Media\ImageRepository;
|
||||
use App\Domain\Media\ImageSlotRepository;
|
||||
use App\Framework\Admin\Attributes\AdminPage;
|
||||
@@ -21,7 +20,6 @@ final readonly class ImageManagerController
|
||||
public function __construct(
|
||||
private ImageSlotRepository $slotRepository,
|
||||
private ImageRepository $imageRepository,
|
||||
private AdminLayoutProcessor $layoutProcessor,
|
||||
private Clock $clock,
|
||||
) {
|
||||
}
|
||||
@@ -40,12 +38,10 @@ final readonly class ImageManagerController
|
||||
'current_year' => $this->clock->now()->format('Y'),
|
||||
];
|
||||
|
||||
$finalData = $this->layoutProcessor->processLayoutFromArray($data);
|
||||
|
||||
return new ViewResult(
|
||||
'image-manager',
|
||||
new MetaData('Image Manager'),
|
||||
$finalData
|
||||
$data
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user