Skip to content

fix(infra): read the application id from the runtime environment (#1256) - #2303

Open
alfonsodg wants to merge 1 commit into
OpenSignLabs:stagingfrom
alfonsodg:pr/1256-app-id
Open

alfonsodg wants to merge 1 commit into
OpenSignLabs:stagingfrom
alfonsodg:pr/1256-app-id

Conversation

@alfonsodg

Copy link
Copy Markdown

Problem

The application id was read only from the build-time environment, and the
runtime env.js did not include it. Changing APP_ID on the server therefore
left the frontend pointing at the old id, and Parse rejected the requests.

Affected files

  • apps/OpenSign/entrypoint.sh
  • apps/OpenSign/src/constant/appinfo.js
  • apps/OpenSign/src/index.jsx

Fix

REACT_APP_APPID is part of the runtime environment, and the frontend reads
it through the same runtime lookup it already uses for the server URL, with
the build-time value kept as a fallback.

Acceptance criteria

  • The frontend and the backend use the same application id at runtime
  • The build-time value is still honoured when no runtime value is set

Fixes OpenSignLabs#1256

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 22:35
@vercel

vercel Bot commented Oct 21, 2026

Copy link
Copy Markdown

@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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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_APPID in 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 ||

This branch has not been deployed

No deployments
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