Skip to content

fix(dev): reload the API only for changes under api/ (#118) - #127

Merged
amar-python merged 1 commit into
mainfrom
fix/118-reload-dir
Oct 27, 2026
Merged

amar-python merged 1 commit into
mainfrom
fix/118-reload-dir

Conversation

@amar-python

Copy link
Copy Markdown
Owner

Fixes #118, using option B as decided by the product owner on 27 Oct 2026: remove the likely cause of the silent stop rather than reproduce it.

What changes

  • scripts/start-api.ps1 and the QUICKSTART command now run uvicorn … --reload --reload-dir api.
  • Before, the reloader watched the whole repo. The repo is in a OneDrive folder, so a sync of any file (docs, CSVs, dist/) could trigger a restart. That restart is the likely cause of the 27 Oct stop.
  • Code changes under api/ still reload as before.

Checks

I ran uvicorn here with the new flags (port 8011):

  • It logged Will watch for changes in these directories: ['…/api'].
  • Appending to docs/QUICKSTART.md: 0 reloads.
  • Appending to api/__init__.py: 1 reload. Both files were then restored.

start-api.ps1 parses with 0 errors (pwsh) and stays ASCII-only.

Not proven

The 27 Oct stop wasn't reproduced. This removes its most likely cause but doesn't prove it was the cause. #118 is closed on that basis, by the product owner's decision. If the API stops by itself again, reopen #118.

Done when

  • This PR is merged with CI green.
  • On the dev machine, after a restart, the API window shows Will watch for changes in these directories: [...\api].

Generated by Claude Code

uvicorn --reload watched the whole repo, which sits in a OneDrive
folder, so a sync anywhere could restart or stop the API. Watch api/
only, in start-api.ps1 and the QUICKSTART command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019YPoXzBSj89ZHgw7nfTmbB
@amar-python
amar-python merged commit 4635328 into main Oct 27, 2026
3 checks passed
@amar-python
amar-python deleted the fix/118-reload-dir branch October 27, 2026 10:36
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.

Frontend shows 'Failed to fetch' when the API is down; the local API stopped silently once

2 participants