catalyst-core 0.0.3-canary.17 → 0.0.3-canary.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/native/androidProject/app/.editorconfig +17 -0
  2. package/dist/native/androidProject/app/detekt-config.yml +562 -0
  3. package/dist/native/androidProject/app/src/main/assets/webview_config.properties +30 -0
  4. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/CustomWebview.kt +29 -35
  5. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/MainActivity.kt +3 -10
  6. package/dist/native/androidProject/splashscreen_fallback_original.avif +0 -0
  7. package/dist/native/iosnativeWebView/iosnativeWebView/BootTimingUtility.swift +26 -0
  8. package/dist/native/iosnativeWebView/iosnativeWebView/BridgeCommandHandler.swift +312 -0
  9. package/dist/native/iosnativeWebView/iosnativeWebView/BridgeDelegateHandler.swift +166 -0
  10. package/dist/native/iosnativeWebView/iosnativeWebView/BridgeFileHandler.swift +340 -0
  11. package/dist/native/iosnativeWebView/iosnativeWebView/BridgeJavaScriptInterface.swift +141 -0
  12. package/dist/native/iosnativeWebView/iosnativeWebView/BridgeMessageValidator.swift +509 -0
  13. package/dist/native/iosnativeWebView/iosnativeWebView/CacheManager.swift +272 -0
  14. package/dist/native/iosnativeWebView/iosnativeWebView/CameraTransportUtils.swift +363 -0
  15. package/dist/native/iosnativeWebView/iosnativeWebView/CatalystConstants.swift +91 -0
  16. package/dist/native/iosnativeWebView/iosnativeWebView/ConfigConstants.swift +7 -0
  17. package/dist/native/iosnativeWebView/iosnativeWebView/DeviceInfoUtils.swift +75 -0
  18. package/dist/native/iosnativeWebView/iosnativeWebView/FilePickerHandler.swift +938 -0
  19. package/dist/native/iosnativeWebView/iosnativeWebView/FrameworkServerUtils.swift +821 -0
  20. package/dist/native/iosnativeWebView/iosnativeWebView/ImageHandler.swift +461 -0
  21. package/dist/native/iosnativeWebView/iosnativeWebView/NativeBridge.swift +185 -0
  22. package/dist/native/iosnativeWebView/iosnativeWebView/ResourceURLProtocol.swift +146 -0
  23. package/dist/native/iosnativeWebView/iosnativeWebView/SplashView.swift +91 -0
  24. package/dist/native/iosnativeWebView/iosnativeWebView/SplashViewModel.swift +86 -0
  25. package/dist/native/iosnativeWebView/iosnativeWebView/URLWhitelistManager.swift +238 -0
  26. package/dist/native/iosnativeWebView/iosnativeWebView/WebView.swift +151 -0
  27. package/dist/native/iosnativeWebView/iosnativeWebView/WebViewModel.swift +47 -0
  28. package/dist/native/iosnativeWebView/iosnativeWebView/WebViewNavigationDelegate.swift +237 -0
  29. package/package.json +1 -1
  30. package/dist/native/iosnativeWebView/.swiftpm/xcode/xcuserdata/mayansharma.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  31. package/dist/native/iosnativeWebView/iosnativeWebView.xcodeproj/project.xcworkspace/xcuserdata/mayansharma.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  32. package/dist/native/iosnativeWebView/iosnativeWebView.xcodeproj/xcuserdata/mayansharma.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
@@ -0,0 +1,17 @@
1
+ # EditorConfig configuration for ktlint
2
+ # https://editorconfig.org
3
+
4
+ root = true
5
+
6
+ [*.{kt,kts}]
7
+ charset = utf-8
8
+ end_of_line = lf
9
+ indent_size = 4
10
+ indent_style = space
11
+ insert_final_newline = true
12
+ max_line_length = 120
13
+ tab_width = 4
14
+ trim_trailing_whitespace = true
15
+
16
+ [*.{json,xml,yml,yaml}]
17
+ indent_size = 2
@@ -0,0 +1,562 @@
1
+ # Detekt Configuration
2
+ # https://detekt.dev/docs/introduction/configurations/
3
+
4
+ build:
5
+ maxIssues: 0
6
+ excludeCorrectable: false
7
+ weights:
8
+ complexity: 2
9
+ LongParameterList: 1
10
+ style: 1
11
+ comments: 1
12
+
13
+ config:
14
+ validation: true
15
+ warningsAsErrors: false
16
+ checkExhaustiveness: false
17
+
18
+ processors:
19
+ active: true
20
+
21
+ console-reports:
22
+ active: true
23
+
24
+ output-reports:
25
+ active: true
26
+ exclude:
27
+ - 'TxtOutputReport'
28
+ - 'SarifOutputReport'
29
+
30
+ comments:
31
+ active: true
32
+ AbsentOrWrongFileLicense:
33
+ active: false
34
+ CommentOverPrivateFunction:
35
+ active: false
36
+ CommentOverPrivateProperty:
37
+ active: false
38
+ DeprecatedBlockTag:
39
+ active: true
40
+ EndOfSentenceFormat:
41
+ active: false
42
+ OutdatedDocumentation:
43
+ active: false
44
+ UndocumentedPublicClass:
45
+ active: false
46
+ UndocumentedPublicFunction:
47
+ active: false
48
+ UndocumentedPublicProperty:
49
+ active: false
50
+
51
+ complexity:
52
+ active: true
53
+ ComplexCondition:
54
+ active: true
55
+ threshold: 4
56
+ ComplexInterface:
57
+ active: false
58
+ CyclomaticComplexMethod:
59
+ active: true
60
+ threshold: 15
61
+ ignoreSingleWhenExpression: false
62
+ ignoreSimpleWhenEntries: false
63
+ ignoreNestingFunctions: false
64
+ LabeledExpression:
65
+ active: false
66
+ LargeClass:
67
+ active: true
68
+ threshold: 600
69
+ LongMethod:
70
+ active: true
71
+ threshold: 60
72
+ LongParameterList:
73
+ active: true
74
+ functionThreshold: 6
75
+ constructorThreshold: 7
76
+ ignoreDefaultParameters: false
77
+ ignoreDataClasses: true
78
+ ignoreAnnotatedParameter: []
79
+ MethodOverloading:
80
+ active: false
81
+ NamedArguments:
82
+ active: false
83
+ NestedBlockDepth:
84
+ active: true
85
+ threshold: 4
86
+ NestedScopeFunctions:
87
+ active: false
88
+ ReplaceSafeCallChainWithRun:
89
+ active: false
90
+ StringLiteralDuplication:
91
+ active: false
92
+ TooManyFunctions:
93
+ active: true
94
+ thresholdInFiles: 15
95
+ thresholdInClasses: 15
96
+ thresholdInInterfaces: 15
97
+ thresholdInObjects: 15
98
+ thresholdInEnums: 11
99
+ ignoreDeprecated: false
100
+ ignorePrivate: false
101
+ ignoreOverridden: false
102
+
103
+ coroutines:
104
+ active: true
105
+ GlobalCoroutineUsage:
106
+ active: false
107
+ InjectDispatcher:
108
+ active: false
109
+ RedundantSuspendModifier:
110
+ active: true
111
+ SleepInsteadOfDelay:
112
+ active: true
113
+ SuspendFunSwallowedCancellation:
114
+ active: false
115
+ SuspendFunWithCoroutineScopeReceiver:
116
+ active: false
117
+ SuspendFunWithFlowReturnType:
118
+ active: true
119
+
120
+ empty-blocks:
121
+ active: true
122
+ EmptyCatchBlock:
123
+ active: true
124
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
125
+ EmptyClassBlock:
126
+ active: true
127
+ EmptyDefaultConstructor:
128
+ active: true
129
+ EmptyDoWhileBlock:
130
+ active: true
131
+ EmptyElseBlock:
132
+ active: true
133
+ EmptyFinallyBlock:
134
+ active: true
135
+ EmptyForBlock:
136
+ active: true
137
+ EmptyFunctionBlock:
138
+ active: true
139
+ ignoreOverridden: false
140
+ EmptyIfBlock:
141
+ active: true
142
+ EmptyInitBlock:
143
+ active: true
144
+ EmptyKtFile:
145
+ active: true
146
+ EmptySecondaryConstructor:
147
+ active: true
148
+ EmptyTryBlock:
149
+ active: true
150
+ EmptyWhenBlock:
151
+ active: true
152
+ EmptyWhileBlock:
153
+ active: true
154
+
155
+ exceptions:
156
+ active: true
157
+ ExceptionRaisedInUnexpectedLocation:
158
+ active: true
159
+ InstanceOfCheckForException:
160
+ active: true
161
+ NotImplementedDeclaration:
162
+ active: false
163
+ ObjectExtendsThrowable:
164
+ active: false
165
+ PrintStackTrace:
166
+ active: true
167
+ RethrowCaughtException:
168
+ active: true
169
+ ReturnFromFinally:
170
+ active: true
171
+ SwallowedException:
172
+ active: true
173
+ ignoredExceptionTypes:
174
+ - 'InterruptedException'
175
+ - 'MalformedURLException'
176
+ - 'NumberFormatException'
177
+ - 'ParseException'
178
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
179
+ ThrowingExceptionFromFinally:
180
+ active: true
181
+ ThrowingExceptionInMain:
182
+ active: false
183
+ ThrowingExceptionsWithoutMessageOrCause:
184
+ active: true
185
+ ThrowingNewInstanceOfSameException:
186
+ active: true
187
+ TooGenericExceptionCaught:
188
+ active: true
189
+ exceptionNames:
190
+ - 'ArrayIndexOutOfBoundsException'
191
+ - 'Error'
192
+ - 'Exception'
193
+ - 'IllegalMonitorStateException'
194
+ - 'IndexOutOfBoundsException'
195
+ - 'NullPointerException'
196
+ - 'RuntimeException'
197
+ - 'Throwable'
198
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
199
+ TooGenericExceptionThrown:
200
+ active: true
201
+ exceptionNames:
202
+ - 'Error'
203
+ - 'Exception'
204
+ - 'RuntimeException'
205
+ - 'Throwable'
206
+
207
+ naming:
208
+ active: true
209
+ BooleanPropertyNaming:
210
+ active: false
211
+ ClassNaming:
212
+ active: true
213
+ classPattern: '[A-Z][a-zA-Z0-9]*'
214
+ ConstructorParameterNaming:
215
+ active: true
216
+ parameterPattern: '[a-z][A-Za-z0-9]*'
217
+ EnumNaming:
218
+ active: true
219
+ enumEntryPattern: '[A-Z][_A-Z0-9]*'
220
+ ForbiddenClassName:
221
+ active: false
222
+ FunctionMaxLength:
223
+ active: false
224
+ FunctionMinLength:
225
+ active: false
226
+ FunctionNaming:
227
+ active: true
228
+ functionPattern: '[a-z][a-zA-Z0-9]*'
229
+ excludeClassPattern: '$^'
230
+ ignoreAnnotated: ['Composable']
231
+ FunctionParameterNaming:
232
+ active: true
233
+ parameterPattern: '[a-z][A-Za-z0-9]*'
234
+ InvalidPackageDeclaration:
235
+ active: true
236
+ LambdaParameterNaming:
237
+ active: false
238
+ MatchingDeclarationName:
239
+ active: true
240
+ mustBeFirst: true
241
+ MemberNameEqualsClassName:
242
+ active: true
243
+ ignoreOverridden: true
244
+ NoNameShadowing:
245
+ active: true
246
+ NonBooleanPropertyPrefixedWithIs:
247
+ active: false
248
+ ObjectPropertyNaming:
249
+ active: true
250
+ constantPattern: '[A-Za-z][_A-Za-z0-9]*'
251
+ propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
252
+ privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
253
+ PackageNaming:
254
+ active: true
255
+ packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*'
256
+ TopLevelPropertyNaming:
257
+ active: true
258
+ constantPattern: '[A-Z][_A-Z0-9]*'
259
+ propertyPattern: '[A-Z][_A-Z0-9]*'
260
+ privatePropertyPattern: '_?[A-Z][_A-Z0-9]*'
261
+ VariableMaxLength:
262
+ active: false
263
+ VariableMinLength:
264
+ active: false
265
+ VariableNaming:
266
+ active: true
267
+ variablePattern: '[a-z][A-Za-z0-9]*'
268
+ privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
269
+
270
+ performance:
271
+ active: true
272
+ ArrayPrimitive:
273
+ active: true
274
+ CouldBeSequence:
275
+ active: false
276
+ ForEachOnRange:
277
+ active: true
278
+ SpreadOperator:
279
+ active: false
280
+ UnnecessaryPartOfBinaryExpression:
281
+ active: false
282
+ UnnecessaryTemporaryInstantiation:
283
+ active: true
284
+
285
+ potential-bugs:
286
+ active: true
287
+ AvoidReferentialEquality:
288
+ active: true
289
+ CastNullableToNonNullableType:
290
+ active: false
291
+ CastToNullableType:
292
+ active: false
293
+ Deprecation:
294
+ active: false
295
+ DontDowncastCollectionTypes:
296
+ active: false
297
+ DoubleMutabilityForCollection:
298
+ active: true
299
+ ElseCaseInsteadOfExhaustiveWhen:
300
+ active: false
301
+ EqualsAlwaysReturnsTrueOrFalse:
302
+ active: true
303
+ EqualsWithHashCodeExist:
304
+ active: true
305
+ ExitOutsideMain:
306
+ active: false
307
+ ExplicitGarbageCollectionCall:
308
+ active: true
309
+ HasPlatformType:
310
+ active: true
311
+ IgnoredReturnValue:
312
+ active: true
313
+ ImplicitDefaultLocale:
314
+ active: true
315
+ ImplicitUnitReturnType:
316
+ active: false
317
+ InvalidRange:
318
+ active: true
319
+ IteratorHasNextCallsNextMethod:
320
+ active: true
321
+ IteratorNotThrowingNoSuchElementException:
322
+ active: true
323
+ LateinitUsage:
324
+ active: false
325
+ MapGetWithNotNullAssertionOperator:
326
+ active: true
327
+ MissingPackageDeclaration:
328
+ active: false
329
+ NullCheckOnMutableProperty:
330
+ active: false
331
+ NullableToStringCall:
332
+ active: false
333
+ PropertyUsedBeforeDeclaration:
334
+ active: false
335
+ UnconditionalJumpStatementInLoop:
336
+ active: false
337
+ UnnecessaryNotNullCheck:
338
+ active: false
339
+ UnnecessaryNotNullOperator:
340
+ active: true
341
+ UnnecessarySafeCall:
342
+ active: true
343
+ UnreachableCatchBlock:
344
+ active: true
345
+ UnreachableCode:
346
+ active: true
347
+ UnsafeCallOnNullableType:
348
+ active: true
349
+ UnsafeCast:
350
+ active: false
351
+ UnusedUnaryOperator:
352
+ active: true
353
+ UselessPostfixExpression:
354
+ active: true
355
+ WrongEqualsTypeParameter:
356
+ active: true
357
+
358
+ style:
359
+ active: true
360
+ AlsoCouldBeApply:
361
+ active: false
362
+ BracesOnIfStatements:
363
+ active: false
364
+ BracesOnWhenStatements:
365
+ active: false
366
+ CanBeNonNullable:
367
+ active: false
368
+ CascadingCallWrapping:
369
+ active: false
370
+ ClassOrdering:
371
+ active: false
372
+ CollapsibleIfStatements:
373
+ active: false
374
+ DataClassContainsFunctions:
375
+ active: false
376
+ DataClassShouldBeImmutable:
377
+ active: false
378
+ DestructuringDeclarationWithTooManyEntries:
379
+ active: true
380
+ maxDestructuringEntries: 3
381
+ EqualsNullCall:
382
+ active: true
383
+ EqualsOnSignatureLine:
384
+ active: false
385
+ ExplicitCollectionElementAccessMethod:
386
+ active: false
387
+ ExplicitItLambdaParameter:
388
+ active: false
389
+ ExpressionBodySyntax:
390
+ active: false
391
+ ForbiddenComment:
392
+ active: true
393
+ values:
394
+ - 'FIXME:'
395
+ - 'STOPSHIP:'
396
+ allowedPatterns: ''
397
+ customMessage: ''
398
+ ForbiddenImport:
399
+ active: false
400
+ ForbiddenMethodCall:
401
+ active: false
402
+ ForbiddenVoid:
403
+ active: true
404
+ FunctionOnlyReturningConstant:
405
+ active: true
406
+ LoopWithTooManyJumpStatements:
407
+ active: true
408
+ maxJumpCount: 1
409
+ MagicNumber:
410
+ active: true
411
+ excludes: ['**/test/**', '**/*.kts']
412
+ ignoreNumbers:
413
+ - '-1'
414
+ - '0'
415
+ - '1'
416
+ - '2'
417
+ ignoreHashCodeFunction: true
418
+ ignorePropertyDeclaration: false
419
+ ignoreLocalVariableDeclaration: false
420
+ ignoreConstantDeclaration: true
421
+ ignoreCompanionObjectPropertyDeclaration: true
422
+ ignoreAnnotation: false
423
+ ignoreNamedArgument: true
424
+ ignoreEnums: false
425
+ ignoreRanges: false
426
+ ignoreExtensionFunctions: true
427
+ MandatoryBracesLoops:
428
+ active: false
429
+ MaxChainedCallsOnSameLine:
430
+ active: false
431
+ MaxLineLength:
432
+ active: true
433
+ maxLineLength: 120
434
+ excludePackageStatements: true
435
+ excludeImportStatements: true
436
+ excludeCommentStatements: false
437
+ MayBeConst:
438
+ active: true
439
+ ModifierOrder:
440
+ active: true
441
+ MultilineLambdaItParameter:
442
+ active: false
443
+ MultilineRawStringIndentation:
444
+ active: false
445
+ NestedClassesVisibility:
446
+ active: true
447
+ NewLineAtEndOfFile:
448
+ active: true
449
+ NoTabs:
450
+ active: false
451
+ NullableBooleanCheck:
452
+ active: false
453
+ ObjectLiteralToLambda:
454
+ active: true
455
+ OptionalAbstractKeyword:
456
+ active: true
457
+ OptionalUnit:
458
+ active: false
459
+ PreferToOverPairSyntax:
460
+ active: false
461
+ ProtectedMemberInFinalClass:
462
+ active: true
463
+ RedundantExplicitType:
464
+ active: false
465
+ RedundantHigherOrderMapUsage:
466
+ active: true
467
+ RedundantVisibilityModifierRule:
468
+ active: false
469
+ ReturnCount:
470
+ active: true
471
+ max: 3
472
+ excludedFunctions: ['equals']
473
+ excludeLabeled: false
474
+ excludeReturnFromLambda: true
475
+ excludeGuardClauses: false
476
+ SafeCast:
477
+ active: true
478
+ SerialVersionUIDInSerializableClass:
479
+ active: true
480
+ SpacingBetweenPackageAndImports:
481
+ active: false
482
+ StringShouldBeRawString:
483
+ active: false
484
+ ThrowsCount:
485
+ active: true
486
+ max: 2
487
+ excludeGuardClauses: false
488
+ TrailingWhitespace:
489
+ active: false
490
+ TrimMultilineRawString:
491
+ active: false
492
+ UnderscoresInNumericLiterals:
493
+ active: false
494
+ UnnecessaryAbstractClass:
495
+ active: true
496
+ UnnecessaryAnnotationUseSiteTarget:
497
+ active: false
498
+ UnnecessaryApply:
499
+ active: true
500
+ UnnecessaryBackticks:
501
+ active: false
502
+ UnnecessaryBracesAroundTrailingLambda:
503
+ active: false
504
+ UnnecessaryFilter:
505
+ active: true
506
+ UnnecessaryInheritance:
507
+ active: true
508
+ UnnecessaryInnerClass:
509
+ active: false
510
+ UnnecessaryLet:
511
+ active: false
512
+ UnnecessaryParentheses:
513
+ active: false
514
+ UntilInsteadOfRangeTo:
515
+ active: false
516
+ UnusedImports:
517
+ active: false
518
+ UnusedParameter:
519
+ active: true
520
+ allowedNames: 'ignored|expected'
521
+ UnusedPrivateClass:
522
+ active: true
523
+ UnusedPrivateMember:
524
+ active: true
525
+ allowedNames: ''
526
+ UnusedPrivateProperty:
527
+ active: true
528
+ UseAnyOrNoneInsteadOfFind:
529
+ active: true
530
+ UseArrayLiteralsInAnnotations:
531
+ active: true
532
+ UseCheckNotNull:
533
+ active: true
534
+ UseCheckOrError:
535
+ active: true
536
+ UseDataClass:
537
+ active: false
538
+ UseEmptyCounterpart:
539
+ active: false
540
+ UseIfEmptyOrIfBlank:
541
+ active: false
542
+ UseIfInsteadOfWhen:
543
+ active: false
544
+ UseIsNullOrEmpty:
545
+ active: true
546
+ UseOrEmpty:
547
+ active: true
548
+ UseRequire:
549
+ active: true
550
+ UseRequireNotNull:
551
+ active: true
552
+ UseSumOfInsteadOfFlatMapSize:
553
+ active: false
554
+ UselessCallOnNotNull:
555
+ active: true
556
+ UtilityClassWithPublicConstructor:
557
+ active: true
558
+ VarCouldBeVal:
559
+ active: true
560
+ WildcardImport:
561
+ active: true
562
+ excludeImports: []
@@ -0,0 +1,30 @@
1
+ #WebView Configuration
2
+ #Tue Nov 25 12:12:31 IST 2025
3
+ LOCAL_IP=psppfizer.1mg.com
4
+ accessControl.allowedUrls=*1mg.com*,*onemg*,*browser.sentry-cdn.com*,*cloudflareinsights*
5
+ accessControl.enabled=true
6
+ android.appName=Pfizer PAP India
7
+ android.buildType=release
8
+ android.cachePattern=*.css,*.js
9
+ android.emulatorName=testMediumPhone
10
+ android.packageName=com.onemg.patientportal
11
+ android.sdkPath=/Users/mayankmahavar/Android/
12
+ appInfo=prod-24.11.2025-0.0.0
13
+ buildOptimisation=false
14
+ buildType=debug
15
+ cachePattern=*.css,*.js
16
+ ios.accessControl.allowedUrls=*.1mg.com*,*onemg.gumlet.io*,*browser.sentry-cdn.com*,*psppfizer.1mg.com*,*static.cloudflareinsights.com*
17
+ ios.accessControl.enabled=true
18
+ ios.appBundleId=com.1mg.patient.portal
19
+ ios.appName=Pfizer PAP India
20
+ ios.buildType=debug
21
+ ios.cachePattern=*.css,*.js
22
+ ios.simulatorName=pfizer
23
+ port=443
24
+ splashScreen.backgroundColor=\#ffffff
25
+ splashScreen.cornerRadius=20
26
+ splashScreen.duration=1000
27
+ splashScreen.enabled=true
28
+ splashScreen.imageHeight=200
29
+ splashScreen.imageWidth=400
30
+ useHttps=true
@@ -360,10 +360,11 @@ class CustomWebView(
360
360
  // Remove leading slash if present
361
361
  var cleanPath = if (path.startsWith("/")) path.substring(1) else path
362
362
 
363
+ // TODO: Add HTML file workflow - index.html not available yet
363
364
  // If path is empty or just "/", return index.html
364
- if (cleanPath.isEmpty()) {
365
- return "build/public/index.html"
366
- }
365
+ // if (cleanPath.isEmpty()) {
366
+ // return "build/public/index.html"
367
+ // }
367
368
 
368
369
  // Special case for favicon.ico which might be in root
369
370
  if (cleanPath == "favicon.ico") {
@@ -612,25 +613,26 @@ class CustomWebView(
612
613
  Log.d(TAG, "⚙️ STEP_1_SKIP: Access control disabled, allowing URL: $url")
613
614
  }
614
615
 
616
+ // TODO: Add HTML file workflow - index.html not available yet
615
617
  // Handle the initial route request - intercept first request regardless of host
616
- if (!isInitialApiCalled && request.method == "GET") {
617
- isInitialApiCalled = true
618
- if (BuildConfig.DEBUG) {
619
- Log.d(TAG, "📄 STEP_2_INITIAL: Serving initial index.html from assets for route: $url")
620
- Log.d(TAG, "📄 STEP_2_INITIAL: This request will NOT go through cache system")
621
- }
622
-
623
- try {
624
- val indexHtml = context.assets.open("build/public/index.html")
625
- return WebResourceResponse(
626
- "text/html",
627
- "utf-8",
628
- indexHtml
629
- )
630
- } catch (e: Exception) {
631
- Log.e(TAG, "❌ Error loading index.html from assets", e)
632
- }
633
- }
618
+ // if (!isInitialApiCalled && request.method == "GET") {
619
+ // isInitialApiCalled = true
620
+ // if (BuildConfig.DEBUG) {
621
+ // Log.d(TAG, "📄 STEP_2_INITIAL: Serving initial index.html from assets for route: $url")
622
+ // Log.d(TAG, "📄 STEP_2_INITIAL: This request will NOT go through cache system")
623
+ // }
624
+ //
625
+ // try {
626
+ // val indexHtml = context.assets.open("build/public/index.html")
627
+ // return WebResourceResponse(
628
+ // "text/html",
629
+ // "utf-8",
630
+ // indexHtml
631
+ // )
632
+ // } catch (e: Exception) {
633
+ // Log.e(TAG, "❌ Error loading index.html from assets", e)
634
+ // }
635
+ // }
634
636
 
635
637
  // Let API calls go through normally (before any other checks)
636
638
  if (isApiCall(url)) {
@@ -846,15 +848,6 @@ class CustomWebView(
846
848
  override fun onReceivedError(view: WebView?, request: WebResourceRequest?, error: WebResourceError?) {
847
849
  if (error != null) {
848
850
  Log.e(TAG, "❌ Error loading ${request?.url}: ${error.errorCode} ${error.description}")
849
-
850
- // Only show a fallback page for main frame errors in production
851
- if (request?.isForMainFrame == true && !BuildConfig.DEBUG) {
852
- try {
853
- view?.loadUrl("file:///android_asset/build/public/error.html")
854
- } catch (e: Exception) {
855
- Log.e(TAG, "Failed to load error page: ${e.message}")
856
- }
857
- }
858
851
  }
859
852
  super.onReceivedError(view, request, error)
860
853
  }
@@ -882,12 +875,13 @@ class CustomWebView(
882
875
  // Cancel the request in production
883
876
  handler?.cancel()
884
877
 
878
+ // TODO: Add HTML file workflow - error.html not available yet
885
879
  // Show error page for main frame SSL errors
886
- try {
887
- view?.loadUrl("file:///android_asset/build/public/error.html")
888
- } catch (e: Exception) {
889
- Log.e(TAG, "Failed to load SSL error page: ${e.message}")
890
- }
880
+ // try {
881
+ // view?.loadUrl("file:///android_asset/build/public/error.html")
882
+ // } catch (e: Exception) {
883
+ // Log.e(TAG, "Failed to load SSL error page: ${e.message}")
884
+ // }
891
885
  }
892
886
  } else {
893
887
  handler?.cancel()