Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/en_US/release_notes_9_14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ Bug fixes

| `Issue #9279 <https://github.com/pgadmin-org/pgadmin4/issues/9279>`_ - Fixed an issue where OAuth2 authentication fails with 'object has no attribute' if OAUTH2_AUTO_CREATE_USER is False.
| `Issue #9392 <https://github.com/pgadmin-org/pgadmin4/issues/9392>`_ - Ensure that the Geometry Viewer refreshes when re-running queries or switching geometry columns, preventing stale data from being displayed.
| `Issue #9702 <https://github.com/pgadmin-org/pgadmin4/issues/9702>`_ - Fixed misleading AI activity messages that could be mistaken for actual database operations.
| `Issue #9721 <https://github.com/pgadmin-org/pgadmin4/issues/9721>`_ - Fixed an issue where permissions page is not completely accessible on full scroll.
17 changes: 1 addition & 16 deletions web/pgadmin/static/js/Explain/AIInsights.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import PropTypes from 'prop-types';
import gettext from 'sources/gettext';
import url_for from 'sources/url_for';
import getApiInstance from '../api_instance';
import { getRandomThinkingMessage } from '../ai_thinking_messages';
import Loader from '../components/Loader';
import EmptyPanelMessage from '../components/EmptyPanelMessage';
import { DefaultButton, PrimaryButton } from '../components/Buttons';
Expand Down Expand Up @@ -131,22 +132,6 @@ const LoadingContainer = styled(Box)({
gap: '16px',
});

// PostgreSQL/Elephant themed thinking messages
const THINKING_MESSAGES = [
gettext('Analyzing query plan...'),
gettext('Examining node costs...'),
gettext('Looking for sequential scans...'),
gettext('Checking index usage...'),
gettext('Evaluating join strategies...'),
gettext('Identifying bottlenecks...'),
gettext('Calculating row estimates...'),
gettext('Reviewing execution times...'),
];

function getRandomThinkingMessage() {
return THINKING_MESSAGES[Math.floor(Math.random() * THINKING_MESSAGES.length)];
}

function getSeverityIcon(severity) {
switch (severity) {
case 'high':
Expand Down
51 changes: 51 additions & 0 deletions web/pgadmin/static/js/ai_thinking_messages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2026, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////

import gettext from 'sources/gettext';

// Fun elephant-themed processing messages (avoid anything that sounds
// like a real database operation, as that can be misleading).
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...'),
];
Comment on lines +14 to +47
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

Suggested change
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.


export function getRandomThinkingMessage() {
return THINKING_MESSAGES[Math.floor(Math.random() * THINKING_MESSAGES.length)];
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { format as formatSQL } from 'sql-formatter';
import gettext from 'sources/gettext';
import url_for from 'sources/url_for';
import getApiInstance from '../../../../../../static/js/api_instance';
import { getRandomThinkingMessage } from '../../../../../../static/js/ai_thinking_messages';
import usePreferences from '../../../../../../preferences/static/js/store';
import {
QueryToolContext,
Expand Down Expand Up @@ -139,30 +140,6 @@ const MESSAGE_TYPES = {
ERROR: 'error',
};

// Elephant/PostgreSQL-themed processing messages
const THINKING_MESSAGES = [
'Consulting the elephant...',
'Traversing the B-tree...',
'Vacuuming the catalog...',
'Analyzing table statistics...',
'Joining the herds...',
'Indexing the savanna...',
'Querying the watering hole...',
'Optimizing the plan...',
'Warming up the cache...',
'Gathering the tuples...',
'Scanning the relations...',
'Checking constraints...',
'Rolling back the peanuts...',
'Committing to memory...',
'Trumpeting the results...',
];

// Helper function to get a random thinking message
function getRandomThinkingMessage() {
return THINKING_MESSAGES[Math.floor(Math.random() * THINKING_MESSAGES.length)];
}

// Single chat message component
function ChatMessage({ message, onInsertSQL, onReplaceSQL, textColors, cmKey }) {
if (message.type === MESSAGE_TYPES.USER) {
Expand Down
Loading