Skip to content

Fix saved location and add frontend CI - #80

Open
tharunreddy08 wants to merge 2 commits into
Janani-bn:mainfrom
tharunreddy08:fix-41-58
Open

tharunreddy08 wants to merge 2 commits into
Janani-bn:mainfrom
tharunreddy08:fix-41-58

Conversation

@tharunreddy08

Copy link
Copy Markdown

Description

This pull request fixes issues #41 and #58 in CivicFix.

Fixes #41 — Saved location ignored when latitude or longitude is 0

Updated the saved-location coordinate validation in NearbyComplaints.jsx to correctly handle valid 0 latitude or longitude values instead of treating them as missing.

Fixes #58 — Run frontend lint and build on pull requests

Added a GitHub Actions workflow at .github/workflows/frontend-ci.yml to automatically run frontend checks when a pull request targets the main branch.

The workflow runs:

  • npm ci
  • npm run lint
  • npm run build

Validation

Verified the frontend using:

npm run lint
npm run build

Copilot AI lite review requested due to automatic review settings September 28, 2026 13:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Coordinate validation still accepts certain malformed non-numeric values.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Fixes saved-location handling for zero-valued coordinates and adds frontend lint/build CI checks.

Changes:

  • Updates coordinate validation to accept valid 0 values.
  • Adds separate frontend lint and build jobs.
File Description
src/​components/​NearbyComplaints.jsx Validates saved coordinates, including zero values.
.github/​workflows/​frontend-ci.yml Runs frontend lint and build checks.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/components/NearbyComplaints.jsx Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Janani-bn

Copy link
Copy Markdown
Owner

The updated coordinate check now covers #41, including 0 and invalid values. The CI side of #58 still needs work: root npm run lint fails with 125 existing errors, so the new lint job would fail. Please make that check pass or narrow its scope clearly, and reconcile the overlap with #67 and #68.

@Janani-bn

Copy link
Copy Markdown
Owner

@tharunreddy08 The coordinate fix now meets #41, but the new lint job still fails on the current code (125 errors), so #58 cannot give a passing CI check on a clean PR. Please make that job pass or narrow its scope clearly. This also overlaps #67, #68 and the newer #87, so please reconcile the duplicate changes before PR

@Janani-bn

Copy link
Copy Markdown
Owner

This mixes two changes - the saved-location fix and frontend CI. Please split them into separate PRs so each can be reviewed on its own; the CI part also overlaps with #68.

@Janani-bn

Copy link
Copy Markdown
Owner

Not ready to merge: this head conflicts with current main (b7ce27b) in src/components/NearbyComplaints.jsx. Please rebase or merge current main and resolve the conflicts. After the rebase, the issue requirements, prior review requests and current-head CI must be rechecked; resolving the conflict alone is not merge approval.

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.

Run frontend lint and build on pull requests Saved location is ignored when latitude or longitude is 0

3 participants