Skip to content

Conversation

@m4dm4rtig4n
Copy link
Contributor

No description provided.

Clément VALENTIN and others added 7 commits December 2, 2025 09:01
- Add horizontal scroll navigation with chevron buttons for AdminTabs
- Implement flex-1 layout for tabs to fill available width on large screens
- Add smooth scrolling and scroll state detection for small screens
- Ensure tab borders align with main content container
- Update all tab components (AdminTabs, ApiDocsTabs, ConsumptionTabs) for consistency

🤖 Generated with Claude Code

Co-Authored-By: Claude <[email protected]>
- Add horizontal scroll navigation with chevron buttons for AdminTabs
- Implement flex-1 layout for tabs to fill available width on large screens
- Add smooth scrolling and scroll state detection for small screens
- Ensure tab borders align with main content container
- Update all tab components (AdminTabs, ApiDocsTabs, ConsumptionTabs)

🤖 Generated with Claude Code

Co-authored-by: Clément VALENTIN <[email protected]>
Co-authored-by: Claude <[email protected]>
…g UI (#43)

Fixed NameError in /admin/stats endpoint caused by missing cache_service import.
Added proper loading state using LoadingOverlay component with blur effect.
Extended LoadingOverlay to support 'admin' data type with appropriate messages.

🤖 Generated with Claude Code

Co-authored-by: Clément VALENTIN <[email protected]>
Co-authored-by: Claude <[email protected]>
The previous package-lock.json was missing tree-sitter dependencies
([email protected] and [email protected]), causing `npm ci` to fail
during Docker builds with the error "package.json and package-lock.json
are not in sync".

This regenerates the lock file to include all required dependencies.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Clément VALENTIN <[email protected]>
Co-authored-by: Claude <[email protected]>
Add eye icon button to show/hide password in the login form for better UX.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
)

Add complete Kubernetes deployment automation via rancher-desktop with dev mode support (local volume mounts for hot-reload). Includes Helm chart modifications for dev volumes, readiness probes with Host header, Vite allowedHosts configuration, and environment variable loading from .env files. Integrates with Conductor for automatic project startup/shutdown.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Clément VALENTIN <[email protected]>
Co-authored-by: Claude <[email protected]>
Fix "offersData.filter is not a function" error by ensuring offersData
is an array before calling filter. Add validation checks and improve
error messages when offers fail to load.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Clément VALENTIN <[email protected]>
Co-authored-by: Claude <[email protected]>
Copilot AI review requested due to automatic review settings December 4, 2025 19:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive Kubernetes deployment capabilities for local development using rancher-desktop, with automatic deployment scripts and Helm charts configured for dev mode with hot-reload via local volume mounts.

Key changes:

  • New K8s deployment automation script with branch-based namespacing and dev/prod modes
  • Helm chart configuration for development with volume mounts for hot-reload
  • Frontend improvements: password visibility toggle, better error handling, improved tab layouts
  • Admin panel loading states and error handling

Reviewed changes

Copilot reviewed 15 out of 18 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
scripts/k8s-deploy.sh New bash script for automated K8s deployment with dev/prod modes and namespace management
helm/values-dev.yaml Development Helm values with lightweight resources and dummy secrets
helm/myelectricaldata/values.yaml Added devMode configuration for source code mounting
helm/myelectricaldata/templates/frontend/frontend-deployment.yaml Dev mode support with Vite hot-reload and volume mounts
helm/myelectricaldata/templates/backend/backend-deployment.yaml Dev mode with uv dependency management and source mounting
conductor.json Configuration for K8s auto-deploy with script commands
apps/web/src/pages/Simulator.tsx Improved array validation and error messages
apps/web/src/pages/Login.tsx Added password visibility toggle feature
apps/web/src/pages/Admin.tsx Added loading and error states
apps/web/src/components/LoadingOverlay.tsx Added admin data type support
apps/web/src/components/*Tabs.tsx Improved responsive tab layout with proper container alignment
Makefile Added K8s deployment convenience commands
Files not reviewed (1)
  • apps/web/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +337 to 343
if (offersArray.length === 0) {
throw new Error('Aucune offre disponible. Veuillez patienter le temps du chargement des offres.')
}

if (filteredOffers.length === 0) {
throw new Error('Aucune offre disponible pour la puissance souscrite de votre PDL')
throw new Error(`Aucune offre disponible pour la puissance souscrite de ${subscribedPower} kVA`)
}
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing validation for empty offersArray after filtering. If all offers are filtered out by the subscribed power check, but offersArray.length > 0 was true initially, the check on line 337-339 won't catch this case. The error on line 342 will be thrown, but the check order could be improved for clarity.

Copilot uses AI. Check for mistakes.
Comment on lines 47 to 63
# Disable pod security context for dev (may conflict with host mounts)
podSecurityContext: {}
securityContext: {}

frontend:
replicaCount: 1
resources:
limits:
cpu: 1000m
memory: 1536Mi # Increased for npm ci and vite dev server
requests:
cpu: 200m
memory: 512Mi

# Disable pod security context for dev
podSecurityContext: {}
securityContext: {}
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security concern with disabled pod security context. Lines 48-49 and 62-63 disable pod security contexts for development. While this may be necessary for hostPath mounts, it should be documented with a comment explaining why this is acceptable in dev but would need to be reconsidered for any production-like environments.

Copilot uses AI. Check for mistakes.
from ..middleware import require_admin, require_permission, get_current_user
from ..schemas import APIResponse
from ..services import rate_limiter
from ..services import rate_limiter, cache_service
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import. The cache_service import is added but there's no visible usage in the diff. If this import is not used elsewhere in the file, it should be removed to keep the code clean.

Suggested change
from ..services import rate_limiter, cache_service
from ..services import rate_limiter

Copilot uses AI. Check for mistakes.
postgres:
enabled: true
auth:
password: "devpassword123" # Simple password for local dev only
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded password in development configuration. While this is marked as "local dev only", it should still use an environment variable or a secret reference to avoid accidentally being committed or used in non-local environments. Consider using a placeholder value with documentation about setting it via environment variables.

Suggested change
password: "devpassword123" # Simple password for local dev only
password: "CHANGEME_SET_VIA_ENV" # Set via environment variable or Helm --set override; do not commit real passwords

Copilot uses AI. Check for mistakes.
"namespace": "auto",
"devMode": {
"enabled": true,
"hostPath": "/Users/cvalentin/Git/myelectricaldata_new",
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded absolute path in configuration file. The path /Users/cvalentin/Git/myelectricaldata_new is specific to one developer's machine and will not work for other team members. This should use a relative path or be documented as needing to be configured per developer.

Suggested change
"hostPath": "/Users/cvalentin/Git/myelectricaldata_new",
"hostPath": ".",

Copilot uses AI. Check for mistakes.
enabled: false
# Base path on the host machine where the project is located
# This path will be used to mount source code into containers
hostPath: "/path/to/myelectricaldata"
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Placeholder path in configuration. The path /path/to/myelectricaldata appears to be a placeholder that hasn't been updated. This will cause the Kubernetes deployment to fail if these values are used directly without override.

Suggested change
hostPath: "/path/to/myelectricaldata"
# Set this to the absolute path of your local myelectricaldata project directory when devMode is enabled.
hostPath: ""
# hostPath example: "/home/user/projects/myelectricaldata"

Copilot uses AI. Check for mistakes.
m4dm4rtig4n and others added 3 commits December 4, 2025 22:33
Fix date range handling to ensure consumption and production detail data from yesterday (J-1) is properly fetched. The batch endpoints now automatically extend date ranges when a single day is requested, ensuring minimum 2-day constraint for Enedis API calls.

Key changes:
- adjust_date_range() caps end_date to yesterday (J-1) instead of today
- Batch endpoints extend start backwards when start == end to guarantee 2-day range
- Updated API documentation with date constraints and automatic handling details

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Clément VALENTIN <[email protected]>
Co-authored-by: Claude <[email protected]>
Regenerated package-lock.json to resolve conflicts between develop and main branches.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Fixes npm ci build failure caused by missing tree-sitter dependencies.
Regenerated package-lock.json using npm install.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@m4dm4rtig4n m4dm4rtig4n merged commit d0e91ec into main Dec 4, 2025
5 checks passed
@m4dm4rtig4n m4dm4rtig4n deleted the develop branch December 14, 2025 00:05
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.

2 participants