Skip to content

fix(ui): Display prompt_id in admin panel prompts page#2688

Merged
crivetimihai merged 1 commit intomainfrom
issue_2656_prompt_id_not_visible
Feb 6, 2026
Merged

fix(ui): Display prompt_id in admin panel prompts page#2688
crivetimihai merged 1 commit intomainfrom
issue_2656_prompt_id_not_visible

Conversation

@rakdutta
Copy link
Copy Markdown
Collaborator

@rakdutta rakdutta commented Feb 4, 2026

Closes #2656

🐛 Bug Fix: Display Prompt ID in Admin UI

Summary

Adds prompt_id visibility to the MCP Gateway admin panel's Prompts page, enabling developers to easily identify prompt IDs for plugin configuration without requiring direct database queries.

1. Prompts Table (mcpgateway/templates/prompts_partial.html)

  • Added "Prompt ID" column header between "Name" and "Description"

2. View Prompt Modal (mcpgateway/static/admin.js)

  • Added "Prompt ID" field as the first item in the view dialog
  • Populated via setText(".prompt-id", prompt.id || "N/A")

Visual Changes

Before:

  • Prompt ID: ❌ Not visible anywhere
  • Developers: Had to query database directly

After:

  • Prompt ID: ✅ Visible in table and view dialog
  • Developers: Can copy ID directly from UI

Testing Recommendations

# 1. Start the development server
make dev

# 2. Navigate to http://localhost:8000/admin
# 3. Go to Prompts tab
# 4. Verify:
#    - New "Prompt ID" column appears in table
#    - Click "View" on any prompt
#    - Verify "Prompt ID" appears as first field in modal

Files Modified

  • mcpgateway/templates/prompts_partial.html - Added table column
  • mcpgateway/static/admin.js - Added view modal field

@crivetimihai crivetimihai self-assigned this Feb 4, 2026
@rakdutta rakdutta marked this pull request as ready for review February 4, 2026 08:25
Copy link
Copy Markdown
Collaborator

@gcgoncalves gcgoncalves left a comment

Choose a reason for hiding this comment

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

Tested locally and the IDs are displayed correctly. One minor suggestion (non-blocker):

The new Prompt ID block uses a span for the label and a div for the value. This renders correctly, but screen readers cannot infer that these two elements are related. To improve accessibility without changing the visual layout or introducing

/
, consider adding an explicit label/value association:
Option A (aria-labelledby):

Prompt ID:
Option B (role=group):
Prompt ID:

@rakdutta rakdutta force-pushed the issue_2656_prompt_id_not_visible branch from 1b542c3 to 861ca61 Compare February 6, 2026 05:19
Add Prompt ID visibility to the admin panel's Prompts page:
- Added "Prompt ID" column header in the prompts table
- Display prompt.id in the table row with monospace styling
- Added "Prompt ID" field as the first item in the view prompt modal

Closes #2656

Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
@crivetimihai crivetimihai force-pushed the issue_2656_prompt_id_not_visible branch from 419d383 to 11ae3b5 Compare February 6, 2026 16:27
@crivetimihai crivetimihai merged commit 0527b02 into main Feb 6, 2026
51 checks passed
@crivetimihai crivetimihai deleted the issue_2656_prompt_id_not_visible branch February 6, 2026 17:22
kcostell06 pushed a commit to kcostell06/mcp-context-forge that referenced this pull request Feb 24, 2026
Add Prompt ID visibility to the admin panel's Prompts page:
- Added "Prompt ID" column header in the prompts table
- Display prompt.id in the table row with monospace styling
- Added "Prompt ID" field as the first item in the view prompt modal

Closes IBM#2656

Signed-off-by: rakdutta <rakhibiswas@yahoo.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
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.

[BUG]: prompt_id not visible in UI

3 participants