Skip to content

Develop#301

Merged
tvup merged 46 commits intomasterfrom
develop
Mar 28, 2026
Merged

Develop#301
tvup merged 46 commits intomasterfrom
develop

Conversation

@tvup
Copy link
Copy Markdown
Owner

@tvup tvup commented Mar 28, 2026

No description provided.

tvup and others added 30 commits March 25, 2026 16:32
…integration

- Add Quarter resolution support to ElOverblik API with fallback chain (Quarter → Actual → Hour)
- Handle mixed resolution: average 4 quarter spot prices for hourly consumption (Danish industry standard)
- Update ProcessController/ElController for dynamic spot price resolution detection
- Auto-fill Smart-Me credentials from user profile in forms
- Move Smart-Me credentials from .env/config to user profile (database)
- Extract seeder credentials to untracked user_credentials.json
- Dynamic grid operator list from datahub_price_lists instead of hardcoded
- Consolidate lang directories (merge lang/ into resources/lang/, delete lang/)
- Fix paasword typo in config/services and all references
- Fix WOH! debug statement in vendor ElOverblikApiBase
- Add API access logging to Api\ElController
- Regenerate test fixtures with real 15-min API data (2025-10-01)
- Remember price area selection via cookie on /el page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… refresh token changes

The ElOverblik API instance was cached on the service object and reused
even when a different user's refresh token was passed, causing the wrong
token to be sent to the ElOverblik API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…database only

CalculateUpcommingInvoice no longer falls back to config('services.energioverblik.refresh_token').
Removed energioverblik config block entirely. Refresh tokens are now exclusively
stored per-user in the database, preventing stale env tokens from being used.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…eys in API ElController

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…for charges lookup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… expired entries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ults

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…okup

DATAHUB getCharges API returns tariff names that may not match
DatahubPriceList Note values (e.g. "Nettarif C" vs "Nettarif C time").
Since DATAHUB tariffs already include prices, use them directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… today

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When tariffs have 96 prices (PT15M resolution), index by
hour*4 + quarter instead of just hour.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixes el-charges page which calls getCharges without date parameters.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use old('_token') to detect form submission, so an unchecked checkbox
stays unchecked instead of reverting to Cookie/user defaults.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…HUB prices

DATAHUB getCharges API returns stale prices from when tariffs were created.
DatahubPriceList has authoritative, current prices. Now tries exact match
first, then GLN + name LIKE fallback (e.g. "Nettarif C" matches
"Nettarif C time"), and only uses inline prices as last resort.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Moving round() out of the per-interval loop eliminates systematic
rounding bias, especially for small per-kWh prices like Elafgift
(0.008) where each 15-min interval rounded up from 0.007 to 0.01.

Also removes temporary debug logging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add searchable select component for grid operator and minor cleanups

Replace plain HTML select with a searchable dropdown for grid operator
selection in totalprices form. Add English language file and bump revision.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* no dont

* no dont

* Fix XSS vulnerability, add i18n support, and bump revision

- Replace addslashes() with @js() directive to prevent XSS in searchable-select
- Wrap hardcoded Danish strings in __() for i18n (placeholder and no-results)
- Add 'Type to search...' and 'No results' keys to lang/php_en.json
- Add trailing newline to lang/php_en.json

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix review findings: Enter key, DOMContentLoaded, i18n, uid collision

- Fix Enter key blocking form submit when dropdown is closed
- Replace setTimeout(500) with DOMContentLoaded for reliable init
- Use Str::random() in uid to prevent collisions with same-name instances
- Add Danish translations for searchable-select strings to da.json
- Remove redundant lang/php_en.json (resources/lang/en/ already covers it)
- Ignore root /lang/ directory in .gitignore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Improve accessibility, explicit Str import, and label toString guard

- Add ARIA combobox pattern: role=combobox, aria-expanded, aria-controls, role=listbox
- Use explicit \Illuminate\Support\Str::random() instead of facade shorthand
- Guard option.label with String() to handle non-string values
- Centralize show/hide list into showList()/hideList() for consistent aria-expanded state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shows a Bootstrap spinner, disables the button, and changes text to
"Processing..." on form submit to prevent double-clicks and give
visual feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tvup and others added 16 commits March 28, 2026 11:37
Tests were failing in CI with "no such table: users" because ParaTest
creates isolated in-memory SQLite databases per worker process, and
without RefreshDatabase the migrations never run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The test directly instantiates MeteringPointController whose constructor
calls auth('api')->check(), triggering Passport key loading. Generate
keys on first run so the guard can resolve without errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add explicit nullable types (?Type) for PHP 8.4 compatibility (12 files)
- Fix Model relationship PHPDoc generics with static type
- Fix round() and json_decode type safety issues
- Fix unreachable else branch in GetSpotPrices
- Fix PHPDoc @var types in GetSmartMeMeterDataTest
- Fix GetDatahubPriceLists return type annotation
- Add PHPStan ignore for Eloquent HasMany covariance (known Larastan issue)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updates paratest, lcobucci/jwt, passport and dependencies to versions
that support PHP 8.5.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
The ^7.5.7 constraint resolved to v7.19.2 on CI which requires
phpunit/php-code-coverage ^12, conflicting with phpunit 11. The 7.8.x
line supports both phpunit 11 and PHP 8.5.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- phpunit/phpunit: ^11.4 → ^13.0
- brianium/paratest: ~7.8.5 → ^7.19.2
- larastan/larastan: ^2.9 → ^3.0
- phpstan/phpstan-phpunit: ^1.4 → ^2.0
- phpstan/phpstan-mockery: ^1.1 → ^2.0
- Migrate @Depends annotation to PHP 8 attribute
- Fix all new PHPStan v2 / Larastan v3 strict errors
- Update phpunit.xml schema to 12.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep our PHPStan fixes (phpstan-ignore, Depends attribute, void return)
while accepting master's test data changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
PHPStan 2 correctly identifies that the array is already a list,
making array_values() a no-op.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add helpers.php to composer autoload files (lost during merge)
- Move parent::setUp() before fixture loading
- Update test to use DayAheadPrices endpoint and TimeDK/DayAheadPriceDKK
  column names matching the current GetSpotPrices implementation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tvup tvup merged commit 1dd432c into master Mar 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant