Skip to content

Establish baseline: fix ESLint violations and Docker Compose nginx DNS#49

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/verify-baseline-tests-builds
Closed

Establish baseline: fix ESLint violations and Docker Compose nginx DNS#49
Copilot wants to merge 3 commits intomainfrom
copilot/verify-baseline-tests-builds

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 27, 2026

Baseline verification revealed 6 ESLint violations in React components and nginx failing to start in Docker Compose due to DNS resolution timing.

ESLint Fixes

react-hooks/set-state-in-effect violations - Refactored synchronous setState calls in effects:

  • AssessmentReport.tsx: Moved derived state to useMemo, wrapped API calls in async function with cancellation
  • ProjectDetail.tsx: Extracted async load function to avoid synchronous setState in effect body

react-hooks/rules-of-hooks violations - Moved hook calls outside conditional blocks:

  • Layout.tsx & MigrationExecution.tsx: Called useMsal() unconditionally, then wrapped usage in try-catch

react-refresh/only-export-components violation - Split ThemeContext.tsx:

  • Extracted context definition to createThemeContext.ts
  • Extracted hook to useTheme.ts
  • Provider component remains in ThemeContext.tsx for Fast Refresh compatibility

Docker Compose Fix

nginx was failing with "host not found in upstream 'api'" because Docker's embedded DNS (127.0.0.11) isn't available at nginx startup. Fixed by forcing runtime DNS resolution:

resolver 127.0.0.11 valid=30s;
set $upstream_api api:8080;

location /api/ {
    proxy_pass http://$upstream_api;
    # ...
}

All services (db, api, web) now start successfully.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 127.0.0.11
    • Triggering command: REDACTED, pid is -1 (packet block)

If you need me to access, download, or install something from one of these locations, you can either:


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI linked an issue Mar 27, 2026 that may be closed by this pull request
4 tasks
@JoshLuedeman JoshLuedeman added the area/ci CI/CD and DevOps label Mar 27, 2026
Copilot AI and others added 2 commits March 27, 2026 20:47
Agent-Logs-Url: https://github.com/JoshLuedeman/scaffold/sessions/edb811a1-93c6-4d1a-89f8-e75d75efbcd2

Co-authored-by: JoshLuedeman <6021644+JoshLuedeman@users.noreply.github.com>
Agent-Logs-Url: https://github.com/JoshLuedeman/scaffold/sessions/edb811a1-93c6-4d1a-89f8-e75d75efbcd2

Co-authored-by: JoshLuedeman <6021644+JoshLuedeman@users.noreply.github.com>
Copilot AI changed the title [WIP] Verify baseline tests and builds Establish baseline: fix ESLint violations and Docker Compose nginx DNS Mar 27, 2026
Copilot AI requested a review from JoshLuedeman March 27, 2026 20:52
@JoshLuedeman
Copy link
Copy Markdown
Owner

Closing to start fresh — will re-approach Phase 0 issues from a clean slate.

@JoshLuedeman JoshLuedeman deleted the copilot/verify-baseline-tests-builds branch April 16, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci CI/CD and DevOps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verify baseline tests & builds

2 participants