Commit graph

80 commits

Author SHA1 Message Date
Manohar Gupta
3c98aa3c80 fix: show all cost line items in Project Cost Breakdown
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Show all items even when value is 0 (DSRA, EPC overheads, etc.)
- Always show Solar Module, Solar BoS, Solar Land Cost
- Wind items only show if windEnabled
- BESS items only show if bessEnabled
2026-05-29 18:25:32 +05:30
Manohar Gupta
17dc873d9b fix: land cost calculation - filter by both id and attribution
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Solar land cost: only items with id containing 'land' AND attribution 'SolarOnly'
- Wind land cost: only items with id containing 'land' AND attribution 'WindOnly'
- Prevents wind land cost from appearing in pure solar projects
2026-05-29 18:24:02 +05:30
Manohar Gupta
e920fa6f71 fix: Correct Total Hard Cost calculation - use baseHardCost for financing costs
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Remove DSRA from Total Hard Cost (it's a financing reserve, not capital cost)
- Use baseHardCost instead of inflated totalCostCr for financing calculations
- DSRA shown separately after Total Hard Cost
2026-05-29 17:52:19 +05:30
Manohar Gupta
dfa5ae36d8 feat: Expand Project Cost Breakdown to show all cost items
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Split Solar Land and Wind Land into separate lines
- Add DSRA (Debt Service Reserve Account)
- Split EPC overheads into Solar and Wind
- Add EPC Margin categories (WTG Tower+BOP, Solar BOS)
- Split Contingency into Solar and Wind
- Add Total Hard Cost subtotal
- Add financing costs (upfront fee, IDC, bank guarantee)
2026-05-29 17:37:51 +05:30
Manohar Gupta
581eafbf36 feat(web): display Wind 8760 profile in generation sheet
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Added windProfileAvg to Year level display (similar to solarProfileAvg)
- Added windProfileMo to Month level display
- Added windProfileDay to Day level display
- Added hourProfileW (raw wind profile) to Hour level display
- This makes Wind profile display consistent with Solar profile display
2026-05-28 15:28:29 +05:30
Manohar Gupta
4450eeb24f Fix: Remove duplicate financing cost in Project Cost Breakdown table
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
The financing cost (IDC + upfront fees) was being displayed both as a separate
line item AND included in the total calculation, causing the Total Project Cost
to be inflated by the financing amount. This fix removes the separate financing
row from the breakdown table while keeping the correct total calculation.
2026-05-28 15:17:27 +05:30
Manohar Gupta
fecc90c7a0 Show CUF % on each file card for quick glance
Some checks failed
CI / Engine — lint / typecheck / test (push) Has been cancelled
CI / API — lint / typecheck / test (push) Has been cancelled
CI / Web — typecheck / lint / build (push) Has been cancelled
2026-05-24 08:08:49 +05:30
Manohar Gupta
5252d471ba Use empty string for API_BASE in production (relative paths)
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-24 01:19:15 +05:30
Manohar Gupta
4630ea3999 Fix API_BASE to use relative path for production
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-24 00:32:41 +05:30
Manohar Gupta
0f8a50caf2 Add as_csv=true to fetch URL to get CSV format
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-24 00:03:04 +05:30
Manohar Gupta
d2c2e2fe63 Add loading spinner and debug logs for file fetch
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-23 23:47:46 +05:30
Manohar Gupta
dda17fa6c3 Return full CSV format with all columns for file preview
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-23 19:19:39 +05:30
Manohar Gupta
a850822e0a Remove backup file causing build error
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-23 19:07:47 +05:30
Manohar Gupta
351229b0a9 Rewrite ProfileViewer to fix syntax error
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-23 19:03:30 +05:30
Manohar Gupta
0286bdefae Fix syntax error in ProfileViewer component
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-23 18:57:03 +05:30
Manohar Gupta
261f5c4184 Fix file preview and button interaction
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-23 18:13:08 +05:30
Manohar Gupta
fd0aa5060a Show all 8760 rows in file preview (no limit)
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-23 18:00:57 +05:30
Manohar Gupta
b00d0fa76f Add file preview to display CSV contents when clicking on profiles
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-23 17:53:17 +05:30
Manohar Gupta
874877f5ba Add bundled reference files download links
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-23 17:39:39 +05:30
Manohar Gupta
0ba21e8936 Rename to View Files and File Reference Library
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-23 17:39:04 +05:30
Manohar Gupta
112c25c26b Add CUF profile viewer with upload capability
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-23 17:22:31 +05:30
Manohar Gupta
680df1a597 Make KPI summary cards clickable - navigate to relevant sheets
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Added onClick prop to KpiCard component
- SummarySheet now accepts onNavigate callback
- KPI cards now link to appropriate sheets:
  - Solved Tariff, Solar Y1 CUF, Wind Y1 PLF -> Generation
  - Equity IRR, Project IRR, LCOE, Payback -> IRR / Returns
  - Min DSCR, Avg DSCR, Total Capex, Debt -> Debt
  - IDC -> IDC / Phasing
- WorkbookView accepts optional onNavigate prop
- Scenario page passes onNavigate to switch active sheet
2026-05-22 17:57:32 +05:30
Manohar Gupta
5098bf86f4 Fix Total Project Cost calculation: include upfront lease cost
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Added upfrontLeaseCostCr to totalCostCr calculation
- IDC and upfront fee now calculated on full project cost including lease
- Updated Land & Common card to show lease cost is included in total
2026-05-22 16:57:29 +05:30
Manohar Gupta
f224e98e0a Fix solver values to display as percentage not decimal
- Added pct() helper function
- Target Equity IRR now shows 18% instead of 0.18
- Input accepts percentage and converts back to decimal internally
2026-05-22 16:53:51 +05:30
Manohar Gupta
35cfc409e2 Fix input sheet defaults: Lease Rate 0.40, Upfront Fee 0.75%*1.18
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Changed Lease Rate default from 30 to 0.4 Lakh/acre/year
- Changed Upfront Fee default from 1% to 0.75%*1.18 (=0.885%)
- Updated upfront lease cost calculation to use new default
2026-05-22 15:16:02 +05:30
Manohar Gupta
206b9a0f99 Fix: DC capacity now updates when AC capacity changes
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-22 13:39:09 +05:30
Manohar Gupta
941843e441 Fix solar wizard: reorder AC/DC fields, add DC:AC ratio, auto-calc DC capacity
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Moved AC Capacity above DC Capacity
- Added DC:AC Ratio input field (editable, default 1.4)
- Made DC Capacity auto-calculated (read-only) based on AC * ratio
- Updated buildInputs() to include dc_ac_ratio
- Maintains same data flow as InputsTab.tsx
2026-05-22 13:22:18 +05:30
e286f930f1 fix: add all columns to month/day/hour views for consistent display
Some checks failed
CI / Engine — lint / typecheck / test (push) Has been cancelled
CI / API — lint / typecheck / test (push) Has been cancelled
CI / Web — typecheck / lint / build (push) Has been cancelled
- Hour: raw profile %, DC MW, output MW
- Day: average profile %, DC MW, sum MWh
- Month: average profile %, DC MW, sum MWh

All levels now show: Solar 8760, DC MW, Solar MW, Wind, Total RE, Client End, Load

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 15:59:43 +05:30
fdb387e74c feat: pass solar DC MW and wind capacity from inputs to generation sheet
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Add solarDCMW and windMW props
- Pull from inputs_json in scenario page
- DC MW column now shows actual capacity from input

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 15:02:43 +05:30
2705f4bb11 feat: compute Solar 8760 averages at year/month/day levels
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Add helper functions for raw profile averages
- Solar 8760 shows average profile % at each level
- Month/day levels use daily/hourly averages

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 14:37:34 +05:30
ff446bc34a feat: add raw profile data for Solar 8760 column
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Add load_wind_profile_25y to loader.py
- Store raw profile (0-1 normalized) in hourly_solar_profile
- Solar 8760 shows raw profile values from CSV file
- Compute averages at day/month/year levels from profile

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 14:36:25 +05:30
dba1e6990f feat: add profile data columns to generation sheet for detailed breakdown
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Add hourly_solar_profile and hourly_wind_profile to store per-hour output values
- Add solar_dc_mwp, solar_ac_mw, wind_mw to PipelineResult for capacity display
- Add columns: Solar 8760, DC MW, Solar MW / Wind 8760, MW, Wind MW
- Updated UI to show detailed breakdown at each level (Year/Month/Day/Hour)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 13:31:20 +05:30
cc042e0417 fix: make P&L use hourly-derived totals as source of truth
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Compute ppa_units_by_year using same loss_factor as hourly client_end
- Hourly and P&L now match exactly
- Generation sheet shows display values (may differ slightly due to rounding)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 13:18:38 +05:30
34a4cf7abd fix: use rtc_mw as fallback for client_load when ppa_capacity is not set
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Fallback order: client_load_mw -> ppa_capacity_mw -> rtc_mw

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 13:12:30 +05:30
48fe2129bf fix: include aux consumption in hourly client_end loss calculation
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Also includes aux consumption in loss_factor alongside transmission and DSM

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 13:11:41 +05:30
38797736a4 fix: correct hourly index calculation for 25-year data
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Reset index per year caused out-of-bounds error
- Simplified loop using sequential hour_idx 0-8759 per year

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 12:56:31 +05:30
5e49926289 feat: add hourly timeseries infrastructure with Total RE, Client End, Load columns
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Add client_load_mw to CommercialConfig (defaults to ppa_capacity_mw)
- Add hourly_timestamps, hourly_fy, hourly_proj_year, hourly_total_re,
  hourly_client_end, hourly_load to ScenarioResult
- Generate 25-year hourly data in runner.py with proper timestamps
- Update API worker to return new hourly fields
- Update WorkbookView HourlyGenerationSheet to show all 5 columns
  at each expandable level (Year > Month > Day > Hour)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 12:52:44 +05:30
27866e86f0 fix: month order - Apr first at top, then subsequent months
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-16 12:07:19 +05:30
96ddb2fa60 feat: fix month labels and reverse order, vertical hourly display
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Show Apr 27 instead of Apr - include FY suffix
- Reverse month order: Apr first, then May... Mar
- Change hourly from horizontal wrap to vertical stack
2026-05-16 12:00:59 +05:30
7062688397 feat: use FY labels in generation sheet based on COD date
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Show FY 2026-27 instead of Y1 based on cod_year
- Show month names (Apr, May, etc.) instead of M1, M2
- Show actual dates (Apr 1, etc.) instead of D1, D2
- Pass codYear from scenario inputs to WorkbookView
2026-05-16 11:51:56 +05:30
0ada193bb0 feat: support %_generation column in solar profile CSV
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Add column %_generation (percentage, 0-100%) to solar profile CSV
- Update loader to read %_generation and convert to normalized fraction
- Fallback to old E_Grid_Kwp format for backwards compatibility
2026-05-16 11:44:29 +05:30
59da8280dc fix: return solar_hourly and wind_hourly from run_scenario
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
These fields were computed but not being returned in the ScenarioResult.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 11:36:49 +05:30
70dfe9b3ce feat: use user's hourly solar profile with 25-year leap year expansion
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Add load_solar_profile_25y() that expands 8760-hour profile to 25 years
- Handle leap years by inserting Feb 29 hours
- Support both normalized and absolute (kWp) input formats
- Normalize absolute values to [0,1] range before processing

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 11:18:52 +05:30
093e62b011 feat: add 25-year hourly generation data with expandable drill-down
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
- Engine: generate all 25 years × 8760 hours of hourly generation
- Schema: add solar_hourly and wind_hourly fields to ScenarioResult
- API: expose hourly data in statements endpoint
- UI: new HourlyGenerationSheet with Year → Month → Day → Hour drill-down
- Add TYPEOF for hourly generation in web API types

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 10:41:25 +05:30
dda868d404 fix: NEXT_PUBLIC_API_URL must be origin only — /api already in app routes
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-16 04:24:42 +00:00
38108f62eb fix: traefik.docker.network label must use actual network name not compose alias
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-15 05:36:29 +00:00
e0792a9f96 fix: add build.args for NEXT_PUBLIC_API_URL to web service (required for Next.js compile-time inlining)
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-15 05:15:26 +00:00
ef3f2ace25 fix: pass NEXT_PUBLIC_API_URL as Docker build ARG so Next.js bakes it into bundle
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-15 05:15:25 +00:00
e097b5f17b fix: sqlite DATABASE_URL absolute path (/// → ////) to match container CWD
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-15 04:58:29 +00:00
3dc757a250 Fix: use absolute path /app/data/remodel.db
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
2026-05-15 09:55:42 +05:30