Repository navigation
Improve history storage, full text search, and processing limits - #8
Merged
Merged
Conversation
Greptile SummaryThe PR restructures clipboard-history persistence and processing while adding bounded storage, full-text search, background image work, migration repair, and expanded unit-test automation.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| Lodge/HistoryService.swift | Adds transactional history operations, prospective retention validation, pruning, and rollback-aware update handling; the previously reported target-pruning paths are guarded. |
| Lodge/Storage.swift | Implements repository transactions and restoration of cached model values after failed saves. |
| Lodge/ContentProcessor.swift | Moves hashing and searchable-text extraction into isolated processing work. |
| Lodge/ImageProcessingService.swift | Adds bounded preview caching, limited OCR concurrency, and cancellation-aware image processing. |
| Lodge/Search.swift | Extends search to processed full text and removes the fixed scheduling delay. |
| .github/workflows/check.yml | Adds locked-package unit-test CI and pins the previously reported action dependencies to immutable commits. |
| .github/workflows/release.yml | Adds unit tests before release mutation while preserving the existing release, signing, and publication flow. |
Sequence Diagram
sequenceDiagram
participant C as Clipboard
participant P as ContentProcessor
participant H as HistoryService
participant R as HistoryRepository
participant UI as History/UI
C->>P: Submit clipboard snapshot
P-->>H: Processed content and search text
H->>H: Apply duplicate and retention rules
H->>R: Execute one transaction
alt Save succeeds
R-->>H: Committed items
H-->>UI: Publish updated history
else Save fails
R->>R: Roll back changes
R-->>H: Storage error
H-->>UI: Preserve prior history and report error
end
Reviews (3): Last reviewed commit: "Keep history items when unpinning exceed..." | Re-trigger Greptile
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
History operations could leave the displayed list out of sync after a failed save. Repeated copies could stay in the wrong position, and search skipped text beyond the title. This change makes each history operation use one save with rollback, preserves duplicate identity, and searches full text without the fixed delay.
Validation: all 107 unit tests passed with locked package versions on macOS 26.6.2, arm64. Tests include failed saves, duplicate order, full text search, old-schema migration, external file deletion, cache limits, OCR cancellation, and rejection of updates that would delete their target. The unsigned Release build passed before the retention review fixes; those fixes were built and tested in Debug.
The exact-search fixture gave median times of 6.9 ms for 200 documents and 33.5 ms for 999 documents, across ten Debug measurements. Each document has about 6,000 characters. These figures exclude fixture creation and UI rendering.
Manual popup, image navigation memory, and idle CPU measurements are still required. The new controls have not had a manual visual check. SwiftData saves remain on the main actor. The byte limit covers stored content and search text; SQLite files and indexes can use additional space. New UI text uses English fallback until translations are added. Runtime checks on macOS 14 are not included in this local run.