visibility fix for user's own tags
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m26s

This commit is contained in:
2026-03-19 19:59:32 -05:00
parent ef6c43f0c2
commit da7d2f4d5d
2 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
VITE_TASGRID_ENABLE_PROD_MIGRATION=true VITE_TASGRID_ENABLE_PROD_MIGRATION=false
VITE_TASGRID_MIGRATION_ADMIN_EMAILS=tcardoza@cardoza.construction VITE_TASGRID_MIGRATION_ADMIN_EMAILS=tcardoza@cardoza.construction
+15 -2
View File
@@ -521,7 +521,13 @@ const buildTaskTags = (
...labelTags, ...labelTags,
...shareRefs.map(ref => { ...shareRefs.map(ref => {
const context = getContextByRef(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 => { ...noteRefs.map(ref => {
const note = getNoteByRef(ref); const note = getNoteByRef(ref);
@@ -533,7 +539,7 @@ const buildTaskTags = (
tags.push(favoriteTag); tags.push(favoriteTag);
} }
return [...new Set(tags.filter(Boolean))]; return [...new Set(tags.filter((tag): tag is string => !!tag))];
}; };
const dedupeShareRefs = (refs: TaskShareRef[]) => { const dedupeShareRefs = (refs: TaskShareRef[]) => {
@@ -600,6 +606,13 @@ const withActiveContextTags = (rawTags: string[]) => {
const setContexts = (contexts: ShareContext[]) => { const setContexts = (contexts: ShareContext[]) => {
setStore("contexts", reconcile(contexts)); setStore("contexts", reconcile(contexts));
setStore("buckets", reconcile(deriveBuckets(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 labelDefinitions = store.tagDefinitions.filter(def => !def.name.startsWith("@"));
const mergedDefs = [...labelDefinitions, ...deriveSystemTagDefinitions(contexts)]; const mergedDefs = [...labelDefinitions, ...deriveSystemTagDefinitions(contexts)];