Repository navigation
GitHub App sign-in for the Product Hunt launch, Free plan unlocks and Managed AI admin #137
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
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
cfe871d
Add "Continue with GitHub" onboarding with the LiveReview GitHub App
LinceMathew 27f3781
Fix security scan findings (govulncheck, OSV, semgrep)
LinceMathew d85d433
fix: docs
lovestaco 266b4ee
fix: env example
lovestaco 34f2cde
Open web reviews, git providers and members (up to 3) on the Free plan
lovestaco 10ebbc1
Fix Users table column widths after removing the git-lrc Access column
lovestaco 207dab8
Re-activate a deactivated member when they are invited again
lovestaco add42dd
Fix review findings in the GitHub App flow
lovestaco 75df949
Move the managed AI model off retired Gemini 2.5 (Vertex) to Gemini 3.x
lovestaco 2585a8c
Managed AI admin page and LiveReview model for launch-trial sign-ups
lovestaco e9afd07
Run every paid plan's reviews on the LiveReview AI Model when it's se…
lovestaco eb4ea60
Fix Managed AI table header (TableHead already renders the row)
lovestaco e07bc32
Stop browsers autofilling the Managed AI form with saved logins
lovestaco 744da58
Managed AI: test before saving, and suggest models from the catalog
lovestaco 13a0492
Use the AI Providers model picker on the Managed AI page
lovestaco 29496fe
Update Managed AI route doc for the shared model picker
lovestaco 4c21ab9
Bump mcp to 1.30.0 and Werkzeug to 3.1.9 (Dependabot)
lovestaco 6496aa3
Use a placeholder for GITHUB_APP_WEBHOOK_SECRET in .env.example
lovestaco 93b1101
Bump dompurify to 3.4.17 and ip-address to 10.7.4 (OSV)
lovestaco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| -- migrate:up | ||
| -- One GitHub App installation can belong to exactly one LiveReview org. | ||
| CREATE UNIQUE INDEX IF NOT EXISTS uq_integration_tokens_github_app_installation | ||
| ON integration_tokens (provider_url, provider_app_id) | ||
| WHERE token_type = 'GITHUB_APP'; | ||
|
|
||
| -- How the org was created; 'gh_app' for orgs created through /gh-login. Analytics + onboarding banner only. | ||
| ALTER TABLE orgs ADD COLUMN IF NOT EXISTS signup_path TEXT; | ||
|
|
||
| -- migrate:down | ||
| DROP INDEX IF EXISTS uq_integration_tokens_github_app_installation; | ||
| ALTER TABLE orgs DROP COLUMN IF EXISTS signup_path; | ||
24 changes: 24 additions & 0 deletions
24
db/migrations/20261022120000_managed_ai_gemini3_vertex.sql
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| -- migrate:up | ||
| -- Google retired Gemini 2.5 Flash / Flash-Lite on Vertex AI on 2026-10-20. The managed tiers run on Gemini Enterprise | ||
| -- (Vertex AI), so the earlier bumps (which matched provider_name = 'gemini') never applied to them. | ||
| -- Gemini 3.x is only served from the global and us/eu multi-region locations, so the tier also records its location. | ||
| ALTER TABLE system_default_ai_configs ADD COLUMN IF NOT EXISTS gcp_location TEXT; | ||
|
|
||
| UPDATE system_default_ai_configs | ||
| SET model_name = 'gemini-3.8-flash', gcp_location = 'us', updated_at = CURRENT_TIMESTAMP | ||
| WHERE tier_name = 'default' AND provider_name = 'gemini-enterprise' AND model_name = 'gemini-2.5-flash'; | ||
|
|
||
| UPDATE system_default_ai_configs | ||
| SET model_name = 'gemini-3.5-flash-lite', gcp_location = 'us', updated_at = CURRENT_TIMESTAMP | ||
| WHERE tier_name = 'default_lite' AND provider_name = 'gemini-enterprise' AND model_name = 'gemini-2.5-flash-lite'; | ||
|
|
||
| -- migrate:down | ||
| UPDATE system_default_ai_configs | ||
| SET model_name = 'gemini-2.5-flash', updated_at = CURRENT_TIMESTAMP | ||
| WHERE tier_name = 'default' AND provider_name = 'gemini-enterprise' AND model_name = 'gemini-3.8-flash'; | ||
|
|
||
| UPDATE system_default_ai_configs | ||
| SET model_name = 'gemini-2.5-flash-lite', updated_at = CURRENT_TIMESTAMP | ||
| WHERE tier_name = 'default_lite' AND provider_name = 'gemini-enterprise' AND model_name = 'gemini-3.5-flash-lite'; | ||
|
|
||
| ALTER TABLE system_default_ai_configs DROP COLUMN IF EXISTS gcp_location; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| -- migrate:up | ||
| -- Managed AI admin page: a tier can hold several configurations (e.g. the old Vertex one and a new OpenRouter one), | ||
| -- exactly one of them active. GetSystemManagedConfig reads only the active row. | ||
| ALTER TABLE system_default_ai_configs DROP CONSTRAINT IF EXISTS system_default_ai_configs_tier_name_key; | ||
| CREATE UNIQUE INDEX IF NOT EXISTS uq_system_default_ai_configs_active_tier | ||
| ON system_default_ai_configs (tier_name) | ||
| WHERE is_active; | ||
| ALTER TABLE system_default_ai_configs ADD COLUMN IF NOT EXISTS label TEXT; | ||
| ALTER TABLE system_default_ai_configs ADD COLUMN IF NOT EXISTS updated_by_user_id BIGINT; | ||
|
|
||
| -- Orgs created through /gh-login?src=launch-trial may run reviews on the LiveReview model while on the Free plan. | ||
| ALTER TABLE org_billing_state ADD COLUMN IF NOT EXISTS free_managed_ai_granted_at TIMESTAMPTZ; | ||
|
|
||
| -- migrate:down | ||
| ALTER TABLE org_billing_state DROP COLUMN IF EXISTS free_managed_ai_granted_at; | ||
| ALTER TABLE system_default_ai_configs DROP COLUMN IF EXISTS updated_by_user_id; | ||
| ALTER TABLE system_default_ai_configs DROP COLUMN IF EXISTS label; | ||
| DROP INDEX IF EXISTS uq_system_default_ai_configs_active_tier; | ||
| -- Inactive rows have to go before the per-tier uniqueness can come back. | ||
| DELETE FROM system_default_ai_configs WHERE NOT is_active; | ||
| ALTER TABLE system_default_ai_configs ADD CONSTRAINT system_default_ai_configs_tier_name_key UNIQUE (tier_name); |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Severity: warning
PostgreSQL unique indexes treat NULLs as distinct by default. If
provider_urlis NULL, duplicate installations can be inserted.Suggestions:
NULLS NOT DISTINCTto the index definition on PostgreSQL 15+.provider_urlis non-null with a default value like 'https://github.com'.