Skip to content

Commit c53c996

Browse files
dpageclaude
andcommitted
Replace misleading AI thinking messages with fun elephant-themed ones.
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 #9702 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a0e6da0 commit c53c996

File tree

4 files changed

+54
-40
lines changed

4 files changed

+54
-40
lines changed

docs/en_US/release_notes_9_14.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ Bug fixes
3030

3131
| `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.
3232
| `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.
33+
| `Issue #9702 <https://github.com/pgadmin-org/pgadmin4/issues/9702>`_ - Fixed misleading AI activity messages that could be mistaken for actual database operations.
3334
| `Issue #9721 <https://github.com/pgadmin-org/pgadmin4/issues/9721>`_ - Fixed an issue where permissions page is not completely accessible on full scroll.

web/pgadmin/static/js/Explain/AIInsights.jsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import PropTypes from 'prop-types';
3030
import gettext from 'sources/gettext';
3131
import url_for from 'sources/url_for';
3232
import getApiInstance from '../api_instance';
33+
import { getRandomThinkingMessage } from '../ai_thinking_messages';
3334
import Loader from '../components/Loader';
3435
import EmptyPanelMessage from '../components/EmptyPanelMessage';
3536
import { DefaultButton, PrimaryButton } from '../components/Buttons';
@@ -131,22 +132,6 @@ const LoadingContainer = styled(Box)({
131132
gap: '16px',
132133
});
133134

134-
// PostgreSQL/Elephant themed thinking messages
135-
const THINKING_MESSAGES = [
136-
gettext('Analyzing query plan...'),
137-
gettext('Examining node costs...'),
138-
gettext('Looking for sequential scans...'),
139-
gettext('Checking index usage...'),
140-
gettext('Evaluating join strategies...'),
141-
gettext('Identifying bottlenecks...'),
142-
gettext('Calculating row estimates...'),
143-
gettext('Reviewing execution times...'),
144-
];
145-
146-
function getRandomThinkingMessage() {
147-
return THINKING_MESSAGES[Math.floor(Math.random() * THINKING_MESSAGES.length)];
148-
}
149-
150135
function getSeverityIcon(severity) {
151136
switch (severity) {
152137
case 'high':
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/////////////////////////////////////////////////////////////
2+
//
3+
// pgAdmin 4 - PostgreSQL Tools
4+
//
5+
// Copyright (C) 2013 - 2026, The pgAdmin Development Team
6+
// This software is released under the PostgreSQL Licence
7+
//
8+
//////////////////////////////////////////////////////////////
9+
10+
import gettext from 'sources/gettext';
11+
12+
// Fun elephant-themed processing messages (avoid anything that sounds
13+
// like a real database operation, as that can be misleading).
14+
const THINKING_MESSAGES = [
15+
gettext('Consulting the elephant...'),
16+
gettext('Joining the herds...'),
17+
gettext('Querying the watering hole...'),
18+
gettext('Rolling back the peanuts...'),
19+
gettext('Trumpeting for answers...'),
20+
gettext('Herding the elephants...'),
21+
gettext('Foraging for ideas...'),
22+
gettext('Pondering pachyderm thoughts...'),
23+
gettext('Charging through the tall grass...'),
24+
gettext('Flapping those big ears...'),
25+
gettext('Stomping through the jungle...'),
26+
gettext('Swishing the trunk...'),
27+
gettext('Calling the herd...'),
28+
gettext('Splashing in the watering hole...'),
29+
gettext('Following the elephant trail...'),
30+
gettext('Munching on some peanuts...'),
31+
gettext('Doing a trunk stand...'),
32+
gettext('Remembering everything...'),
33+
gettext('Migrating across the plains...'),
34+
gettext('Shaking off the dust...'),
35+
gettext('Tiptoeing through the tulips...'),
36+
gettext('Taking a mud bath...'),
37+
gettext('Polishing the tusks...'),
38+
gettext('Stretching the trunk...'),
39+
gettext('Packing the trunk...'),
40+
gettext('Wading through the river...'),
41+
gettext('Gathering the herd...'),
42+
gettext('Tromping through the underbrush...'),
43+
gettext('Listening with big ears...'),
44+
gettext('Raising the trunk in triumph...'),
45+
gettext('Thundering across the savanna...'),
46+
gettext('Napping under the baobab tree...'),
47+
];
48+
49+
export function getRandomThinkingMessage() {
50+
return THINKING_MESSAGES[Math.floor(Math.random() * THINKING_MESSAGES.length)];
51+
}

web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { format as formatSQL } from 'sql-formatter';
2626
import gettext from 'sources/gettext';
2727
import url_for from 'sources/url_for';
2828
import getApiInstance from '../../../../../../static/js/api_instance';
29+
import { getRandomThinkingMessage } from '../../../../../../static/js/ai_thinking_messages';
2930
import usePreferences from '../../../../../../preferences/static/js/store';
3031
import {
3132
QueryToolContext,
@@ -139,30 +140,6 @@ const MESSAGE_TYPES = {
139140
ERROR: 'error',
140141
};
141142

142-
// Elephant/PostgreSQL-themed processing messages
143-
const THINKING_MESSAGES = [
144-
'Consulting the elephant...',
145-
'Traversing the B-tree...',
146-
'Vacuuming the catalog...',
147-
'Analyzing table statistics...',
148-
'Joining the herds...',
149-
'Indexing the savanna...',
150-
'Querying the watering hole...',
151-
'Optimizing the plan...',
152-
'Warming up the cache...',
153-
'Gathering the tuples...',
154-
'Scanning the relations...',
155-
'Checking constraints...',
156-
'Rolling back the peanuts...',
157-
'Committing to memory...',
158-
'Trumpeting the results...',
159-
];
160-
161-
// Helper function to get a random thinking message
162-
function getRandomThinkingMessage() {
163-
return THINKING_MESSAGES[Math.floor(Math.random() * THINKING_MESSAGES.length)];
164-
}
165-
166143
// Single chat message component
167144
function ChatMessage({ message, onInsertSQL, onReplaceSQL, textColors, cmKey }) {
168145
if (message.type === MESSAGE_TYPES.USER) {

0 commit comments

Comments
 (0)