-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(ff): add back condition for isHosted FF #2789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR fixes a critical regression that broke self-hosted deployments by restoring the conditional Key Changes:
Impact: Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant App as Application
participant FF as feature-flags.ts
participant Env as env.ts
participant Config as Environment Config
Note over App,Config: Feature Flag Check Flow
App->>FF: Check isHosted flag
FF->>Env: getEnv('NEXT_PUBLIC_APP_URL')
Env->>Config: Retrieve NEXT_PUBLIC_APP_URL
Config-->>Env: Return URL value
Env-->>FF: Return URL string
alt URL is https://www.sim.ai
FF-->>App: isHosted = true
else URL is https://www.staging.sim.ai
FF-->>App: isHosted = true
else URL is other (self-hosted)
FF-->>App: isHosted = false
end
Note over App,FF: URL Construction Flow
App->>FF: Need base URL for deployment
FF->>Env: getBaseUrl()
Env->>Config: Retrieve NEXT_PUBLIC_APP_URL
Config-->>Env: Return URL
Env-->>FF: Validated base URL
FF-->>App: Construct endpoint URLs
Note over App: Deploy modal, chat, and form<br/>now use consistent getBaseUrl()<br/>instead of direct getEnv() calls
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No files reviewed, no comments
* fix(ff): add back condition for isHosted FF * updated callers to use getBaseUrl()
Summary
Type of Change
Testing
Tested manually
Checklist