Repository navigation
Conversation
Fixes OpenSignLabs#1256 Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
|
@alfonsodg is attempting to deploy a commit to the prafull 's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
🟡 Changes recommended
Startup storage and upload-accounting requests still use build-time IDs, leaving frontend requests inconsistent when a runtime override is set.
2 open issues
What changed in this PR
This PR adds runtime application-ID configuration to the frontend so deployments can change the ID without rebuilding the image, while retaining build-time fallbacks.
Changes:
- Include
REACT_APP_APPIDin the generated runtime environment. - Prefer the runtime ID in shared application metadata and Parse SDK initialization.
| File | Description |
|---|---|
| apps/OpenSign/src/index.jsx | Prefer the runtime application ID when initializing Parse. |
| apps/OpenSign/src/constant/appinfo.js | Add runtime lookup to the shared application ID. |
| apps/OpenSign/entrypoint.sh | Export the application ID into the runtime environment. |
Review effort: Balanced
| export const appInfo = { | ||
| applogo: typeof defaultLogo !== "undefined" ? defaultLogo : logo, | ||
| appId: process.env.REACT_APP_APPID ? process.env.REACT_APP_APPID : "opensign", | ||
| appId: getEnv()?.REACT_APP_APPID || process.env.REACT_APP_APPID || "opensign", |
|
|
||
| const appId = | ||
| import.meta.env.VITE_APPID || process.env.REACT_APP_APPID || "opensign"; | ||
| getEnv()?.REACT_APP_APPID || |
3 tasks
This branch has not been deployed
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.

Problem
The application id was read only from the build-time environment, and the
runtime
env.jsdid not include it. ChangingAPP_IDon the server thereforeleft the frontend pointing at the old id, and Parse rejected the requests.
Affected files
apps/OpenSign/entrypoint.shapps/OpenSign/src/constant/appinfo.jsapps/OpenSign/src/index.jsxFix
REACT_APP_APPIDis part of the runtime environment, and the frontend readsit through the same runtime lookup it already uses for the server URL, with
the build-time value kept as a fallback.
Acceptance criteria