Hotfix: planner init crashed for admin accounts, killing autosave and the plans list
Test and deploy / test-and-deploy (push) Successful in 1m34s

The admin nav-link reveal ran before the generated nav existed
(getElementById('nav-admin') was null only for admins — which is why
tests and non-admin checks missed it), aborting init before form wiring,
autosave, and loadPlans. initSideNav now runs first, the reveal is
null-safe, and wireCuppingLink degrades instead of crashing (its button
lost its home when After-the-Roast moved — it now lives at the end of
the Roast Log section with a pointer to the Roasts page).

Also: the Roasts page graph now honors the planner's °C/°F preference.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
Shane Maynard
2026-08-09 08:53:56 -04:00
co-authored by Claude Fable 5
parent c6c392730f
commit 0b4857c225
3 changed files with 27 additions and 4 deletions
+13
View File
@@ -1169,6 +1169,19 @@
Draw from lot
</button>
</div>
<div
style="display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px"
>
<button type="button" class="ghost-btn" id="btn-open-cupping">
Open cupping session
</button>
<span class="field-note" id="cupping-link-note" style="margin:0"></span>
</div>
<p class="field-note">
After the roast, upload the .alog on the
<a href="/roasts">Roasts page</a> — weights, colour, cup notes,
and "one change next batch" now live there with the LLM review.
</p>
</div>
</section>