Skip to content

Resource tags are being displayed#2666

Merged
crivetimihai merged 3 commits intomainfrom
resouces_tags
Feb 6, 2026
Merged

Resource tags are being displayed#2666
crivetimihai merged 3 commits intomainfrom
resouces_tags

Conversation

@Nayana-R-Gowda
Copy link
Copy Markdown
Collaborator

Signed-off-by: NAYANAR nayana.r7813@gmail.com

Resource tags are now visible

@crivetimihai
Copy link
Copy Markdown
Member

Thanks for the fix, @Nayana-R-Gowda. The tag display bug is real — {{ tag.id }} fails when tags are plain strings.

However, rather than {{ tag }}, I'd recommend using the defensive pattern already used in other templates (agents_partial.html, gateways_partial.html, servers_partial.html):

{% if tag is mapping %}{{ tag.id }}{% else %}{{ tag }}{% endif %}

This handles both object and string tag formats safely.

Also, prompts_partial.html line 56 has the same {{ tag.id }} pattern — could you fix that in this PR as well?

No linked issue — please add one to the PR description.

@crivetimihai crivetimihai self-assigned this Feb 4, 2026
Nayana-R-Gowda and others added 3 commits February 6, 2026 08:15
Signed-off-by: NAYANAR <nayana.r7813@gmail.com>
…ngs; render tags defensively

Signed-off-by: NAYANAR <nayana.r7813@gmail.com>
Apply the `{% if tag is mapping %}{{ tag.id }}{% else %}{{ tag }}{% endif %}`
pattern to resources_partial.html, plugins_partial.html, and
tools_with_pagination.html that were missing the defensive check.

Also fix accidental indentation change in admin.html.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
@crivetimihai crivetimihai merged commit 717a2fd into main Feb 6, 2026
51 checks passed
@crivetimihai crivetimihai deleted the resouces_tags branch February 6, 2026 08:38
kcostell06 pushed a commit to kcostell06/mcp-context-forge that referenced this pull request Feb 24, 2026
* Resource tags are being displayed

Signed-off-by: NAYANAR <nayana.r7813@gmail.com>

* Fix tag display bug where {{ tag.id }} crashes if tags are plain strings; render tags defensively

Signed-off-by: NAYANAR <nayana.r7813@gmail.com>

* fix: Apply defensive tag pattern consistently across all templates

Apply the `{% if tag is mapping %}{{ tag.id }}{% else %}{{ tag }}{% endif %}`
pattern to resources_partial.html, plugins_partial.html, and
tools_with_pagination.html that were missing the defensive check.

Also fix accidental indentation change in admin.html.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: NAYANAR <nayana.r7813@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Co-authored-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.

2 participants