From 0d764799a79e761b9db5c506d34017f2c14439e2 Mon Sep 17 00:00:00 2001
From: KeelrLeek <156356974+KeelrLeek@users.noreply.github.com>
Date: Mon, 5 Oct 2026 16:43:54 -0500
Subject: [PATCH] Logbook: lead with '% done' (functions handled out of all
10,673), game functions decompiled, and unsorted; trend tracks done
---
harbor/logbook.py | 6 ++++++
harbor/web/app.html | 11 +++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/harbor/logbook.py b/harbor/logbook.py
index 33beba1..5c7f4b3 100644
--- a/harbor/logbook.py
+++ b/harbor/logbook.py
@@ -84,7 +84,13 @@ def set_stats(project, stats, history_point=True):
_write(project, "stats.json", stats)
if history_point:
history = _read(project, "history.json", [])
+ cats = stats.get("by_category") or {}
+ total = stats.get("functions") or 0
+ undone_game = max(0, (cats.get("game") or {}).get("functions", 0)
+ - ((stats.get("by_status") or {}).get("decompiled") or {}).get("functions", 0))
+ handled = total - (cats.get("unsorted") or {}).get("functions", 0) - undone_game
history.append({"at": stats["updated_at"], "classified": stats.get("classified_percent", 0),
+ "done": round(100 * handled / total, 2) if total else 0,
"decompiled": stats.get("game_bytes_decompiled_percent", 0),
"weighted": stats.get("weighted_percent", 0),
"verified": stats.get("game_bytes_verified_percent", 0)})
diff --git a/harbor/web/app.html b/harbor/web/app.html
index e2443e7..c4400ee 100644
--- a/harbor/web/app.html
+++ b/harbor/web/app.html
@@ -690,7 +690,7 @@ button.chip:hover { color: var(--accent-ink); background: var(--accent-soft); }
Trend
main at '+esc(s.commit||'–')+'':'No statistics yet')+(au.last_refresh?'
Keeps itself current: last checked '+esc(central(au.last_refresh))+(au.last_error?' · '+esc(String(au.last_error).slice(0,120))+'':''):''));
- put('lbFigs',[[fmt(s.functions),'functions in the original executable',fmt(s.bytes)+' bytes of code'],[pct(s.classified_percent),'classified (category known)',fmt(cat('unsorted').functions)+' still unsorted'],
- [pct(s.weighted_percent),'weighted progress','documented 20 · decompiled 40 · reimplemented 75 · verified 100'],[pct(s.game_bytes_decompiled_percent),'of game code decompiled to readable C','Rust: '+pct(s.game_bytes_reimplemented_percent)+' reimplemented']]
+ const total=s.functions||0,game=cat('game').functions,done=(s.by_status&&s.by_status.decompiled||{}).functions||0,uns=cat('unsorted').functions;
+ const handled=total-uns-Math.max(0,game-done);
+ put('lbFigs',[[pct(total?100*handled/total:0)+' done',fmt(handled)+' of '+fmt(total)+' functions handled','game code decompiled, everything else identified'],
+ [fmt(done)+' of '+fmt(game),'game functions decompiled to readable C',fmt(game-done)+' to go'],
+ [fmt(uns),'functions not sorted yet','each one is either game code (to decompile) or engine/library code (to name)']]
.map(([v,l,n])=>'