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
+15 -2
View File
@@ -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)];