Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/tags/TagTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export function TagTree({ onOpenTagSettings }: TagTreeProps = {}) {
const setSelectedTag = useUIStore(s => s.setSelectedTag);
const openSearchPalette = useUIStore(s => s.openSearchPalette);
const expandedTagIds = useUIStore(s => s.expandedTagIds);
const expandTagPath = useUIStore(s => s.expandTagPath);
const fetchAtoms = useAtomsStore(s => s.fetchAtoms);
const fetchAtomsByTag = useAtomsStore(s => s.fetchAtomsByTag);

Expand Down Expand Up @@ -155,7 +156,11 @@ export function TagTree({ onOpenTagSettings }: TagTreeProps = {}) {

const handleCreateTag = async () => {
if (newTagModal.name.trim()) {
await createTag(newTagModal.name.trim(), newTagModal.parentId || undefined);
const parentId = newTagModal.parentId;
await createTag(newTagModal.name.trim(), parentId || undefined);
if (parentId) {
expandTagPath([parentId]);
}
setNewTagModal({ isOpen: false, parentId: null, name: '' });
}
};
Expand Down
1 change: 1 addition & 0 deletions src/stores/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ export const useUIStore = create<UIStore>()(
chatSidebarOpen: state.chatSidebarOpen,
chatSidebarWidth: state.chatSidebarWidth,
chatSidebarConversationId: state.chatSidebarConversationId,
expandedTagIds: state.expandedTagIds,
}),
// v0 → v1: 'grid' and 'list' were top-level ViewMode values. They're now
// collapsed into a single 'atoms' view with a separate atomsLayout field.
Expand Down
Loading