Skip to content

Fix for tagging nodes throwing a 500 error and updated default logo for tags - #960

Merged
javuto merged 2 commits into
developfrom
tag-fixes-icons
Aug 11, 2026
Merged

Fix for tagging nodes throwing a 500 error and updated default logo for tags#960
javuto merged 2 commits into
developfrom
tag-fixes-icons

Conversation

@javuto

@javuto javuto commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the tagging system so tagging nodes no longer throws errors, and replaces all Font Awesome icon references with lucide icon names.

Problem

  1. Tagging errorTagNode returned an error when a node was already tagged with the given tag. The handler returned this as a 500, causing batch-tagging to report failures for any already-tagged nodes. Even single-node tagging from the detail page showed "error tagging node" if the tag was already assigned.

  2. Font Awesome icons — backend default icon constants (DefaultTagIcon, DefaultEnvironmentIcon) and frontend defaults used legacy Font Awesome class strings ("fas fa-tag", "fas fa-wrench"). The SPA uses lucide-react, not Font Awesome, so these strings needed the resolveEnvIcon shim to work and were inconsistent with the icon picker which uses plain lucide names.

Changes

Tagging fix (pkg/tags/tags.go)

  • TagNode now returns nil when a node is already tagged instead of fmt.Errorf("node already tagged"). Tagging is idempotent — the frontend can batch-tag all selected nodes without checking which are already tagged.

Icon constants (pkg/tags/tags.go, pkg/environments/environments.go)

  • DefaultTagIcon: "fas fa-tag""tag"
  • DefaultEnvironmentIcon: "fas fa-wrench""wrench"

Frontend icons (frontend/src/features/tags/TagsPage.tsx)

  • DEFAULT_ICON: 'fas fa-tag''tag'
  • Help text: "Font Awesome class (e.g. fas fa-server)" → "Icon name (e.g. server, tag, wrench)"

Test files (6 files)

  • Updated all test fixtures from FA classes ('fas fa-tag', 'fas fa-wrench', 'fas fa-server') to lucide names ('tag', 'wrench', 'server')

Backward compatibility

The IconPicker's resolveEnvIcon function already handles both formats — it splits on space and uses the last segment. Existing DB rows with "fas fa-tag" still render correctly; only new defaults use lucide names.

Validation

  • go build ./... — clean
  • go test ./... — all packages pass
  • npm run check — TypeScript typecheck clean
  • npm test — 34 test files / 209 tests pass

@javuto javuto added 🚧 bugfix Fix for an existing bug 🏷️ tags Tags related issues ⭐️ frontend Frontend related issues labels Aug 11, 2026
@javuto
javuto merged commit 91c0610 into develop Aug 11, 2026
8 checks passed
@javuto
javuto deleted the tag-fixes-icons branch August 11, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚧 bugfix Fix for an existing bug ⭐️ frontend Frontend related issues 🏷️ tags Tags related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant