Skip to content

Fix/docs#51

Merged
sonmessia merged 3 commits intomainfrom
fix/docs
Dec 7, 2025
Merged

Fix/docs#51
sonmessia merged 3 commits intomainfrom
fix/docs

Conversation

@HuynhTri-dev
Copy link
Copy Markdown
Collaborator

@HuynhTri-dev HuynhTri-dev commented Dec 7, 2025

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

Copy link
Copy Markdown
Contributor

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 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}
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

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 || ""}

Copilot uses AI. Check for mistakes.
Comment on lines 15 to +16
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-store, no-cache, must-revalidate";
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@@ -1,40 +1,40 @@
// Copyright (c) 2025 Green Wave Team
//
//
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@@ -1,33 +1,33 @@
// Copyright (c) 2025 Green Wave Team
//
//
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
<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
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
<instantOut id="e1i_2
</instantE1>

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +21
<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"/>
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@sonmessia sonmessia merged commit a91e284 into main Dec 7, 2025
7 of 8 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.

3 participants