| # AETERNA AI v4.1 — UI/UX Audit & Refactor Report |
|
|
| **Branch**: `refactor/smartcity-forecast-ui` |
| **Date**: 2026-08-30 |
| **Role**: Senior Product Designer, UI/UX Engineer & Responsible AI Reviewer |
| **Scope**: Complete UI/UX redesign and structural refactor of the Waste Forecast Intelligence page into a professional Smart City Decision Support & Operational Command Center. |
|
|
| --- |
|
|
| ## 1. Executive Summary & Design Vision |
|
|
| AETERNA AI is an environmental decision-intelligence platform and research prototype exploring spatial-temporal waste forecasting across the 44 sub-districts (*kecamatan*) of DKI Jakarta. |
|
|
| The previous iteration suffered from a vertically stacked output architecture that dumped raw technical data, creating excessive vertical scrolling, unbalanced visual hierarchy, and confusing layout scaling on laptops and mobile devices. |
|
|
| This refactor transforms the Forecast page into an **executive Smart City Decision Intelligence Dashboard** (inspired by Palantir / municipal command center interfaces). It prioritizes **Decision Clarity over Raw Data Density**, ensuring that stakeholders can immediately answer: |
| 1. **What will happen?** (Tonnage volume, trend curve, daily averages) |
| 2. **Where will it happen?** (High-contrast spatial routing, sub-district baseline comparisons) |
| 3. **How serious is it?** (Operational risk thresholds: Safe / Warning / Critical) |
| 4. **What operational response is suggested?** (15T compactor fleet sizing, crew allocation, collection hours) |
| 5. **How reliable is the data?** (Unambiguous provenance labels: Live Observed, Reference, Estimated, Forecast, Simulation, Mode B Pending). |
|
|
| --- |
|
|
| ## 2. Audit: UX Problems Identified & Solved |
|
|
| | # | Problem in Previous UI | Solution in Smart City Command Center Refactor | |
| |---|---|---| |
| | 1 | **Excessive Vertical Scrolling** | Unified into a structured 12-column responsive layout with 6 clear hierarchical sections. | |
| | 2 | **Confusing Grid Cell Placement** | Fixed CSS Grid distributing mismatched elements by establishing strict column containers (`.col-8`, `.col-4`, `.col-6`, etc.). | |
| | 3 | **Buried Decision Outputs** | Placed 4 high-contrast KPI cards (*Forecast Volume, Risk Level, Suggested Fleet, Forecast Readiness*) immediately below the control panel. | |
| | 4 | **Overly Bulky Config Panel** | Streamlined into a single-row control grid with quick horizon pills (`[1D] [3D] [7D] [14D] [30D]`) and collapsible scenario settings. | |
| | 5 | **Action Button Equality** | Made `RUN FORECAST` the dominant primary CTA (with glow & play icon), demoting `Export CSV` to a clean secondary action. | |
| | 6 | **Map Too Small / Distorted** | Expanded map to 8 columns (~440px desktop height), integrated Esri World Dark Canvas (zero watermark), and added a floating route status overlay. | |
| | 7 | **Crude Daily Timeline Cards** | Replaced compressed text boxes with an interactive **Chart.js Area/Line Chart** showing curve trends, peak day, minimum day, and daily averages. | |
| | 8 | **Plain-Text Waste Composition** | Converted into a segmented multi-bar visual and 2-column detailed progress bars with exact tonnages and percentages. | |
| | 9 | **Raw Debug-Style Logistics Block** | Redesigned into a 6-card operational grid with clear vehicle capacity (15T), crew requirements, throughput duration, and an expandable formula drawer. | |
| | 10 | **Misleading Statistical Confidence** | Renamed false "Confidence/Reliability" score to **Forecast Readiness (Model Indicator)** to honestly reflect model & data health rather than statistical probability. | |
| | 11 | **Excessive Monospace & Neon Glow** | Established modern typography hierarchy (`Outfit` / `Space Grotesk` for UI and headings, `JetBrains Mono` strictly for metadata/tags) and restrained borders. | |
| | 12 | **Mobile / Laptop Clipping** | Implemented fluid responsive breakpoints: 12-col desktop (>=1200px), 2-col tablet, and 1-col mobile with 0 horizontal overflow. | |
|
|
| --- |
|
|
| ## 3. Information Architecture & Section Hierarchy |
|
|
| ``` |
| ┌────────────────────────────────────────────────────────────────────────────────────────┐ |
| │ PAGE HEADER: Waste Forecast Intelligence (Context Pill: Menteng · 7D · Stacking v1.0) │ |
| ├────────────────────────────────────────────────────────────────────────────────────────┤ |
| │ 1. FORECAST CONTROL PANEL │ |
| │ [Location Select] [Model Select] [Horizon Pills: 1D | 3D | 7D | 14D | 30D] │ |
| │ [▸ Advanced Scenario Settings (Rainfall / Headcount Auto vs Manual Toggles)] │ |
| │ [ ▶ RUN FORECAST ] (Dominant CTA) [ ⬇ Export CSV ] (Secondary) │ |
| ├────────────────────────────────────────────────────────────────────────────────────────┤ |
| │ 2. DECISION SUMMARY — 4 COMPACT KPI CARDS │ |
| │ [ FORECAST VOLUME ] [ RISK LEVEL ] [ SUGGESTED FLEET ] [ READINESS ] │ |
| │ 539.48 T [FORECAST] SAFE [DERIVED] 40 Trucks [SIMULATION] 85.4% [MODEL] │ |
| ├────────────────────────────────────────────────────────────────────────────────────────┤ |
| │ 3. GEOSPATIAL & CONTEXT INTELLIGENCE (8 cols + 4 cols) │ |
| │ Left (8 cols): Large Interactive Map (~440px) with Bantargebang Route & Overlay │ |
| │ Right (4 cols): Live Weather (Open-Meteo) & Local Event / Crowd Activity Card │ |
| ├────────────────────────────────────────────────────────────────────────────────────────┤ |
| │ 4. FORECAST TIMELINE & TREND INTELLIGENCE (12 cols) │ |
| │ Chart.js Area Curve with Tooltips | Summary: Total, Daily Avg, Peak Day, Min Day │ |
| ├────────────────────────────────────────────────────────────────────────────────────────┤ |
| │ 5. OPERATIONAL SCENARIO & WASTE COMPOSITION (6 cols + 6 cols) │ |
| │ Left (6 cols): 6 Operational Metric Cards (Fleet, 15T Cap, Crew, Duration, Loads) │ |
| │ Right (6 cols): Segmented Multi-Bar & Detailed Composition Breakdown (Organic...) │ |
| ├────────────────────────────────────────────────────────────────────────────────────────┤ |
| │ 6. HOURLY DISPATCH RISK & DATA PROVENANCE (7 cols + 5 cols) │ |
| │ Left (7 cols): 24-Hour Diurnal Pressure Blocks with Tooltips & Legend │ |
| │ Right (5 cols): Data Transparency Table (Live, Ref, Est, Forecast) & Notice Box │ |
| └────────────────────────────────────────────────────────────────────────────────────────┘ |
| ``` |
|
|
| --- |
|
|
| ## 4. Scientific Data Integrity & Provenance Guarantee |
|
|
| The UI refactor strictly adheres to Responsible AI and Scientific Transparency guidelines: |
|
|
| 1. **Explicit Data Badges Maintained**: |
| - `[LIVE OBSERVED]`: Real-time weather data fetched from Open-Meteo API. |
| - `[REFERENCE]`: Demographic headcount baseline from BPS DKI Jakarta. |
| - `[ESTIMATED]`: Baseline historical normal volumes. |
| - `[FORECAST]`: Model outputs from StackingRegressor or Chronos-T5. |
| - `[SIMULATION]`: Deterministic logistics calculations based on prototype operational assumptions. |
| - `[DERIVED PROPORTIONS]`: Fixed solid waste characterization percentages. |
| - `[MODE B PENDING]`: DLH DKI Jakarta field observation data pending data-sharing agreement. |
| 2. **No Fabricated Accuracy Claims**: |
| - Model readiness is framed as a **Model & Data Health Indicator**, not an operational efficiency percentage or real-world accuracy guarantee. |
| - Logistics outputs carry the prominent notice: `⚠️ SIMULATION — NOT OFFICIAL DLH OPERATIONAL INSTRUCTION`. |
| 3. **No Retraining or Parameter Alteration**: |
| - The ML inference pipeline, FastAPI endpoints (`/api/v1/predict`, `/api/v1/kecamatan`, `/api/v1/predict/csv`), and mathematical formulas in `services/logistics_engine.py` remain 100% untouched. |
|
|
| --- |
|
|
| ## 5. Files Modified in this Refactor |
|
|
| - **`frontend/index.html`**: |
| - Integrated Chart.js (`chart.umd.min.js`). |
| - Restructured `page-predictor` into the 12-column Smart City Command Center layout. |
| - Implemented Horizon quick pills, collapsible scenario drawer, 4 KPI cards, Chart canvas, and refined provenance table. |
| - **`frontend/style.css`**: |
| - Implemented design tokens (`--bg-primary`, `--bg-surface`, `--text-primary`, `--accent-primary`, `--status-live`, etc.). |
| - Added 12-column responsive grid classes and media queries for desktop, tablet, and mobile. |
| - Cleaned all legacy duplicate rules and CSS invert filters. |
| - **`frontend/app.js`**: |
| - Implemented `renderForecastChart()` using Chart.js with gradient fill and summary bar calculations. |
| - Added event listeners for quick horizon pills, scenario auto/manual toggles, and context badge updates. |
| - Enhanced map routing to display real-time distance and travel time in the floating map overlay. |
| - Preserved all existing API contracts and state handling. |
| - **`docs/UI_UX_AUDIT.md`**: |
| - Comprehensive documentation of design decisions, architecture, and verification. |
|
|
| --- |
|
|
| ## 6. Verification & Test Results |
|
|
| - **Automated Test Suite**: |
| ```bash |
| python -m pytest tests/ -v |
| ``` |
| **Result**: `14 passed in 26.41s (100% PASS)` |
| - Schema integrity, provenance fields, logistics formulas, and news validation all passed. |
| - **Multi-Device Responsiveness**: |
| - Desktop (1440px / 1920px): Full 12-column HUD layout with high visual density. |
| - Laptop (1024px / 1280px): Compact, zero-clipping layout with smooth scaling. |
| - Mobile (375px - 428px): Single-column linear layout with touch-friendly controls and zero horizontal overflow. |
|
|