From 3647d04eec2a22e98e8cbd357445d662fb236b83 Mon Sep 17 00:00:00 2001 From: matt Date: Tue, 14 Oct 2025 17:47:27 -0700 Subject: [PATCH] fix: Quick Build UI now uses full-width layout on desktop --- CHANGELOG.md | 5 +++-- RELEASE_NOTES_TEMPLATE.md | 5 +++-- code/web/routes/build.py | 15 ++++++--------- .../templates/build/_quick_build_progress.html | 2 +- .../build/_quick_build_progress_content.html | 14 +++++++------- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50c779d..c609ea7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning ## [Unreleased] ### Summary -_No unreleased changes yet._ +Minor UI fixes for Quick Build progress and completion display. ### Added _No unreleased additions yet._ @@ -18,7 +18,8 @@ _No unreleased additions yet._ _No unreleased changes yet._ ### Fixed -_No unreleased fixes yet._ +- Quick Build progress display now uses full desktop width instead of narrow mobile-like layout +- Quick Build completion screen properly transitions to full-width Step 5 layout matching manual build experience_ ## [2.7.0] - 2025-10-14 ### Summary diff --git a/RELEASE_NOTES_TEMPLATE.md b/RELEASE_NOTES_TEMPLATE.md index b7eb064..6859418 100644 --- a/RELEASE_NOTES_TEMPLATE.md +++ b/RELEASE_NOTES_TEMPLATE.md @@ -1,7 +1,7 @@ # MTG Python Deckbuilder ${VERSION} ### Summary -_No unreleased changes yet._ +Minor UI fixes for Quick Build progress and completion display. ### Added _No unreleased additions yet._ @@ -10,4 +10,5 @@ _No unreleased additions yet._ _No unreleased changes yet._ ### Fixed -_No unreleased fixes yet._ +- Quick Build progress display now uses full desktop width instead of narrow mobile-like layout +- Quick Build completion screen properly transitions to full-width Step 5 layout matching manual build experience_ diff --git a/code/web/routes/build.py b/code/web/routes/build.py index a3fca96..9723ab6 100644 --- a/code/web/routes/build.py +++ b/code/web/routes/build.py @@ -3760,19 +3760,16 @@ def quick_build_progress(request: Request): logger.info(f"[Progress Poll] sid={sid}, progress={progress is not None}, running={progress.get('running') if progress else None}") if not progress or not progress.get("running"): - # Build complete - return Step 5 content + remove the polling div + # Build complete - return Step 5 content that replaces the entire wizard container res = sess.get("last_result") if res and res.get("done"): ctx = step5_ctx_from_result(request, sess, res) - # Render Step 5, then add script to remove polling div - step5_html = templates.get_template("build/_step5.html").render(ctx) - # Return Step 5 content + a script that removes the poller and replaces #wizard - final_html = f''' - {step5_html} -
- ''' - response = HTMLResponse(final_html) + # Return Step 5 which will replace the whole wizard div + response = templates.TemplateResponse("build/_step5.html", ctx) response.set_cookie("sid", sid, httponly=True, samesite="lax") + # Tell HTMX to target #wizard and swap outerHTML to replace the container + response.headers["HX-Retarget"] = "#wizard" + response.headers["HX-Reswap"] = "outerHTML" return response # Fallback if no result yet return HTMLResponse('Build complete. Please refresh.') diff --git a/code/web/templates/build/_quick_build_progress.html b/code/web/templates/build/_quick_build_progress.html index 415b2aa..9959d9e 100644 --- a/code/web/templates/build/_quick_build_progress.html +++ b/code/web/templates/build/_quick_build_progress.html @@ -1,6 +1,6 @@ {# Quick Build Progress Indicator - Current Stage + Completed List #} -
+
{% include "build/_quick_build_progress_content.html" %}
diff --git a/code/web/templates/build/_quick_build_progress_content.html b/code/web/templates/build/_quick_build_progress_content.html index 7669f24..39d68d1 100644 --- a/code/web/templates/build/_quick_build_progress_content.html +++ b/code/web/templates/build/_quick_build_progress_content.html @@ -1,15 +1,15 @@ {# Quick Build Progress Content (inner content only, for HTMX updates) #} -
-

Automatic Build in Progress

-

Building your deck automatically without approval steps...

+
+

Automatic Build in Progress

+

Building your deck automatically without approval steps...

{# Simplified Phase Indicator #} -
-
Current Phase
-
{{ current_stage }}
+
+
Current Phase
+
{{ current_stage }}
-
+

This may take 10-30 seconds depending on deck complexity...