Repository navigation
Improve macOS launcher, document search, and file browsing - #3
Shriprasad-P wants to merge 8 commits into
Conversation
|
change the hardcoded hotkey to customizable person wise. |
|
Implemented the requested per-user customizable hotkey in commit 7837989. The shortcut setting is available from both the existing slider-style Settings button in the app and the native SmartStackUI → Settings… menu (⌘,). It persists per user, applies immediately, reports registration conflicts, and can be reset to Option+Space. Verified by building/installing the native app and running all 76 tests successfully. |
|
Follow-up UI refinement in d98a54e: removed the Settings icon/popover from the main console and moved every option it contained into the native SmartStackUI → Settings… window. This now includes search mode, file filter, Top K, minimum score, visual/browse actions, history clearing, watched folders, exclusions, ingestion, maintenance, and the customizable global shortcut. Native build succeeds and all 76 tests pass. |
githubbermoon
left a comment
There was a problem hiding this comment.
Thanks for the substantial work here. The document ingestion/search direction and customizable launcher shortcut are useful, and I verified that the full Python suite passes (76 tests) and git diff --check is clean. I am requesting changes for the following issues before merge.
1. Prevent image-only verification from penalizing document results
MultimodalSearchEngine currently passes the complete result set to verify_candidates(). That verifier assumes every candidate is an image and calls VLMAnalyzer.generate_text(Path(image_path), ...). For PDF, DOCX, TXT, and other document results, this fails and the exception is converted into the default satisfies=false payload. The search engine subsequently multiplies that document's score by 0.35.
This can demote or hide correct document matches whenever constrained-query verification runs. Please either:
- send only
content_type == "image"candidates to the image verifier and leave unverified document scores unchanged; or - implement a separate text-based verification path for documents.
Please add a regression test covering a constrained query whose leading results include documents and confirm those documents are not treated as failed image verifications.
Relevant areas: mm_stack/search_engine.py around lines 732–749 and mm_stack/verification.py around lines 47–95.
2. Make document replacement failure-safe
Document chunks are persisted and committed individually inside _process_candidates(), while obsolete chunks are removed only when added == len(candidates). If embedding or persistence fails partway through re-indexing an edited document, the index can expose a mixture of current and obsolete chunks/vectors.
Please make replacement atomic from the user's perspective. For example, stage the complete new chunk/vector set and swap it only after every chunk succeeds, or remove/roll back newly written chunks when the replacement fails. SQLite and LanceDB cleanup should remain consistent if either side fails.
Please add a failure-path test that begins with an indexed multi-chunk document, forces a middle-chunk failure during re-indexing, and verifies that search sees either the complete old version or the complete new version—never a mixed version.
Relevant area: mm_stack/ingestion.py around lines 250–324.
3. Resolve the installed-app memory-watchdog regression
The installer now copies the native Swift executable directly into the app bundle. This fixes LaunchServices activation/reopen behavior, but it also removes the previous launcher's automatic memory-pressure watchdog and process-count kill switch. The remaining Emergency Kill action is manual and may not be reachable if model work has already made the UI or machine unresponsive.
Please either restore equivalent automatic protection through a native/helper mechanism, or explicitly document and justify removal of the automatic watchdog as an accepted product decision. The guarded ingestion startup check alone does not cover search/chat model processes after launch.
Relevant area: SmartStackUI/install_app.sh around lines 75–85.
Verification note
There are no GitHub CI checks on this PR. I reproduced all 76 passing Python tests. I could not independently complete the Swift build on the current machine because its Command Line Tools compiler and SDK versions conflict (Swift 6.1 compiler versus 6.0.3 SDK/module interfaces); this appears environmental rather than a demonstrated PR code failure. Please keep the successful native-build evidence in the PR and, if practical, add a CI or repeatable build check on a matching macOS toolchain.
Once items 1 and 2 are fixed and item 3 is explicitly resolved, this should be in a much safer state to merge.
|
Please also rename the source branch to |
|
The repository now separates image and document development while keeping one stable product. I have changed this pull request's base to Please update this pull request as follows before requesting another review: Keep this pull request document-focusedRetain document extraction, chunking, metadata, text embeddings, mixed-content retrieval, document browsing, and document-specific UI required to expose those results. Move unrelated global-shortcut, settings-window, launcher, and general application-lifecycle changes into a separate pull request based on Use the documented content boundariesSynchronize this branch with
Make replacement atomicAn edited document must be reindexed as one logical operation. Stage all extracted chunks, SQLite records, and LanceDB vectors before making the new generation visible. On any extraction, embedding, or persistence failure, search must continue seeing the complete previous generation. Add cleanup or reconciliation for abandoned staged data. Required regression coverage:
Dependencies and repository checksUpdate Please rename the source branch to a descriptive product name such as The earlier requested changes remain applicable. The earlier note that repository checks were unavailable is now superseded by the protected checks on this document integration branch. |
What changed
Option+Spaceand keep the compact palette exclusive to that shortcut.Option+Spacecommand palette.pypdfand the previously missingeinopsruntime dependency declarations.Why
Smart Stack previously focused its gallery and ingestion workflow on images. Documents could not be indexed through the same local search pipeline, and the only browse action was All Photos, making non-image content impossible to inspect. The macOS launcher also needed reliable application activation, a conflict-free shortcut, and clear reset controls.
This change reuses the existing local text-embedding and LanceDB architecture so images and documents can be searched together without introducing a separate database or cloud service.
User impact
Users can drag supported files or whole mixed folders into Smart Stack, retrieve document passages by meaning or keywords, use those passages in grounded chat, browse all indexed files, or switch to an image-only gallery. Multi-page documents appear once in the library while their individual chunks remain available to search.
Selectable-text PDFs are supported. Image-only scanned PDFs still require a future OCR pass.
Validation
./local_run.sh --build-only --force-build./Users/shriprasad/Applications/SmartStackUI.appsuccessfully.content_type=documentand section metadata.photos-list --content-type allreturns each indexed document once.git diff --checkpassed.