Skip to content

Commit 478599c

Browse files
Merge pull request #6 from RecapAI/add-onboarding-process
feature: add onboarding process with a bit of refactor
2 parents 16306f2 + ce4862b commit 478599c

File tree

82 files changed

+2981
-422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2981
-422
lines changed

.github/workflows/linter.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run SwiftLint
1+
name: Build and Lint
22

33
on:
44
push:
@@ -11,6 +11,7 @@ jobs:
1111
lint:
1212
name: SwiftLint
1313
runs-on: macos-15
14+
if: github.event.pull_request.draft == false
1415

1516
steps:
1617
- name: Checkout code
@@ -27,6 +28,7 @@ jobs:
2728
build:
2829
name: Build
2930
runs-on: macos-15
31+
if: github.event.pull_request.draft == false
3032

3133
steps:
3234
- name: Checkout code
@@ -51,7 +53,7 @@ jobs:
5153
-project Recap.xcodeproj \
5254
-scheme Recap
5355
54-
- name: Build Debug
56+
- name: Build Project
5557
run: |
5658
xcodebuild build \
5759
-project Recap.xcodeproj \
@@ -75,6 +77,7 @@ jobs:
7577
name: Test
7678
runs-on: macos-15
7779
needs: build
80+
if: github.event.pull_request.draft == false
7881

7982
steps:
8083
- name: Checkout code

.github/workflows/pr-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
test:
1313
name: Test PR
1414
runs-on: macos-15
15+
if: github.event.pull_request.draft == false
1516

1617
steps:
1718
- name: Checkout code

Recap.xcodeproj/project.pbxproj

Lines changed: 30 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,11 @@
2323
remoteGlobalIDString = A72106512E3016590073C515;
2424
remoteInfo = Recap;
2525
};
26-
A721066B2E30165B0073C515 /* PBXContainerItemProxy */ = {
27-
isa = PBXContainerItemProxy;
28-
containerPortal = A721064A2E3016590073C515 /* Project object */;
29-
proxyType = 1;
30-
remoteGlobalIDString = A72106512E3016590073C515;
31-
remoteInfo = Recap;
32-
};
3326
/* End PBXContainerItemProxy section */
3427

3528
/* Begin PBXFileReference section */
3629
A72106522E3016590073C515 /* Recap.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Recap.app; sourceTree = BUILT_PRODUCTS_DIR; };
3730
A72106602E30165B0073C515 /* RecapTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RecapTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
38-
A721066A2E30165B0073C515 /* RecapUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RecapUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3931
/* End PBXFileReference section */
4032

4133
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
@@ -46,10 +38,16 @@
4638
Audio/Models/AudioProcessGroup.swift,
4739
Audio/Processing/Detection/AudioProcessControllerType.swift,
4840
DataModels/RecapDataModel.xcdatamodeld,
41+
Helpers/Availability/AvailabilityHelper.swift,
4942
"Helpers/Colors/Color+Extension.swift",
5043
Helpers/Constants/AppConstants.swift,
5144
Helpers/Constants/UIConstants.swift,
5245
Helpers/MeetingDetection/MeetingPatternMatcher.swift,
46+
Helpers/Permissions/PermissionsHelper.swift,
47+
Helpers/Permissions/PermissionsHelperType.swift,
48+
Repositories/LLMModels/LLMModelRepository.swift,
49+
Repositories/LLMModels/LLMModelRepositoryType.swift,
50+
Repositories/Models/LLMModelInfo.swift,
5351
Repositories/Models/LLMProvider.swift,
5452
Repositories/Models/RecordingInfo.swift,
5553
Repositories/Models/UserPreferencesInfo.swift,
@@ -58,7 +56,24 @@
5856
Repositories/UserPreferences/UserPreferencesRepository.swift,
5957
Repositories/UserPreferences/UserPreferencesRepositoryType.swift,
6058
Services/CoreData/CoreDataManagerType.swift,
59+
Services/Keychain/KeychainAPIValidator.swift,
60+
Services/Keychain/KeychainAPIValidatorType.swift,
61+
Services/Keychain/KeychainService.swift,
62+
"Services/Keychain/KeychainService+Extensions.swift",
63+
Services/Keychain/KeychainServiceType.swift,
6164
Services/LLM/Core/LLMError.swift,
65+
Services/LLM/Core/LLMModelType.swift,
66+
Services/LLM/Core/LLMOptions.swift,
67+
Services/LLM/Core/LLMProviderType.swift,
68+
Services/LLM/Core/LLMTaskManageable.swift,
69+
Services/LLM/LLMService.swift,
70+
Services/LLM/LLMServiceType.swift,
71+
Services/LLM/Providers/Ollama/OllamaAPIClient.swift,
72+
Services/LLM/Providers/Ollama/OllamaModel.swift,
73+
Services/LLM/Providers/Ollama/OllamaProvider.swift,
74+
Services/LLM/Providers/OpenRouter/OpenRouterAPIClient.swift,
75+
Services/LLM/Providers/OpenRouter/OpenRouterModel.swift,
76+
Services/LLM/Providers/OpenRouter/OpenRouterProvider.swift,
6277
Services/MeetingDetection/Core/MeetingDetectionService.swift,
6378
Services/MeetingDetection/Core/MeetingDetectionServiceType.swift,
6479
Services/MeetingDetection/Detectors/GoogleMeetDetector.swift,
@@ -76,12 +91,18 @@
7691
Services/Summarization/Models/SummarizationResult.swift,
7792
Services/Summarization/SummarizationServiceType.swift,
7893
Services/Transcription/TranscriptionServiceType.swift,
79-
Services/Warnings/WarningManagerType.swift,
94+
Services/Utilities/Warnings/ProviderWarningCoordinator.swift,
95+
Services/Utilities/Warnings/WarningManager.swift,
96+
Services/Utilities/Warnings/WarningManagerType.swift,
8097
UIComponents/Buttons/PillButton.swift,
8198
UIComponents/Cards/ActionableWarningCard.swift,
99+
UseCases/Onboarding/ViewModel/OnboardingViewModel.swift,
100+
UseCases/Onboarding/ViewModel/OnboardingViewModelType.swift,
82101
UseCases/Settings/Components/MeetingDetection/MeetingDetectionView.swift,
83102
UseCases/Settings/Components/Reusable/CustomToggle.swift,
84103
UseCases/Settings/Components/SettingsCard.swift,
104+
UseCases/Settings/ViewModels/General/GeneralSettingsViewModel.swift,
105+
UseCases/Settings/ViewModels/General/GeneralSettingsViewModelType.swift,
85106
UseCases/Settings/ViewModels/MeetingDetection/MeetingDetectionSettingsViewModel.swift,
86107
UseCases/Settings/ViewModels/MeetingDetection/MeetingDetectionSettingsViewModelType.swift,
87108
UseCases/Summary/Components/ProcessingProgressBar.swift,
@@ -130,13 +151,6 @@
130151
);
131152
runOnlyForDeploymentPostprocessing = 0;
132153
};
133-
A72106672E30165B0073C515 /* Frameworks */ = {
134-
isa = PBXFrameworksBuildPhase;
135-
buildActionMask = 2147483647;
136-
files = (
137-
);
138-
runOnlyForDeploymentPostprocessing = 0;
139-
};
140154
/* End PBXFrameworksBuildPhase section */
141155

142156
/* Begin PBXGroup section */
@@ -154,7 +168,6 @@
154168
children = (
155169
A72106522E3016590073C515 /* Recap.app */,
156170
A72106602E30165B0073C515 /* RecapTests.xctest */,
157-
A721066A2E30165B0073C515 /* RecapUITests.xctest */,
158171
);
159172
name = Products;
160173
sourceTree = "<group>";
@@ -213,26 +226,6 @@
213226
productReference = A72106602E30165B0073C515 /* RecapTests.xctest */;
214227
productType = "com.apple.product-type.bundle.unit-test";
215228
};
216-
A72106692E30165B0073C515 /* RecapUITests */ = {
217-
isa = PBXNativeTarget;
218-
buildConfigurationList = A721067A2E30165B0073C515 /* Build configuration list for PBXNativeTarget "RecapUITests" */;
219-
buildPhases = (
220-
A72106662E30165B0073C515 /* Sources */,
221-
A72106672E30165B0073C515 /* Frameworks */,
222-
A72106682E30165B0073C515 /* Resources */,
223-
);
224-
buildRules = (
225-
);
226-
dependencies = (
227-
A721066C2E30165B0073C515 /* PBXTargetDependency */,
228-
);
229-
name = RecapUITests;
230-
packageProductDependencies = (
231-
);
232-
productName = RecapUITests;
233-
productReference = A721066A2E30165B0073C515 /* RecapUITests.xctest */;
234-
productType = "com.apple.product-type.bundle.ui-testing";
235-
};
236229
/* End PBXNativeTarget section */
237230

238231
/* Begin PBXProject section */
@@ -250,10 +243,6 @@
250243
CreatedOnToolsVersion = 16.4;
251244
TestTargetID = A72106512E3016590073C515;
252245
};
253-
A72106692E30165B0073C515 = {
254-
CreatedOnToolsVersion = 16.4;
255-
TestTargetID = A72106512E3016590073C515;
256-
};
257246
};
258247
};
259248
buildConfigurationList = A721064D2E3016590073C515 /* Build configuration list for PBXProject "Recap" */;
@@ -278,7 +267,6 @@
278267
targets = (
279268
A72106512E3016590073C515 /* Recap */,
280269
A721065F2E30165B0073C515 /* RecapTests */,
281-
A72106692E30165B0073C515 /* RecapUITests */,
282270
);
283271
};
284272
/* End PBXProject section */
@@ -298,13 +286,6 @@
298286
);
299287
runOnlyForDeploymentPostprocessing = 0;
300288
};
301-
A72106682E30165B0073C515 /* Resources */ = {
302-
isa = PBXResourcesBuildPhase;
303-
buildActionMask = 2147483647;
304-
files = (
305-
);
306-
runOnlyForDeploymentPostprocessing = 0;
307-
};
308289
/* End PBXResourcesBuildPhase section */
309290

310291
/* Begin PBXSourcesBuildPhase section */
@@ -322,13 +303,6 @@
322303
);
323304
runOnlyForDeploymentPostprocessing = 0;
324305
};
325-
A72106662E30165B0073C515 /* Sources */ = {
326-
isa = PBXSourcesBuildPhase;
327-
buildActionMask = 2147483647;
328-
files = (
329-
);
330-
runOnlyForDeploymentPostprocessing = 0;
331-
};
332306
/* End PBXSourcesBuildPhase section */
333307

334308
/* Begin PBXTargetDependency section */
@@ -337,11 +311,6 @@
337311
target = A72106512E3016590073C515 /* Recap */;
338312
targetProxy = A72106612E30165B0073C515 /* PBXContainerItemProxy */;
339313
};
340-
A721066C2E30165B0073C515 /* PBXTargetDependency */ = {
341-
isa = PBXTargetDependency;
342-
target = A72106512E3016590073C515 /* Recap */;
343-
targetProxy = A721066B2E30165B0073C515 /* PBXContainerItemProxy */;
344-
};
345314
/* End PBXTargetDependency section */
346315

347316
/* Begin XCBuildConfiguration section */
@@ -567,40 +536,6 @@
567536
};
568537
name = Release;
569538
};
570-
A721067B2E30165B0073C515 /* Debug */ = {
571-
isa = XCBuildConfiguration;
572-
buildSettings = {
573-
CODE_SIGN_STYLE = Automatic;
574-
CURRENT_PROJECT_VERSION = 1;
575-
DEVELOPMENT_TEAM = EY7EQX6JC5;
576-
GENERATE_INFOPLIST_FILE = YES;
577-
MACOSX_DEPLOYMENT_TARGET = 15.0;
578-
MARKETING_VERSION = 1.0;
579-
PRODUCT_BUNDLE_IDENTIFIER = dev.rawa.RecapUITests;
580-
PRODUCT_NAME = "$(TARGET_NAME)";
581-
SWIFT_EMIT_LOC_STRINGS = NO;
582-
SWIFT_VERSION = 5.0;
583-
TEST_TARGET_NAME = Recap;
584-
};
585-
name = Debug;
586-
};
587-
A721067C2E30165B0073C515 /* Release */ = {
588-
isa = XCBuildConfiguration;
589-
buildSettings = {
590-
CODE_SIGN_STYLE = Automatic;
591-
CURRENT_PROJECT_VERSION = 1;
592-
DEVELOPMENT_TEAM = EY7EQX6JC5;
593-
GENERATE_INFOPLIST_FILE = YES;
594-
MACOSX_DEPLOYMENT_TARGET = 15.0;
595-
MARKETING_VERSION = 1.0;
596-
PRODUCT_BUNDLE_IDENTIFIER = dev.rawa.RecapUITests;
597-
PRODUCT_NAME = "$(TARGET_NAME)";
598-
SWIFT_EMIT_LOC_STRINGS = NO;
599-
SWIFT_VERSION = 5.0;
600-
TEST_TARGET_NAME = Recap;
601-
};
602-
name = Release;
603-
};
604539
/* End XCBuildConfiguration section */
605540

606541
/* Begin XCConfigurationList section */
@@ -631,15 +566,6 @@
631566
defaultConfigurationIsVisible = 0;
632567
defaultConfigurationName = Release;
633568
};
634-
A721067A2E30165B0073C515 /* Build configuration list for PBXNativeTarget "RecapUITests" */ = {
635-
isa = XCConfigurationList;
636-
buildConfigurations = (
637-
A721067B2E30165B0073C515 /* Debug */,
638-
A721067C2E30165B0073C515 /* Release */,
639-
);
640-
defaultConfigurationIsVisible = 0;
641-
defaultConfigurationName = Release;
642-
};
643569
/* End XCConfigurationList section */
644570

645571
/* Begin XCRemoteSwiftPackageReference section */

Recap.xctestplan

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"configurations" : [
3+
{
4+
"id" : "16849F79-ACBC-4890-8336-EF7543A98E8A",
5+
"name" : "Test Scheme Action",
6+
"options" : {
7+
8+
}
9+
}
10+
],
11+
"defaultOptions" : {
12+
"targetForVariableExpansion" : {
13+
"containerPath" : "container:Recap.xcodeproj",
14+
"identifier" : "A72106512E3016590073C515",
15+
"name" : "Recap"
16+
}
17+
},
18+
"testTargets" : [
19+
{
20+
"parallelizable" : true,
21+
"target" : {
22+
"containerPath" : "container:Recap.xcodeproj",
23+
"identifier" : "A721065F2E30165B0073C515",
24+
"name" : "RecapTests"
25+
}
26+
},
27+
{
28+
"parallelizable" : true,
29+
"target" : {
30+
"containerPath" : "container:Recap.xcodeproj",
31+
"identifier" : "A72106692E30165B0073C515",
32+
"name" : "RecapUITests"
33+
}
34+
}
35+
],
36+
"version" : 1
37+
}

Recap/Audio/Capture/MicrophoneCapture.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,6 @@ final class MicrophoneCapture: MicrophoneCaptureType {
3939
cleanup()
4040
}
4141

42-
func requestPermission() async -> Bool {
43-
await withCheckedContinuation { continuation in
44-
AVCaptureDevice.requestAccess(for: .audio) { granted in
45-
self.logger.info("Microphone permission granted: \(granted)")
46-
continuation.resume(returning: granted)
47-
}
48-
}
49-
}
50-
5142
func start(outputURL: URL, targetFormat: AudioStreamBasicDescription? = nil) throws {
5243
self.outputURL = outputURL
5344

Recap/Audio/Capture/MicrophoneCaptureType.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import AudioToolbox
1212
protocol MicrophoneCaptureType: ObservableObject {
1313
var audioLevel: Float { get }
1414
var recordingFormat: AVAudioFormat? { get }
15-
16-
func requestPermission() async -> Bool
15+
1716
func start(outputURL: URL, targetFormat: AudioStreamBasicDescription?) throws
1817
func stop()
1918
}

Recap/Audio/Processing/AudioRecordingCoordinator/AudioRecordingCoordinator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ final class AudioRecordingCoordinator: AudioRecordingCoordinatorType {
66
private let logger = Logger(subsystem: AppConstants.Logging.subsystem, category: String(describing: AudioRecordingCoordinator.self))
77

88
private let configuration: RecordingConfiguration
9-
private let microphoneCapture: MicrophoneCapture?
9+
private let microphoneCapture: MicrophoneCaptureType?
1010
private let processTap: ProcessTap
1111

1212
private var isRunning = false
1313
private var tapRecorder: ProcessTapRecorder?
1414

1515
init(
1616
configuration: RecordingConfiguration,
17-
microphoneCapture: MicrophoneCapture?,
17+
microphoneCapture: MicrophoneCaptureType?,
1818
processTap: ProcessTap
1919
) {
2020
self.configuration = configuration

0 commit comments

Comments
 (0)