Make terminal log stream live-only by default

This commit is contained in:
npc0-hue
2026-08-25 09:42:24 +08:00
parent 199fa8b41d
commit 725b71b6b6
7 changed files with 72 additions and 9 deletions
@@ -69,7 +69,7 @@ afterEach(async () => {
});
describe("ServerManagementTerminalDrawer", () => {
it("shows current-session replay and keeps it on a repeated boundary for the same session", async () => {
it("shows live current-session output and keeps it on a repeated boundary for the same session", async () => {
await renderDrawer();
await emitSession("session-a");
@@ -211,7 +211,7 @@ async function renderDrawer() {
await act(async () => {
root?.render(<ServerManagementTerminalDrawer open serverId="server-1" serverName="SCUM Alpha" pluginId="game.scum" canManage onClose={() => undefined} />);
});
expect(apiMocks.openServerLogEvents).toHaveBeenCalledWith("server-1", { historyLimit: 500 });
expect(apiMocks.openServerLogEvents).toHaveBeenCalledWith("server-1", { historyLimit: 0 });
}
async function emitSession(logSessionId?: string, serverTime = "2026-08-14T00:00:00Z") {