fix(client): move expires_in field after scope in OAuth2 configuratio…#42017
fix(client): move expires_in field after scope in OAuth2 configuratio…#42017SaifuddinM23 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe OAuth2 ChangesOAuth2 datasource form
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx`:
- Around line 686-695: Conditionally render the authentication.expiresIn control
in renderOauth2Common only for the AuthorizationCode grant, matching the
existing RestAPIForm type and formToDatasourceAuthentication behavior. Keep it
hidden for ClientCredentials so entered values cannot be silently discarded; do
not modify the transformer or Oauth2Common types unless intentionally supporting
the field for both grants.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0f05b388-e3d2-4d55-b7e6-bef234fde903
📒 Files selected for processing (1)
app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx
b05dbb0 to
c51546d
Compare
|
Hey @SaifuddinM23, I ran this locally and added focused Jest coverage for the field order and the Client Credentials guard: SaifuddinM23#1 The full client suite passed in memory-safe groups: 528 suites, 4,143 tests, and 19 snapshots. Prettier, lint, TypeScript, Husky, and gitleaks are clean too. Once you merge that follow-up, this should meet Appsmith's client-test requirement and be ready for One small thing: the current PR title ends with an ellipsis on GitHub. I'd update it to |
Description
TL;DR: Moves the OAuth2 expires_in ("Authorization expires in") input field so that it renders directly below the Scope(s) input field in the Rest API Datasource form.
Motivation & Context: Currently, the expires_in field is placed far down at the end of the authorization code section. Shifting it directly underneath the Scope(s) field keeps all related OAuth2 configuration parameters grouped together, making it much more logical and discoverable for users.
Fixes #31059
Automation
/ok-to-test tags=""
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit