Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .beads/issues.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{"id":"smartfiles-177","title":"NullPointerException risk in getSelectedDocumentId","description":"ApplicationModel.getSelectedDocumentId() (line 107-109) calls selectedDocumentProperty.get().getId() without null checking. If called when no document is selected, this throws NPE.\n\n**File:** ApplicationModel.java (lines 107-109)\n\n**Fix:** Return null or Optional.empty() when no document is selected.","status":"open","priority":2,"issue_type":"bug","created_at":"2026-01-15T22:35:53.857787+01:00","created_by":"abedurftig","updated_at":"2026-01-15T22:35:53.857787+01:00"}
{"id":"smartfiles-2","title":"Improve click elsewhere to cancel editing of description","description":"In beads issue smartfiles-1 we introduced a feature to edit the document description. Edit mode is enabled by just clicking on the label. Enter would confirm the changes. Clicking elsewhere should cancel the editing.\n\n**Current behavior:**\n- Editing is cancelled when user clicks on the document view\n- Editing is NOT cancelled when clicking anywhere on the right scroll pane\n\n**Expected behavior:**\n- Clicking anywhere outside the description field should cancel editing mode\n\n**Related:** smartfiles-1","status":"closed","priority":2,"issue_type":"bug","created_at":"2026-01-06T20:36:45Z","updated_at":"2026-01-06T20:38:46Z","closed_at":"2026-01-06T20:38:46Z","close_reason":"Fixed: Made right panel VBoxes focusable and added mouse handlers to request focus when clicked. Also added logic to reset unsaved changes when focus is lost.","dependencies":[{"issue_id":"smartfiles-2","depends_on_id":"smartfiles-1","type":"discovered-from","created_at":"2026-01-06T20:37:04Z","created_by":"claude","metadata":"{}"}]}
{"id":"smartfiles-40c","title":"TagAddedEvent handler is empty and unused","description":"The handleTagAddedEvent method in ApplicationInteractor.java (line 46-47) has an empty body. The event is defined in the sealed class hierarchy but produces no behavior.\n\n**Fix:** Either implement the handler or remove the event type if it's not needed.","status":"open","priority":3,"issue_type":"task","created_at":"2026-01-15T22:36:40.707836+01:00","created_by":"abedurftig","updated_at":"2026-01-15T22:36:40.707836+01:00"}
{"id":"smartfiles-412","title":"ArchiveEntry.of() creates immutable empty tag set","description":"ArchiveEntry.of() (line 31) uses Set.of() which creates an immutable set. When addTag() tries to add to this set, it will throw UnsupportedOperationException.\n\nThe test code works around this by calling entry.setTags(new HashSet\u003c\u003e()) before adding tags, but this is fragile.\n\n**File:** ArchiveEntry.java (line 31)\n\n**Fix:** Change Set.of() to new HashSet\u003c\u003e() in the factory method.","status":"open","priority":1,"issue_type":"bug","created_at":"2026-01-15T22:35:24.189652+01:00","created_by":"abedurftig","updated_at":"2026-01-15T22:35:24.189652+01:00"}
{"id":"smartfiles-412","title":"ArchiveEntry.of() creates immutable empty tag set","description":"ArchiveEntry.of() (line 31) uses Set.of() which creates an immutable set. When addTag() tries to add to this set, it will throw UnsupportedOperationException.\n\nThe test code works around this by calling entry.setTags(new HashSet\u003c\u003e()) before adding tags, but this is fragile.\n\n**File:** ArchiveEntry.java (line 31)\n\n**Fix:** Change Set.of() to new HashSet\u003c\u003e() in the factory method.","status":"in_progress","priority":1,"issue_type":"bug","created_at":"2026-01-15T22:35:24.189652+01:00","created_by":"abedurftig","updated_at":"2026-01-16T21:00:45.195087+01:00"}
{"id":"smartfiles-50j","title":"Archive.tags field is unused dead code","description":"The Archive class has a tags field (line 25) that is initialized to Set.of() in empty() but is never populated or used anywhere. Tags are stored per-document in ArchiveEntry.tags.\n\n**Fix:** Remove the unused field or implement archive-level tags if needed.","status":"open","priority":4,"issue_type":"task","created_at":"2026-01-15T22:37:27.003705+01:00","created_by":"abedurftig","updated_at":"2026-01-15T22:37:27.003705+01:00"}
{"id":"smartfiles-64m","title":"Unbounded image cache in PdfImageRenderer","description":"PdfImageRenderer.imageCache (line 19) grows without limit as pages are rendered. For large PDFs with many pages, this could consume significant memory. There's no LRU eviction or size limit.\n\n**Fix:** Implement bounded cache with LRU eviction (e.g., LinkedHashMap with removeEldestEntry or Caffeine cache).","status":"open","priority":3,"issue_type":"task","created_at":"2026-01-15T22:36:57.905578+01:00","created_by":"abedurftig","updated_at":"2026-01-15T22:36:57.905578+01:00"}
{"id":"smartfiles-7tf","title":"Tag filter not cleared when last document with that tag is deleted","description":"When a document is the only result of a tag filter and that document is deleted, the tag filter remains selected but becomes invalid. No documents are visible and the user cannot unselect the tag filter. The selectedFilterTags set should be cleaned up when tags are removed from the available tags.","status":"closed","priority":1,"issue_type":"bug","created_at":"2026-01-11T12:30:52.207273+01:00","created_by":"abedurftig","updated_at":"2026-01-11T12:33:20.182054+01:00","closed_at":"2026-01-11T12:33:20.182065+01:00","dependencies":[{"issue_id":"smartfiles-7tf","depends_on_id":"smartfiles-0l4","type":"relates-to","created_at":"2026-01-11T12:31:10.566697+01:00","created_by":"abedurftig"}]}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.arne.smartfiles.core.model;

import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;

Expand Down Expand Up @@ -28,7 +29,7 @@ public class ArchiveEntry {
public static ArchiveEntry of(String name, String absolutePath, String originalPath) {
var path = absolutePath.substring(absolutePath.lastIndexOf("/") + 1);
var timeStamp = LocalDateTime.now();
return new ArchiveEntry(UUID.randomUUID(), name, "Not available yet", path, absolutePath, originalPath, Set.of(), timeStamp, timeStamp);
return new ArchiveEntry(UUID.randomUUID(), name, "Not available yet", path, absolutePath, originalPath, new HashSet<>(), timeStamp, timeStamp);
}

public void updateLastModified() {
Expand Down