From 4f889b073c15d18df387c2e252817436b317e705 Mon Sep 17 00:00:00 2001 From: TheFlow Date: Sat, 25 Oct 2025 12:22:55 +1300 Subject: [PATCH] fix(audit): fix timeline chart rendering with pixel heights and count labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed broken "Decisions Over Time" chart that wasn't displaying bars. Root cause: Empty divs with percentage heights collapsed in flex containers. Fixes applied: 1. **Pixel heights instead of percentages** - Calculate absolute pixel heights from h-48 container (192px) - Percentage heights don't work in flex containers with items-end 2. **Non-breaking space inside bars** - Added   to prevent empty div collapse - Even with height set, empty divs can collapse in some layouts 3. **Decision count labels** - Display count above each bar for exact numbers - Shows both visual proportion (bar height) and exact value (label) 4. **Minimum 10px height** - Ensures small values are always visible - Prevents bars from disappearing for low counts 5. **Wider bars** - Changed from max-w-16 (64px) to w-3/4 (75% width) - More visible and easier to interact with Timeline modes working: - ✅ 6-Hourly (24h) - 4 bars showing last 24 hours in 6-hour buckets - ✅ Daily (7d) - 7 bars showing last 7 days - ✅ Weekly (4w) - 4 bars showing last 4 weeks All modes show current snapshot updated on refresh. Files changed: - public/js/admin/audit-analytics.js: Timeline rendering logic - public/admin/audit-analytics.html: Updated cache version - public/*.html: Cache version bump for consistency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- public/about.html | 18 ++++++++-------- public/admin/audit-analytics.html | 2 +- public/api-reference.html | 6 +++--- public/blog-post.html | 10 ++++----- public/blog.html | 14 ++++++------ public/case-submission.html | 12 +++++------ public/check-version.html | 2 +- public/docs-viewer.html | 16 +++++++------- public/docs.html | 20 +++++++++--------- public/faq.html | 34 +++++++++++++++--------------- public/implementer.html | 20 +++++++++--------- public/index.html | 20 +++++++++--------- public/js/admin/audit-analytics.js | 27 +++++++++++++++++------- public/koha.html | 18 ++++++++-------- public/leader.html | 22 +++++++++---------- public/media-inquiry.html | 12 +++++------ public/privacy.html | 12 +++++------ public/researcher.html | 22 +++++++++---------- public/version.json | 2 +- 19 files changed, 150 insertions(+), 139 deletions(-) diff --git a/public/about.html b/public/about.html index b6c25554..d5e1222e 100644 --- a/public/about.html +++ b/public/about.html @@ -5,9 +5,9 @@ About | Tractatus AI Safety Framework - - - + + +