Skip to content

fix: remove leading '#' from search result tags#1114

Draft
mdroidian wants to merge 1 commit into
mainfrom
cursor/fix-search-tag-hash-cd53
Draft

fix: remove leading '#' from search result tags#1114
mdroidian wants to merge 1 commit into
mainfrom
cursor/fix-search-tag-hash-cd53

Conversation

@mdroidian

Copy link
Copy Markdown
Member

Problem

In the advanced search dialog, discourse node type tags were displaying with the "#" prefix included. For example:

  • "CLM" was showing as "#CL"
  • "QUE" was showing as "#QU"

This was because the getNodeBadgeText function was taking the first 3 characters of node.tag, which includes the "#" prefix.

Solution

  • Import the existing getCleanTagText utility function from ~/components/settings/NodeConfig
  • Use it in getNodeBadgeText to strip the "#" prefix (and handle other cleanup) before taking the first 3 characters
  • This ensures tags display correctly as "CLM", "QUE", etc.

Testing

  • TypeScript type checking passes
  • Linter passes
  • Build completes successfully with no errors
  • Code uses existing utility function that's already being used elsewhere in the codebase for the same purpose

Resolves Linear issue ENG-1839

Linear Issue: ENG-1839

Open in Web Open in Cursor 

- Import existing getCleanTagText utility function
- Use it in getNodeBadgeText to strip '#' prefix before slicing
- Fixes issue where tags showed as '#CL' instead of 'CLM' and '#QU' instead of 'QUE'

Resolves ENG-1839
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
discourse-graph Skipped Skipped Jun 9, 2026 7:56am

Request Review

@supabase

supabase Bot commented Jun 9, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

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