cloud: fix UI settings default to actually show the tab by default#2805
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the Cloud tab experience by making the cloud_tab_enabled flag default to enabled across legacy/missing/null values, and by separating “draft” vs “saved” webhook URL state so the UI reliably reflects the last successfully saved webhook configuration.
Changes:
- Backend: normalize
cloud_tab_enabledto defaultTrue(including robust handling ofNoneand string legacy values) and apply consistent gating inTabService. - Frontend: introduce
savedWebhookUrlalongsidewebhookUrl(draft), update UI logic to use the saved value, and improve webhook save behavior (trim/validation handling/state updates). - Tests: add/extend backend, Jest, and Selenium E2E coverage for cloud tab gating and webhook draft/saved behavior.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_webui_e2e.py | Adds E2E coverage ensuring webhook draft input stays editable and doesn’t incorrectly mark outputs configured before save. |
| tests/test_webui_backend.py | Adds backend tests for cloud tab defaulting behavior across missing/null/false values. |
| tests/test_git_services.py | Adds TabService gating tests for Cloud tab visibility based on defaults. |
| tests/js/cloud_providers.test.js | Updates provider config loading tests to assert savedWebhookUrl is set consistently. |
| tests/js/cloud_metrics.test.js | Adds Jest tests for webhook save success, validation failure, and clearing behavior. |
| simpletuner/templates/partials/cloud_onboarding_flow.html | Switches “webhook configured” UI checks to use savedWebhookUrl. |
| simpletuner/templates/partials/cloud_dataloader_hint.html | Updates output destination hint logic to use savedWebhookUrl. |
| simpletuner/templates/cloud_tab.html | Updates displayed local endpoint derivation to use savedWebhookUrl. |
| simpletuner/static/js/modules/cloud/state/publishing-state.js | Introduces savedWebhookUrl in initial publishing state. |
| simpletuner/static/js/modules/cloud/providers.js | Loads provider config with wrapped { config: ... } responses and syncs savedWebhookUrl/webhookUrl. |
| simpletuner/static/js/modules/cloud/metrics.js | Improves webhook save logic (trim, error propagation, saved vs draft state, local upload flagging). |
| simpletuner/static/js/modules/cloud/index.js | Updates “output configured” logic to consider savedWebhookUrl and local_upload_available. |
| simpletuner/simpletuner_sdk/server/services/webui_state.py | Ensures defaults loading fills missing keys with dataclass defaults and normalizes cloud_tab_enabled. |
| simpletuner/simpletuner_sdk/server/services/tab_service.py | Makes Cloud tab gating robust to None and string legacy values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request implements a series of improvements and fixes to the handling of the "cloud tab" feature flag and the webhook configuration in both the backend and frontend, along with new and updated tests to ensure robust behavior. The main focus is on making the
cloud_tab_enabledsetting more robust to missing, null, or legacy values, and on improving the management and display of webhook URLs in the UI.Cloud tab feature flag handling:
Nonevalues forcloud_tab_enabledas enabled (defaulting toTrue), and interprets string representations like"0","false", etc., as disabled. This ensures backward compatibility with legacy defaults and prevents accidental disabling. [1] [2] [3]False. [1] [2]Webhook configuration and UI state management:
webhookUrl) and a saved (savedWebhookUrl) webhook URL, ensuring that the UI always reflects the last successfully saved value. All logic and display in the UI now usesavedWebhookUrlfor consistency. [1] [2] [3] [4] [5]savedWebhookUrland the newlocal_upload_availableflag. [1] [2]Testing improvements:
These changes improve reliability and user experience around the cloud tab and webhook configuration, while ensuring robust test coverage for future changes.