From da7d2f4d5da853e3d8050c43719712a9ba14a4b6 Mon Sep 17 00:00:00 2001 From: Timothy Cardoza Date: Thu, 19 Mar 2026 19:59:32 -0500 Subject: [PATCH] visibility fix for user's own tags --- .env.production | 2 +- src/store/index.ts | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.env.production b/.env.production index a125f1a..d2b7184 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,2 @@ -VITE_TASGRID_ENABLE_PROD_MIGRATION=true +VITE_TASGRID_ENABLE_PROD_MIGRATION=false VITE_TASGRID_MIGRATION_ADMIN_EMAILS=tcardoza@cardoza.construction \ No newline at end of file diff --git a/src/store/index.ts b/src/store/index.ts index 4505857..62e8100 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -521,7 +521,13 @@ const buildTaskTags = ( ...labelTags, ...shareRefs.map(ref => { const context = getContextByRef(ref); - return buildShareTag(context?.displayName || ref.key); + if (context?.displayName) { + return buildShareTag(context.displayName); + } + if (ref.kind === "user" && ref.key.startsWith("user-")) { + return null; + } + return buildShareTag(ref.key); }), ...noteRefs.map(ref => { const note = getNoteByRef(ref); @@ -533,7 +539,7 @@ const buildTaskTags = ( tags.push(favoriteTag); } - return [...new Set(tags.filter(Boolean))]; + return [...new Set(tags.filter((tag): tag is string => !!tag))]; }; const dedupeShareRefs = (refs: TaskShareRef[]) => { @@ -600,6 +606,13 @@ const withActiveContextTags = (rawTags: string[]) => { const setContexts = (contexts: ShareContext[]) => { setStore("contexts", reconcile(contexts)); setStore("buckets", reconcile(deriveBuckets(contexts))); + setStore("tasks", tasks => tasks.map(task => { + const favoriteTag = task.tags.find(tag => tag.endsWith("_favorite__")); + return { + ...task, + tags: buildTaskTags(task.labelTags, task.shareRefs, task.noteRefs, favoriteTag) + }; + })); const labelDefinitions = store.tagDefinitions.filter(def => !def.name.startsWith("@")); const mergedDefs = [...labelDefinitions, ...deriveSystemTagDefinitions(contexts)];