Skip to content

fix: prefer local repo build over stale cached frontend#43

Open
Selene29 wants to merge 1 commit intorepowise-dev:mainfrom
Selene29:fix/prefer-local-web-build
Open

fix: prefer local repo build over stale cached frontend#43
Selene29 wants to merge 1 commit intorepowise-dev:mainfrom
Selene29:fix/prefer-local-web-build

Conversation

@Selene29
Copy link
Copy Markdown

@Selene29 Selene29 commented Apr 5, 2026

Summary

  • _start_frontend() checked the cached download (~/.repowise/web/) before the local repo build, so a stale cached version was always served even when a newer local build existed
  • Swaps the priority: local repo builds are now preferred, with the cached download as a fallback for pip-installed users

Test plan

  • Run repowise serve from a repo checkout that has a local .next/standalone build
  • Verify the local build is served (not the cached ~/.repowise/web/ version)
  • Verify pip-installed users without a local build still get the cached download

@RaghavChamadiya
Copy link
Copy Markdown
Collaborator

This is correct. The local build should always win over a potentially stale cache, and the old ordering was clearly backwards.

One quick confirmation: is there any scenario where a pip-installed user has a local .next/standalone build on their machine? If not, this is purely a developer-mode fix with zero impact on pip users, and the cached fallback still works for them as before. Just want to confirm before merging.

@Selene29
Copy link
Copy Markdown
Author

Selene29 commented Apr 6, 2026

Correct. No impact on pip users. _find_local_web() walks up from file (which resolves to site-packages/ for pip installs) and cwd, looking for packages/web/package.json. Neither path will match unless you're in the repo checkout itself. So for pip users, _find_local_web() returns None and the cached download fallback works exactly as before. This only affects editable installs / running from source. That is at least my understanding :)

_start_frontend() checked the cached download (~/.repowise/web/) before
the local repo build. When a stale cache existed, it always served that
version even though serve_command() had determined the local build was
the correct one to use. Swap the priority so local builds are preferred,
with the cached download as a fallback for pip-installed users.
@Selene29 Selene29 force-pushed the fix/prefer-local-web-build branch from bae21d2 to 50def7e Compare April 6, 2026 11:01
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.

2 participants