Conversation
…kend dependencies
…nd initial frontend components with Docker setup.
There was a problem hiding this comment.
Pull request overview
This PR addresses frontend fixes and cleanup tasks, including code style standardization, team information updates, copyright header corrections, and infrastructure improvements. The changes span TypeScript configuration files, React components, nginx configuration, backend dependencies, SUMO simulation files, and Docker configuration.
Key Changes:
- Standardized string literals to single quotes across React components
- Updated team member information with full names and simplified role descriptions
- Changed documentation URL from localhost to GitHub Pages (https://sonmessia.github.io/GreenWave/)
- Removed invalid copyright headers from configuration files (tsconfig, requirements.txt, pyproject.toml, nginx.conf)
- Added .dockerignore for frontend optimization
- Removed docs service from docker-compose (documentation now hosted on GitHub Pages)
Reviewed changes
Copilot reviewed 73 out of 73 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frontend/tsconfig.node.json | Removed invalid copyright header from JSON config file |
| src/frontend/tsconfig.json | Removed invalid copyright header from JSON config file |
| src/frontend/tsconfig.app.json | Removed invalid copyright header from JSON config file |
| src/frontend/src/presentation/i18n/locales/vi.json | Simplified team role descriptions in Vietnamese translation |
| src/frontend/src/presentation/i18n/locales/en.json | Simplified team role descriptions in English translation |
| src/frontend/src/presentation/components/feature/landing/TeamSection.tsx | Updated team member full names and converted to single quotes |
| src/frontend/src/presentation/components/feature/landing/HeroSection.tsx | Converted to single quotes and updated documentation URL to GitHub Pages |
| src/frontend/src/presentation/components/feature/devices/DeviceWizard.tsx | Attempted to simplify ipAddress handling (potential bug introduced) |
| src/frontend/nginx.conf | Removed invalid copyright header and added cache control for SPA routing |
| src/frontend/.dockerignore | Added new dockerignore file with common exclusions |
| src/backend/requirements.txt | Removed invalid copyright header from pip requirements file |
| src/backend/requirements-dev.txt | Removed invalid copyright header from dev requirements file |
| src/backend/pyproject.toml | Removed invalid copyright header from TOML config file |
| src/backend/app/sumo_rl/sumo_files/*.xml | Removed copyright headers from SUMO XML files and updated generated timestamps |
| src/backend/app/sumo_rl/sumo_files/Nga4ThuDuc/e1i_2.xml | Updated generated XML file (contains critical parsing error) |
| src/backend/app/sumo_rl/sumo_files/NguyenThaiSon/e1i_0.xml | Added test/example data to generated output file |
| src/backend/app/api/routers/sumo_control_router.py.backup | Removed invalid copyright header from backup file |
| src/backend/MIGRATION_SUMMARY.md | Deleted migration documentation file (cleanup) |
| docker-compose.yaml | Removed docs service container (documentation moved to GitHub Pages) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <input | ||
| type="text" | ||
| value={deviceData.httpConfig?.ipAddress || ""} | ||
| value={deviceData.httpConfig?.ipAddress} |
There was a problem hiding this comment.
The removal of the fallback || "" could cause a controlled/uncontrolled component warning in React. If deviceData.httpConfig?.ipAddress is undefined, the input will be uncontrolled initially. Consider keeping the fallback to ensure the input is always controlled:
value={deviceData.httpConfig?.ipAddress || ""}| try_files $uri $uri/ /index.html; | ||
| add_header Cache-Control "no-store, no-cache, must-revalidate"; |
There was a problem hiding this comment.
Adding Cache-Control: no-store, no-cache, must-revalidate to the SPA root location conflicts with the static assets caching below. The root location should handle HTML files differently from static assets. Consider being more specific:
location / {
try_files $uri $uri/ /index.html;
}
# Don't cache HTML files
location ~* \.html$ {
add_header Cache-Control "no-store, no-cache, must-revalidate";
}This way, the SPA's index.html won't be cached, but other files can still benefit from the static assets caching rules.
| @@ -1,40 +1,40 @@ | |||
| // Copyright (c) 2025 Green Wave Team | |||
| // | |||
| // | |||
There was a problem hiding this comment.
The copyright header format is inconsistent with the rest of the codebase. Line 2 should have a trailing space: // instead of //. Most other files in the codebase follow the format with a trailing space on line 2.
| @@ -1,33 +1,33 @@ | |||
| // Copyright (c) 2025 Green Wave Team | |||
| // | |||
| // | |||
There was a problem hiding this comment.
The copyright header format is inconsistent with the rest of the codebase. Line 2 should have a trailing space: // instead of //. Most other files in the codebase follow the format with a trailing space on line 2.
| <instantOut id="e1i_2" time="292.00" state="stay" vehID="152" speed="0.00" length="5.00" type="car"/> | ||
| <instantOut id="e1i_2" time="293.00" state="stay" vehID="152" speed="0.00" length="5.00" type="car"/> | ||
| <instantOut id="e1i_2" time="294.00" state="stay" No newline at end of file | ||
| <instantOut id="e1i_2 No newline at end of file |
There was a problem hiding this comment.
This XML closing tag appears to be incomplete. The line ends with <instantOut id="e1i_2 but is missing the rest of the tag and its attributes. This will cause XML parsing errors. The complete closing tag should be </instantE1> on its own line.
| <instantOut id="e1i_2 | |
| </instantE1> |
| <instantOut id="e1i_0" time="9.34" state="enter" vehID="1" speed="9.91" length="5.00" type="DEFAULT_VEHTYPE"/> | ||
| <instantOut id="e1i_0" time="9.84" state="leave" vehID="1" speed="9.91" length="5.00" type="DEFAULT_VEHTYPE" occupancy="0.50"/> |
There was a problem hiding this comment.
New data has been added to this generated SUMO output file (lines 20-21). If this is test/example data meant to be version controlled, ensure it's intentional. Typically, SUMO-generated output files are not committed to version control unless they serve as test fixtures or examples.
Fix frontend
Types of changes
🐛 Bug fix (non-breaking change which fixes an issue)
✨ Feature (non-breaking change which adds functionality)
💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
📝 Docs (documentation only changes)
♻️ Refactor (code improvement without changing functionality)
Checklist
Docker build successful (src/backend)
All tests passing (pytest)
Code follows project standards (Black, Ruff, MyPy)
Service boundaries maintained
.env.example updated (if environment variables changed)
No debug print statements left