From 35dfb6dd1f14ca6efb06eac6a6b9bffdcea7e4d1 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Wed, 20 May 2026 22:49:12 +0200 Subject: [PATCH] feat(server-detail): cap inline console to 20 newest; modal keeps 50 Co-Authored-By: Claude Opus 4.7 (1M context) --- l4d2web/l4d2web/routes/page_routes.py | 2 + l4d2web/l4d2web/templates/server_detail.html | 2 +- l4d2web/tests/test_servers.py | 56 ++++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/l4d2web/l4d2web/routes/page_routes.py b/l4d2web/l4d2web/routes/page_routes.py index 646e9e2..6f3bcd7 100644 --- a/l4d2web/l4d2web/routes/page_routes.py +++ b/l4d2web/l4d2web/routes/page_routes.py @@ -328,6 +328,7 @@ def server_detail(server_id: int): ).all() ) ) + console_history_overview = console_history[-20:] connect_host = request.host.split(":")[0] file_tree_root_entries, file_tree_truncated_count = _root_server_file_tree(server_id) @@ -343,6 +344,7 @@ def server_detail(server_id: int): else False, file_tree_truncated_count=file_tree_truncated_count, console_history=console_history, + console_history_overview=console_history_overview, **ctx, ) diff --git a/l4d2web/l4d2web/templates/server_detail.html b/l4d2web/l4d2web/templates/server_detail.html index 9932680..f0fa421 100644 --- a/l4d2web/l4d2web/templates/server_detail.html +++ b/l4d2web/l4d2web/templates/server_detail.html @@ -63,7 +63,7 @@