Skip to content

v1.5.1: Remove Profiles and Semantic Search - #1

Merged
slavashootit merged 5 commits into
mainfrom
v1.5.1-cleanup
May 21, 2026
Merged

v1.5.1: Remove Profiles and Semantic Search#1
slavashootit merged 5 commits into
mainfrom
v1.5.1-cleanup

Conversation

@slavashootit

@slavashootit slavashootit commented May 21, 2026

Copy link
Copy Markdown
Owner

Summary

Pure cleanup PR — removes Profile system and Semantic Search entirely from the codebase. No new features, no visual changes.

Deleted Files (3)

  • Sources/SmartFileSorter/Models/ProfileManager.swift
  • Sources/SmartFileSorter/Models/SemanticSearchEngine.swift
  • Sources/SmartFileSorter/Views/SemanticSearchView.swift

Modified Files (14)

File Change
App.swift Removed ProfileManager.shared init
MainView.swift Removed profile picker + semantic nav link/route
MenuBarView.swift Removed profile picker + @ObservedObject
WatcherViewModel.swift Removed ProfileManager subscription, Combine import, profileName from batch
RuleEngine.swift Removed currentProfile, renamed rules_Home.jsonrules.json + migration
FSEventsWatcher.swift Removed activeProfile, watcher_paths key + migration from legacy _Home
ScheduleManager.swift Removed activeProfile, direct watcher_paths key
SorterEngine.swift Removed activeProfile + profileName from 2 batch sites
HistoryManager.swift Removed BatchRecord.profileName, profile_name column, DROP COLUMN migration
DashboardView.swift Removed profile column from CSV export
OnboardingView.swift Renamed createInitialProfile()createInitialRule()
CHANGELOG.md Expanded v1.5.1 entry with ### Changed section
SorterEngineTests.swift Removed profileName argument
docs/specs/... Updated design spec with revised acceptance criteria

NLContextualEmbedding Decision

REMOVED — 0 callsites found. SemanticSearchEngine was the only consumer; file deleted entirely.

Migrations (run on first launch after upgrade)

Legacy artifact Action
rules_Home.json moveItemrules.json
watcher_paths_Home UD key Copy → watcher_paths, remove old key
profile_name SQLite column ALTER TABLE DROP COLUMN
embeddings SQLite table DROP TABLE IF EXISTS
profiles.json on disk Silently ignored

Review Feedback Addressed (Round 2)

What changed

  1. rules_Home.jsonrules.json — RuleEngine now uses rules.json with migration from legacy name
  2. watcher_paths_Homewatcher_paths — FSEventsWatcher migrates on restore, removes old key
  3. activeProfile eliminated — removed from FSEventsWatcher, ScheduleManager, SorterEngine, HistoryManager (was hardcoded to "Home")
  4. BatchRecord.profileName deleted — field, init param, CodingKeys, decoder, SQLite column, INSERT/SELECT queries, CSV export column
  5. Test fixedprofileName: nil → argument removed entirely
  6. CHANGELOG expanded — ### Changed section added
  7. Design spec updated — revised acceptance criteria with migration table

Grep Evidence

$ grep -rin "activeProfile\|currentProfile" Sources/
(0 results) ✅

$ grep -rin "ProfileManager" Sources/ Tests/
(0 results) ✅

$ grep -rin "SemanticSearch" Sources/ Tests/
(0 results) ✅

$ grep -rin "profile" Sources/ --include="*.swift"
HistoryManager.swift:146: // v1.5.1 migration: drop profile_name column
HistoryManager.swift:148: try? execute(sql: "ALTER TABLE batches DROP COLUMN profile_name;")
(2 results — migration SQL only) ✅

$ grep -rin "_Home" Sources/ --include="*.swift"
RuleEngine.swift:130-135: migration code (rules_Home.json → rules.json)
FSEventsWatcher.swift:108-113: migration code (watcher_paths_Home → watcher_paths)
(migration code only — reads legacy keys to delete them) ✅

Stats

  • 18 files changed across all commits
  • 0 errors, 0 warnings on swift build

DELETED FILES:
- Sources/SmartFileSorter/Models/ProfileManager.swift
- Sources/SmartFileSorter/Models/SemanticSearchEngine.swift
- Sources/SmartFileSorter/Views/SemanticSearchView.swift

MODIFIED FILES:
- App.swift: removed ProfileManager.shared init
- MainView.swift: removed profile picker section + semantic nav link + route
- MenuBarView.swift: removed profile picker + profileManager property
- WatcherViewModel.swift: removed ProfileManager subscription + Combine import
- RuleEngine.swift: removed currentProfile computed property, hardcoded 'Home'
- FSEventsWatcher.swift: hardcoded activeProfile='Home', cleaned log messages
- ScheduleManager.swift: hardcoded activeProfile='Home'
- SorterEngine.swift: hardcoded activeProfile='Home'
- HistoryManager.swift: hardcoded activeProfile='Home', added DROP TABLE migration
- OnboardingView.swift: renamed createInitialProfile -> createInitialRule
- CHANGELOG.md: added v1.5.1 entry
- Tests/SorterEngineTests.swift: profileName='TestProfile' -> nil

NLContextualEmbedding DECISION: REMOVED (0 callsites found in entire codebase)

MIGRATION:
- profiles.json on disk: silently ignored (never read)
- embeddings SQLite table: DROP TABLE IF EXISTS in HistoryManager migration
- watcher_paths_Home key: continues working (backward compatible)
- BatchRecord.profileName field: KEPT for data compatibility
- RuleEngine.rulesFileURL now points to 'rules.json'
- On launch, if rules_Home.json exists but rules.json does not,
  FileManager.moveItem migrates the file and logs once
Removed from 8 files:
- FSEventsWatcher: activeProfile → direct 'watcher_paths' key + migration
- ScheduleManager: activeProfile → direct 'watcher_paths' key
- SorterEngine: removed activeProfile + profileName from 2 batch sites
- WatcherViewModel: removed profileName from batch creation
- HistoryManager: removed BatchRecord.profileName field, SQLite column,
  INSERT/SELECT queries updated, ALTER TABLE DROP COLUMN migration added
- DashboardView: removed profile column from CSV export
- SorterEngineTests: removed profileName argument

Migration additions:
- FSEventsWatcher: watcher_paths_Home → watcher_paths (copy + remove old)
- HistoryManager: ALTER TABLE batches DROP COLUMN profile_name (SQLite 3.35+)

Grep evidence:
- activeProfile|currentProfile: 0 results
- ProfileManager: 0 results
- 'profile' in Sources: only migration code (DROP COLUMN, legacy key refs)
- '_Home' in Sources: only migration code (rules_Home.json, watcher_paths_Home)
CHANGELOG v1.5.1:
- Added ### Changed section (rules.json rename, watcher_paths rename, CSV)
- Updated ### Removed to include BatchRecord.profileName
- Updated ### Notes to reflect migration-only references

Design spec updated with:
- Revised acceptance criteria (stricter)
- Migration table
- Exception list for grep results
@slavashootit
slavashootit merged commit 533e6e0 into main May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant