Skip to content

Fix misleading AI activity messages that could be mistaken for actual database operations.#9722

Merged
akshay-joshi merged 2 commits intopgadmin-org:masterfrom
dpage:ai_activity_messages
Mar 16, 2026
Merged

Fix misleading AI activity messages that could be mistaken for actual database operations.#9722
akshay-joshi merged 2 commits intopgadmin-org:masterfrom
dpage:ai_activity_messages

Conversation

@dpage
Copy link
Contributor

@dpage dpage commented Mar 10, 2026

Summary by CodeRabbit

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3de33c08-9773-4dec-8349-a8e8a16fd0ca

📥 Commits

Reviewing files that changed from the base of the PR and between c53c996 and c3b1345.

📒 Files selected for processing (2)
  • docs/en_US/release_notes_9_14.rst
  • web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx

Walkthrough

Consolidates duplicated "thinking" messages into a new shared module and updates two UI components to import the helper. Adds a release-notes entry for a bug fix (Issue #9702).

Changes

Cohort / File(s) Summary
Shared Module Creation
web/pgadmin/static/js/ai_thinking_messages.js
New module defining THINKING_MESSAGES (localized strings) and exporting getRandomThinkingMessage() to return a random message.
Module Integration
web/pgadmin/static/js/Explain/AIInsights.jsx, web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx
Removed local THINKING_MESSAGES arrays and local getRandomThinkingMessage() functions; now import and use getRandomThinkingMessage() from the new shared module.
Documentation
docs/en_US/release_notes_9_14.rst
Added a Bug fixes entry for Issue #9702 in the 9.14 release notes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% 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 accurately reflects the main change: refactoring AI thinking messages to use externalized, non-misleading messages instead of potentially confusing ones.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@dpage dpage force-pushed the ai_activity_messages branch from 89305ee to 5fe3be6 Compare March 10, 2026 09:44
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: 1

🧹 Nitpick comments (1)
web/pgadmin/static/js/Explain/AIInsights.jsx (1)

5-5: Copyright year appears outdated.

The copyright year shows "2025" while the other modified file (NLQChatPanel.jsx) shows "2026". Consider updating this to maintain consistency.

📅 Proposed fix
-// Copyright (C) 2013 - 2025, The pgAdmin Development Team
+// Copyright (C) 2013 - 2026, The pgAdmin Development Team
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/pgadmin/static/js/Explain/AIInsights.jsx` at line 5, Update the copyright
header string "Copyright (C) 2013 - 2025, The pgAdmin Development Team" to match
the other file by changing the end year to 2026; locate the header in
AIInsights.jsx (the top-of-file copyright comment) and replace 2025 with 2026 so
it is consistent with NLQChatPanel.jsx.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx`:
- Around line 144-177: THINKING_MESSAGES in NLQChatPanel.jsx contains hard-coded
English strings; wrap each string in gettext() so they become translatable
(matching AIInsights.jsx). Locate the THINKING_MESSAGES constant and replace
each plain string entry with gettext('...') preserving the same message text;
ensure gettext is imported/available in NLQChatPanel.jsx (add import/gettext
usage consistent with surrounding components) and run lint/format.

---

Nitpick comments:
In `@web/pgadmin/static/js/Explain/AIInsights.jsx`:
- Line 5: Update the copyright header string "Copyright (C) 2013 - 2025, The
pgAdmin Development Team" to match the other file by changing the end year to
2026; locate the header in AIInsights.jsx (the top-of-file copyright comment)
and replace 2025 with 2026 so it is consistent with NLQChatPanel.jsx.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fb1a6248-41e5-4d18-94a8-72b1690e9393

📥 Commits

Reviewing files that changed from the base of the PR and between a0e6da0 and 89305ee.

📒 Files selected for processing (5)
  • docs/en_US/release_notes.rst
  • docs/en_US/release_notes_9_13.rst
  • docs/en_US/release_notes_9_14.rst
  • web/pgadmin/static/js/Explain/AIInsights.jsx
  • web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx

@dpage dpage force-pushed the ai_activity_messages branch 2 times, most recently from 0efb595 to 26da6bc Compare March 10, 2026 09:51
The previous messages like "Vacuuming the catalog..." and "Analyzing
table statistics..." could be mistaken for actual database operations.
Replace them with clearly whimsical elephant-themed messages, expand
the pool to 32 messages, and consolidate them into a single shared
module with gettext() support.

Fixes pgadmin-org#9702

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dpage dpage force-pushed the ai_activity_messages branch from 26da6bc to c53c996 Compare March 10, 2026 10:15
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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@web/pgadmin/static/js/ai_thinking_messages.js`:
- Around line 14-47: The THINKING_MESSAGES array contains DB-adjacent verbs
("Joining the herds...", "Querying the watering hole...", "Rolling back the
peanuts...", "Migrating across the plains...") that can be misinterpreted;
update the entries in the THINKING_MESSAGES constant to fully whimsical,
non-operational alternatives (e.g., replace each offending string with a playful
phrase like "Chasing butterfly clouds...", "Whistling with the wind...",
"Balancing on a sunbeam...", "Skipping over moonbeams..."), preserving the
gettext(...) wrappers and array structure so localization remains intact.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e2f9145f-5705-4325-aa97-fa478820609a

📥 Commits

Reviewing files that changed from the base of the PR and between 89305ee and c53c996.

📒 Files selected for processing (4)
  • docs/en_US/release_notes_9_14.rst
  • web/pgadmin/static/js/Explain/AIInsights.jsx
  • web/pgadmin/static/js/ai_thinking_messages.js
  • web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/en_US/release_notes_9_14.rst

@akshay-joshi akshay-joshi merged commit da55da4 into pgadmin-org:master Mar 16, 2026
33 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.

2 participants