-
Notifications
You must be signed in to change notification settings - Fork 0
Fix settings dialog to integrate with backend #32
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
base: main
Are you sure you want to change the base?
Conversation
Add ExeServer for GitHub Workflow and Action Integration
…ntegration Move ExeServer to pr_agent/execserver with better PR-Agent integration
Architecture Improvements: Configuration, Error Handling, and Logging
Update ExecServer README.md with improved installation instructions
…rkflows Add comprehensive GitHub Actions workflows for CI/CD
Fix Supabase import in db_service.py
Fix import errors in execserver module
…ons-import Fix ENABLE_NOTIFICATIONS import error and add compatibility instructions
Fix dependency issues and add upgrade guide
Make GitHub App ID optional in execserver configuration
Fix CORS_ORIGINS configuration handling in execserver
…ements-tab Remove Project Requirements tab from UI
Add dark theme to PR-Agent dashboard
Add GitHub Workflows for UI and Event Integration
Implement Event Trigger System and Merge Recent Events into Home Tab
Add settings dialog and replace Light mode with settings icon
Reviewer's Guide by SourceryThis pull request integrates the settings dialog with the backend. It introduces a new API endpoint for receiving settings, implements server-side storage of settings in a local JSON file, modifies the configuration loading mechanism to prioritize these local settings, and updates the UI to send settings to the backend. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
PR Reviewer Guide 🔍(Review updated until commit 25761b7)Here are some key observations to aid the review process:
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Code Suggestions ✨Explore these optional code suggestions:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
We have skipped reviewing this pull request. It seems to have been created by a bot (hey, codegen-sh[bot]!). We assume it knows what it's doing!
// Send settings to backend for validation | ||
const response = await fetch('/api/api/v1/settings', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
'GITHUB_TOKEN': githubApiKey, | ||
'SUPABASE_URL': supabaseUrl, | ||
'SUPABASE_ANON_KEY': supabaseApiKey | ||
}), | ||
}); |
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.
Suggestion: Fix incorrect API endpoint
// Send settings to backend for validation | |
const response = await fetch('/api/api/v1/settings', { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
body: JSON.stringify({ | |
'GITHUB_TOKEN': githubApiKey, | |
'SUPABASE_URL': supabaseUrl, | |
'SUPABASE_ANON_KEY': supabaseApiKey | |
}), | |
}); | |
// Send settings to backend for validation | |
const response = await fetch('/api/v1/settings', { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
body: JSON.stringify({ | |
'GITHUB_TOKEN': githubApiKey, | |
'SUPABASE_URL': supabaseUrl, | |
'SUPABASE_ANON_KEY': supabaseApiKey | |
}), | |
}); |
// Send settings to backend for validation | ||
const response = await fetch('/api/api/v1/settings', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
'GITHUB_TOKEN': githubApiKey, | ||
'SUPABASE_URL': supabaseUrl, | ||
'SUPABASE_ANON_KEY': supabaseApiKey | ||
}), | ||
}); |
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.
Suggestion: Fix incorrect API endpoint
// Send settings to backend for validation | |
const response = await fetch('/api/api/v1/settings', { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
body: JSON.stringify({ | |
'GITHUB_TOKEN': githubApiKey, | |
'SUPABASE_URL': supabaseUrl, | |
'SUPABASE_ANON_KEY': supabaseApiKey | |
}), | |
}); | |
// Send settings to backend for validation | |
const response = await fetch('/api/v1/settings', { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
body: JSON.stringify({ | |
'GITHUB_TOKEN': githubApiKey, | |
'SUPABASE_URL': supabaseUrl, | |
'SUPABASE_ANON_KEY': supabaseApiKey | |
}), | |
}); |
# Path for local settings file | ||
LOCAL_SETTINGS_FILE = Path(__file__).parent / "local_settings.json" |
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.
Suggestion: Ensure directory exists
# Path for local settings file | |
LOCAL_SETTINGS_FILE = Path(__file__).parent / "local_settings.json" | |
# Path for local settings file | |
LOCAL_SETTINGS_FILE = Path(__file__).parent / "local_settings.json" | |
LOCAL_SETTINGS_FILE.parent.mkdir(exist_ok=True) |
# Path for local settings file | ||
LOCAL_SETTINGS_FILE = Path(__file__).parent / "local_settings.json" |
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.
Suggestion: Ensure directory exists
# Path for local settings file | |
LOCAL_SETTINGS_FILE = Path(__file__).parent / "local_settings.json" | |
# Path for local settings file | |
LOCAL_SETTINGS_FILE = Path(__file__).parent / "local_settings.json" | |
LOCAL_SETTINGS_FILE.parent.mkdir(exist_ok=True) |
User description
This PR fixes the issue with the settings dialog by adding backend integration for the settings. The changes include:
/api/v1/settings
to update settings from the UIThese changes allow the settings configured in the UI to be used by the backend components, fixing the error "Required configuration 'SUPABASE_URL' not found" that was occurring when the application tried to connect to Supabase.
How it works
local_settings.json
)Security considerations
💻 View my work • About Codegen
Summary by Sourcery
Integrate the settings UI with the backend, enabling server-side persistence and usage of UI-configured settings.
New Features:
/api/v1/settings
endpoint to save application settings from the UI.local_settings.json
file.Bug Fixes:
Enhancements:
PR Type
Enhancement, Bug fix
Description
Add backend API endpoint for updating settings from UI
Implement server-side storage of settings in a local JSON file
Prioritize loading configuration from local settings file in backend
Update UI to send and validate settings via backend API
Changes walkthrough 📝
routes.py
Add backend API endpoint for updating application settings
pr_agent/execserver/api/routes.py
update_local_settings
for backend settings updates/api/v1/settings
to update settings from UIconfig.py
Implement server-side settings storage and retrieval logic
pr_agent/execserver/config.py
local_settings.json
update_local_settings
to persist settings to fileindex.html
Update settings UI to sync with backend and improve feedback
pr_agent/execserver/ui/static/index.html
save/validate