Skip to content

Conversation

@pravesh-sharma
Copy link
Contributor

@pravesh-sharma pravesh-sharma commented Jan 7, 2026

Summary by CodeRabbit

  • Refactor
    • Updated server connection parameter configuration handling to streamline internal implementation while maintaining all existing functionality and user interface behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

Walkthrough

Removed gettext() function wrappers from enum option values in server connection parameter definitions, converting localized enum strings to plain literals while preserving surrounding structure and constraints.

Changes

Cohort / File(s) Change Summary
Enum Value Unwrapping
web/pgadmin/browser/server_groups/servers/static/js/server.ui.js
Replaced gettext()-wrapped enum values with plain string literals across multiple connection parameters (channel_binding, replication, gssencmode, sslmode, ssl_min_protocol_version, ssl_max_protocol_version, target_session_attrs, load_balance_hosts, sslnegotiation, min_protocol_version, max_protocol_version, and TLS version options). No changes to structure, labels, or min_server_version constraints.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately describes the main change: replacing localized enum values with literal string values for connection parameters to fix connection failures.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
web/pgadmin/browser/server_groups/servers/static/js/server.ui.js (1)

56-156: New implementation correctly uses literal enum values for PostgreSQL connection parameters.

This new file properly implements connection parameter definitions where enum values are plain string literals (e.g., 'prefer', 'require', 'verify-ca') that PostgreSQL expects, while labels remain localized using gettext() for UI display.

All enum parameters are correctly defined with literal values matching PostgreSQL documentation:

  • Authentication/encryption modes: channel_binding, gssencmode, sslmode, sslnegotiation
  • Protocol versions: ssl_min_protocol_version, ssl_max_protocol_version, min_protocol_version, max_protocol_version
  • Connection behavior: replication, target_session_attrs, load_balance_hosts

The implementation aligns with backend connection handling in connection.py, which expects these literal values for PostgreSQL parameter passing.

Consider enhancing the regression test suite (server.ui.spec.js) to include validation that enum values remain as literals in non-English locales to prevent future regressions where enum values might accidentally be wrapped with localization functions.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d50dfb9 and 3232582.

📒 Files selected for processing (1)
  • web/pgadmin/browser/server_groups/servers/static/js/server.ui.js
🧰 Additional context used
🧬 Code graph analysis (1)
web/pgadmin/browser/server_groups/servers/static/js/server.ui.js (1)
web/regression/javascript/fake_gettext.js (1)
  • gettext (40-42)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: run-python-tests-pg (windows-latest, 17)
  • GitHub Check: run-python-tests-pg (windows-latest, 14)
  • GitHub Check: run-feature-tests-pg (14)
  • GitHub Check: run-feature-tests-pg (16)
  • GitHub Check: run-feature-tests-pg (18)
  • GitHub Check: run-feature-tests-pg (13)
  • GitHub Check: run-feature-tests-pg (15)
  • GitHub Check: run-feature-tests-pg (17)

@akshay-joshi akshay-joshi merged commit a9d5640 into pgadmin-org:master Jan 8, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants