Fix misleading AI activity messages that could be mistaken for actual database operations.#9722
Fix misleading AI activity messages that could be mistaken for actual database operations.#9722dpage wants to merge 1 commit intopgadmin-org:masterfrom
Conversation
WalkthroughRefactoring consolidates duplicated thinking message functionality into a new shared module. Two components that previously defined local THINKING_MESSAGES arrays and getRandomThinkingMessage functions now import these from a centralized module. Release notes are updated with a bug fix entry. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
89305ee to
5fe3be6
Compare
There was a problem hiding this comment.
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
📒 Files selected for processing (5)
docs/en_US/release_notes.rstdocs/en_US/release_notes_9_13.rstdocs/en_US/release_notes_9_14.rstweb/pgadmin/static/js/Explain/AIInsights.jsxweb/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx
web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx
Outdated
Show resolved
Hide resolved
0efb595 to
26da6bc
Compare
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>
26da6bc to
c53c996
Compare
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
docs/en_US/release_notes_9_14.rstweb/pgadmin/static/js/Explain/AIInsights.jsxweb/pgadmin/static/js/ai_thinking_messages.jsweb/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
| const THINKING_MESSAGES = [ | ||
| gettext('Consulting the elephant...'), | ||
| gettext('Joining the herds...'), | ||
| gettext('Querying the watering hole...'), | ||
| gettext('Rolling back the peanuts...'), | ||
| gettext('Trumpeting for answers...'), | ||
| gettext('Herding the elephants...'), | ||
| gettext('Foraging for ideas...'), | ||
| gettext('Pondering pachyderm thoughts...'), | ||
| gettext('Charging through the tall grass...'), | ||
| gettext('Flapping those big ears...'), | ||
| gettext('Stomping through the jungle...'), | ||
| gettext('Swishing the trunk...'), | ||
| gettext('Calling the herd...'), | ||
| gettext('Splashing in the watering hole...'), | ||
| gettext('Following the elephant trail...'), | ||
| gettext('Munching on some peanuts...'), | ||
| gettext('Doing a trunk stand...'), | ||
| gettext('Remembering everything...'), | ||
| gettext('Migrating across the plains...'), | ||
| gettext('Shaking off the dust...'), | ||
| gettext('Tiptoeing through the tulips...'), | ||
| gettext('Taking a mud bath...'), | ||
| gettext('Polishing the tusks...'), | ||
| gettext('Stretching the trunk...'), | ||
| gettext('Packing the trunk...'), | ||
| gettext('Wading through the river...'), | ||
| gettext('Gathering the herd...'), | ||
| gettext('Tromping through the underbrush...'), | ||
| gettext('Listening with big ears...'), | ||
| gettext('Raising the trunk in triumph...'), | ||
| gettext('Thundering across the savanna...'), | ||
| gettext('Napping under the baobab tree...'), | ||
| ]; |
There was a problem hiding this comment.
A few shared strings still read like database activity.
This list still contains DB-adjacent verbs such as “Joining”, “Querying”, “Rolling back”, and “Migrating”. Because both UI surfaces now reuse this module, those phrases can still be interpreted as real engine work, which leaves the PR objective only partially met. Please swap those entries for wording that is fully whimsical and non-operational.
💡 Suggested wording update
const THINKING_MESSAGES = [
gettext('Consulting the elephant...'),
- gettext('Joining the herds...'),
- gettext('Querying the watering hole...'),
- gettext('Rolling back the peanuts...'),
+ gettext('Roaming with the herd...'),
+ gettext('Peeking at the watering hole...'),
+ gettext('Juggling the peanuts...'),
gettext('Trumpeting for answers...'),
...
- gettext('Migrating across the plains...'),
+ gettext('Wandering across the plains...'),
...
];Based on learnings, pgAdmin UI messages should stay concise and avoid technical jargon or terminology that can confuse users.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const THINKING_MESSAGES = [ | |
| gettext('Consulting the elephant...'), | |
| gettext('Joining the herds...'), | |
| gettext('Querying the watering hole...'), | |
| gettext('Rolling back the peanuts...'), | |
| gettext('Trumpeting for answers...'), | |
| gettext('Herding the elephants...'), | |
| gettext('Foraging for ideas...'), | |
| gettext('Pondering pachyderm thoughts...'), | |
| gettext('Charging through the tall grass...'), | |
| gettext('Flapping those big ears...'), | |
| gettext('Stomping through the jungle...'), | |
| gettext('Swishing the trunk...'), | |
| gettext('Calling the herd...'), | |
| gettext('Splashing in the watering hole...'), | |
| gettext('Following the elephant trail...'), | |
| gettext('Munching on some peanuts...'), | |
| gettext('Doing a trunk stand...'), | |
| gettext('Remembering everything...'), | |
| gettext('Migrating across the plains...'), | |
| gettext('Shaking off the dust...'), | |
| gettext('Tiptoeing through the tulips...'), | |
| gettext('Taking a mud bath...'), | |
| gettext('Polishing the tusks...'), | |
| gettext('Stretching the trunk...'), | |
| gettext('Packing the trunk...'), | |
| gettext('Wading through the river...'), | |
| gettext('Gathering the herd...'), | |
| gettext('Tromping through the underbrush...'), | |
| gettext('Listening with big ears...'), | |
| gettext('Raising the trunk in triumph...'), | |
| gettext('Thundering across the savanna...'), | |
| gettext('Napping under the baobab tree...'), | |
| ]; | |
| const THINKING_MESSAGES = [ | |
| gettext('Consulting the elephant...'), | |
| gettext('Roaming with the herd...'), | |
| gettext('Peeking at the watering hole...'), | |
| gettext('Juggling the peanuts...'), | |
| gettext('Trumpeting for answers...'), | |
| gettext('Herding the elephants...'), | |
| gettext('Foraging for ideas...'), | |
| gettext('Pondering pachyderm thoughts...'), | |
| gettext('Charging through the tall grass...'), | |
| gettext('Flapping those big ears...'), | |
| gettext('Stomping through the jungle...'), | |
| gettext('Swishing the trunk...'), | |
| gettext('Calling the herd...'), | |
| gettext('Splashing in the watering hole...'), | |
| gettext('Following the elephant trail...'), | |
| gettext('Munching on some peanuts...'), | |
| gettext('Doing a trunk stand...'), | |
| gettext('Remembering everything...'), | |
| gettext('Wandering across the plains...'), | |
| gettext('Shaking off the dust...'), | |
| gettext('Tiptoeing through the tulips...'), | |
| gettext('Taking a mud bath...'), | |
| gettext('Polishing the tusks...'), | |
| gettext('Stretching the trunk...'), | |
| gettext('Packing the trunk...'), | |
| gettext('Wading through the river...'), | |
| gettext('Gathering the herd...'), | |
| gettext('Tromping through the underbrush...'), | |
| gettext('Listening with big ears...'), | |
| gettext('Raising the trunk in triumph...'), | |
| gettext('Thundering across the savanna...'), | |
| gettext('Napping under the baobab tree...'), | |
| ]; |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@web/pgadmin/static/js/ai_thinking_messages.js` around lines 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.
Summary by CodeRabbit
Documentation
Refactor