Repository navigation
feat(WP5): facilities-manager ops dashboard - CO2 first, live fields, urgency control, hourly ledger - #13
Merged
Conversation
…only, urgency control, hourly ledger CSV
Backend (additive): StatusOut carries the FM site card (contracted_peak_kw, package,
employee_rate, driver/noonshift share, signal kind/source, tariff name, ladder);
ImpactOut adds renewable_share + health_usd; GET /sites/{id}/impact.csv is the
24-row hourly ledger (business.md section 12). Smoke asserts all of it.
Web: every page reads live fields (Math.random and the fake pause/reoptimize
buttons are gone), CO2 leads the money everywhere, UrgencyControl is the one
driver-side action (now / soon / priority -> POST /sessions/{id}/urgency),
fail-safe banner names the rung in plain words, offline banner tells you the
uvicorn command. Layout is responsive (rail -> top bar under md); not checked by eye.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017thvbGo7rTVnG2f46cLMzU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The ops app is now the facilities manager's console, built on live fields only.
Backend (additive, contract regenerated):
StatusOut+contracted_peak_kw,n_connectors,p_max_kw,package,employee_rate_usd_per_kwh,driver_share,noonshift_share,signal_kind,signal_source,tariff_name,ladderImpactOut+renewable_share(metrics.md §3),health_usdGET /sites/{id}/impact.csv— 24-row hourly ledgerday,hour,kwh,gco2_per_kwh,kgco2,signal_kind,signal_source(business.md §12), served as an attachmentscripts/smoke.pyasserts the new status fields, the CSV header/row count, and that the ledger carries today's kWhWeb (
web/, no new deps):UrgencyControl(Leaving now · Leaving soon<input type=time>· Prioritise) →POST /sessions/{id}/urgencyMath.randomare gone)/grid/signalsrc/lib/ui.js(keeps react-refresh lint clean)Assumptions confirmed
contracted_peak_kw= feed (150 kW) indata/site.json— no separate contract figure exists for site-1.package: "pilot"; Tariffs page renders capacity / clean-hours / pilot copy from the field.md, grids stack). Not checked by eye — no browser in this session.Checks
pytest: 70 passedscripts/smoke.pyagainst a live uvicorn:SMOKE OK,/impact.csv 24 hourly rows, renewable-hour share 62 %web:oxlintclean (1 pre-existing fast-refresh notice onuseGlobalState),vite build✓noonshift/→ emptywattwise/untouched🤖 Generated with Claude Code
https://claude.ai/code/session_017thvbGo7rTVnG2f46cLMzU