Repository navigation
Conversation
`dev --remote` took the frontend's backend URL from the published-URL lookup, which answers only for live apps, so on an app that was never published it failed with "Error fetching site URL: App not found" before starting. The fallback `exec` got in #693 moves to core/project/app-base-url.ts and `dev --remote` uses it too: a 404 from the lookup resolves to https://preview--{appId}.base44.app, any other error still fails the command. The helper lives in its own module and is not re-exported from the project index: base44-client imports that index, so re-exporting it there made an import cycle that loaded the helper before the exec unit test's mock of the project API applied. Task: https://b44sync.base44.app/rd-hub/tasks/BASE-85377 File: https://github.com/base44-dev/suss-tasks/blob/f43f67162bbbe2f43c461f10b31b2bbf13d3bc17/cli/exec_unpublished_app_not_found%F0%9F%9A%AA/dev_remote_unpublished_app.md gate: tests/cli/dev.spec.ts, tests/core/exec-run-script.spec.ts agent: exec.unpublished
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.3.1-pr.695.503ca43Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.3.1-pr.695.503ca43"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.3.1-pr.695.503ca43"
}
}
Preview published to npm registry — try new features instantly! |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Description
base44 dev --remotepreviously failed outright when the linked app had never been published, because it resolved the frontend target viagetSiteUrl()and let the 404 propagate. This PR makes--remotefall back to the app's preview URL (https://preview--<appId>.base44.app), matching the behaviorbase44 execalready has. The preview-URL fallback that lived insidecore/exec/run-script.tsis extracted into a sharedcore/project/app-base-url.tshelper so both commands use one implementation.Related Issue
None
Type of Change
Changes Made
packages/cli/src/core/project/app-base-url.tsexportingresolveAppBaseUrl(appId): returnsgetSiteUrl(), falling back tohttps://preview--<appId>.base44.appon a 404ApiError, and rethrowing anything else.core/exec/run-script.tsnow imports that helper instead of defining its own localresolveAppBaseUrl/appPreviewUrl(no behavior change forbase44 exec).cli/commands/dev.tsremoteDevActionresolvesappBaseUrlthroughresolveAppBaseUrl(app.id)instead of callinggetSiteUrl()directly, so--remoteserves an unpublished app rather than erroring.--remote fails when the app has no published URLcase with one asserting the serve command receivesURL=https://preview--<appId>.base44.appon a 404, and added a new case asserting non-404 site-URL failures (500) still fail the command.base44 dev --remoteupdated to describe the preview-URL fallback instead of the previous failure.Testing
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
This builds on
fix/exec-unpublished-app(the equivalent fix forbase44 exec) and should be merged after it. The error surface narrows only for the 404 case — all othergetSiteUrl()failures still propagate, which the new 500 test covers. Test execution was not run in this environment (build step unavailable), so the "tested locally" and "all tests pass" boxes are left unchecked.🤖 Generated by Claude | 2026-11-04 18:56 UTC | 503ca43
CI note: the lint, typecheck, knip, functions-compiler and test workflows trigger only on PRs targeting
main, so they do not run while this is stacked on #693. All of them pass locally onb9be961(bun run lint,typecheck,knip,build, andtest tests/cli/dev.spec.ts tests/core/exec-run-script.spec.ts: 31 tests). Retargeting tomainafter #693 merges will run them.