Parent: #398
Depends on: Context Builder MVP. If line slicing/code maps are not done yet, profile fields can be versioned placeholders and remain empty.
Goal
Let users save and reapply named context presets: selected paths, slices when available, section choices, and an optional instruction template.
Implementation Notes
Persist profiles in SQLite through SessionMetadataStore using an append-only migration. Do not use UserDefaults for this state.
Suggested model:
- id
- name
- schemaVersion
- selection
- section order / disabled sections
- instruction template
- updatedAt
On apply, validate paths against the current repository and show missing paths without failing the whole profile.
Acceptance Criteria
- User can save a curated context profile.
- User can apply a saved profile in the launcher.
- Restarting the app preserves profiles.
- Applying a profile with missing files applies the valid subset and reports missing paths.
- Migration preserves existing
SessionMetadataStore data.
Tests
Add store tests for save/list/update/delete as applicable and a migration-preservation test that seeds the current baseline DB and proves existing rows survive migration.
Parent: #398
Depends on: Context Builder MVP. If line slicing/code maps are not done yet, profile fields can be versioned placeholders and remain empty.
Goal
Let users save and reapply named context presets: selected paths, slices when available, section choices, and an optional instruction template.
Implementation Notes
Persist profiles in SQLite through
SessionMetadataStoreusing an append-only migration. Do not useUserDefaultsfor this state.Suggested model:
On apply, validate paths against the current repository and show missing paths without failing the whole profile.
Acceptance Criteria
SessionMetadataStoredata.Tests
Add store tests for save/list/update/delete as applicable and a migration-preservation test that seeds the current baseline DB and proves existing rows survive migration.