feat: harden auth flows and server mobile navigation

Add normalized email identity rate limiting for registration and forgot-password requests, and refresh Sentinel status from restart broadcasts.

Rework server sidebars and navbar for mobile menus and active status visibility.
This commit is contained in:
Andras Bacsai committed 2026-07-08 09:42:52 +02:00
1 parent 94079c90f2
commit b0f0f7d8d0
42 files changed
+1064 -128

No files matched your search

@@ -1,5 +1,6 @@
<?php
use App\Livewire\Server\Navbar;
use App\Models\InstanceSettings;
use App\Models\Server;
use App\Models\Team;
@@ -52,3 +53,31 @@ it('shows sentinel sync status after the server is validated', function () {
->assertSee('Sentinel')
->assertSee('In sync');
});
it('listens for sentinel restarted broadcasts', function () {
[$server, , $team] = makeNavbarServer(isFunctional: true);
Livewire::test('server.navbar', ['server' => $server])
->assertSet('server.uuid', $server->uuid);
expect(app(Navbar::class)->getListeners())
->toHaveKey("echo-private:team.{$team->id},SentinelRestarted", 'refreshSentinelStatus');
});
it('refreshes sentinel status when sentinel restarts for the server', function () {
[$server] = makeNavbarServer(isFunctional: true);
$server->forceFill(['sentinel_updated_at' => now()->subDay()])->save();
expect($server->fresh()->isSentinelLive())->toBeFalse();
$component = Livewire::test('server.navbar', ['server' => $server->fresh()])
->assertSee('Sentinel')
->assertSee('Out of sync');
$server->sentinelHeartbeat();
$component
->call('refreshSentinelStatus', ['serverUuid' => $server->uuid])
->assertSee('In sync')
->assertDontSee('Out of sync');
});