fix reorder in virtual buckets, split view tags, editor/preview cleanup

- Fix card drag reorder in favorites/journal/current (filter logic
  now mirrors renderBoard)
- Split view shows tag-matched cards as own group alongside related
- Remove extract/tree-view buttons from detail preview (edit-only)
- Context menu tag input: Enter assigns tag directly
- Tag autocomplete closes on ESC/click-outside globally
- Close modal cleans up both autocomplete popups

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.6 committed 2026-04-07 22:42:08 +02:00
1 parent 6855381d5c
commit 9018f09351
5 files changed
+90 -41

No files matched your search

+19
View File
@@ -122,6 +122,25 @@ export function showContextMenu(x, y, card) {
renderCtxTags();
tagInput.value = '';
tagInput.addEventListener('input', () => renderCtxTags(tagInput.value));
tagInput.addEventListener('keydown', async e => {
if (e.key !== 'Enter') return;
e.preventDefault();
const raw = tagInput.value.replace(/^#/, '').trim().toLowerCase();
if (!raw) return;
const tag = raw;
if (!cardTags.includes(tag)) {
const newBody = (card.body || '').trimEnd() + ' #' + tag;
card.body = newBody;
cardTags.push(tag);
if (!allTags.includes(tag)) { allTags.push(tag); allTags.sort(); }
await api(`api/cards/${card.id}`, { method: 'PATCH', body: { body: newBody } });
const c = state.cards.find(x => x.id == card.id);
if (c) { c.body = newBody; c.tags = cardTags.join(','); }
window._renderBoard();
}
tagInput.value = '';
renderCtxTags('');
});
tags.classList.add('hidden');
menu.style.left = Math.min(x, innerWidth - 188) + 'px';