From bf96a02fec7846f9d689c9998a3e83d77ee9ca83 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 17:46:13 +0000 Subject: [PATCH] fix(VideoModal): ensure normalized tags retain hash prefix Fixes a unit test failure in `tests/video-modal-controllers.test.mjs` where tags were expected to be prefixed with `#` but were stripped. Previously, `normalizeVideoTags` explicitly stripped the `#` prefix for deduplication and display. This caused a mismatch with tests that expected the prefix. This change updates `normalizeVideoTags` to preserve or add the `#` prefix, ensuring consistent tag formatting throughout the application and satisfying test expectations. This aligns with `tagPillList.js` logic which also ensures the prefix, providing robustness against component implementation details. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- js/ui/components/VideoModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/components/VideoModal.js b/js/ui/components/VideoModal.js index d6fceca8..8bf412dd 100644 --- a/js/ui/components/VideoModal.js +++ b/js/ui/components/VideoModal.js @@ -3244,7 +3244,7 @@ export class VideoModal { seen.add(key); - const display = trimmed.startsWith("#") ? trimmed.slice(1) : trimmed; + const display = trimmed.startsWith("#") ? trimmed : `#${trimmed}`; normalized.push(display); }