Make queue UI optional and fix idle summary

This commit is contained in:
Meta Vens 2026-04-26 04:23:37 +01:00
commit 7206b454db
7 changed files with 165 additions and 64 deletions

View file

@ -1,7 +1,9 @@
param(
[string]$BindHost = "127.0.0.1",
[int]$Port = 8000,
[switch]$Reload
[switch]$Reload,
[ValidateSet("auto", "show", "hide")]
[string]$QueueUI = "auto"
)
$ErrorActionPreference = "Stop"
@ -15,7 +17,8 @@ if (-not (Test-Path $python)) {
$args = @(
(Join-Path $repoRoot "scripts\run_gui.py"),
"--host", $BindHost,
"--port", $Port
"--port", $Port,
"--queue-ui", $QueueUI
)
if ($Reload) {

View file

@ -164,15 +164,28 @@ def build_parser() -> argparse.ArgumentParser:
parser.add_argument("--host", default="127.0.0.1", help="Host interface to bind")
parser.add_argument("--port", type=int, default=8000, help="Port to bind")
parser.add_argument("--reload", action="store_true", help="Enable autoreload while developing the GUI server")
parser.add_argument(
"--queue-ui",
choices=("auto", "show", "hide"),
default="auto",
help="Whether to show the queue panel in the frontend. auto follows hosted-demo mode.",
)
return parser
def main(argv: list[str] | None = None) -> int:
repo_root = _repo_root()
_ensure_src_on_path()
from repixelizer.gui import main as gui_main
args = build_parser().parse_args(argv)
if args.queue_ui == "show":
os.environ["REPIXELIZER_SHOW_QUEUE_PANEL"] = "1"
elif args.queue_ui == "hide":
os.environ["REPIXELIZER_SHOW_QUEUE_PANEL"] = "0"
else:
os.environ.pop("REPIXELIZER_SHOW_QUEUE_PANEL", None)
from repixelizer.gui import main as gui_main
try:
message = _reclaim_stale_gui_port(args.host, args.port, repo_root)
except RuntimeError as exc: