fix: YAML folded scalar parser, delete redirect, #protocols routing, forked_from null

- Fix YAML fallback parser to properly handle folded scalars (>-) at
  both top-level (description, outcome, practice) and step-level
  (step descriptions). Previously stored '>-' as the literal value
  instead of the folded text.

- Fix delete protocol/collection: reset currentRoute guard so
  navigate('library') actually works after deletion.

- Change #library hash to #protocols throughout (routing, nav links,
  breadcrumb shows 'protocols/' on the main page).

- Fix breadcrumb home click not working from detail pages (allow
  re-navigation to library even if currentRoute matches).

- Fix forked_from: null showing as a clickable link — now suppressed
  when value is null or the string 'null'.

- README: replace curl seed instructions with About page button,
  add About page customization instructions for whitelabeling.
This commit is contained in:
Protocolbot
2026-07-06 20:42:44 -06:00
parent 524d9b9c95
commit 4c05c1067e
4 changed files with 93 additions and 84 deletions
Executable → Regular
+2 -9
View File
@@ -15,7 +15,7 @@
<span class="crumb-path" id="crumbPath"></span>
</div>
<nav id="navBar">
<a href="#library" class="active" data-view="library">PROTOCOLS</a>
<a href="#protocols" class="active" data-view="library">PROTOCOLS</a>
<a href="#collections" data-view="collections">COLLECTIONS</a>
<a href="#about" data-view="about">ABOUT</a>
</nav>
@@ -24,7 +24,7 @@
</header>
<div class="mobile-panel" id="mobilePanel">
<a href="#library" data-view="library" class="active" onclick="mobileNav('library')">PROTOCOLS</a>
<a href="#protocols" data-view="library" class="active" onclick="mobileNav('library')">PROTOCOLS</a>
<a href="#collections" data-view="collections" onclick="mobileNav('collections')">COLLECTIONS</a>
<a href="#about" data-view="about" onclick="mobileNav('about')">ABOUT</a>
<div class="mobile-auth" id="mobileAuth"></div>
@@ -87,13 +87,6 @@
<h2>License</h2>
<p class="outcome">Hippocratic License (HL3-CORE) — do no harm. See <a href="https://firstdonoharm.dev/" target="_blank">firstdonoharm.dev</a>. Source code available on <a href="https://git.medlab.host/ntnsndr/protocol-droid" target="_blank">Gitea</a>.</p>
</div>
<div class="detail-section" id="seedSection" style="display:none">
<h2>Seed protocols</h2>
<p class="outcome">Load a starter set of 6 example protocols (Round Robin Check-In, Consent Decision-Making, Appreciative Apology, Temperature Reading, Dot Voting, Fishbowl Discussion) into your library.</p>
<div class="actions">
<button class="btn primary" id="seedBtn" onclick="loadSeedProtocols()">Load seed protocols</button>
</div>
</div>
</section>
<!-- PROTOCOL DETAIL VIEW -->