Skip to content

Commit 9764592

Browse files
fix(ci): resolve frontend lint and workflow regressions
Co-authored-by: MaximillianGroup <34328348+MaximillianGroup@users.noreply.github.com>
1 parent 73f19d1 commit 9764592

10 files changed

Lines changed: 194 additions & 206 deletions

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
php: ["8.2", "8.3", "8.4"]
19-
wordpress: ["6.8", "latest"]
19+
wordpress: ["6.8", "6.9"]
2020

2121
steps:
2222
- name: Checkout code

src/core/StarmusAssetLoader.php

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,6 @@
3939

4040
final class StarmusAssetLoader
4141
{
42-
/**
43-
* Handle for the production bundle script.
44-
*
45-
* @var string
46-
*/
47-
private const HANDLE_PROD_BUNDLE = 'starmus-audio-recorder-script.bundle';
48-
49-
/**
50-
* Handle for the main stylesheet.
51-
*
52-
* @var string
53-
*/
54-
private const STYLE_HANDLE = 'starmus-audio-recorder-styles';
55-
5642
/**
5743
* StarmusSettings settings object
5844
*/
@@ -307,8 +293,11 @@ function (string $tag, string $handle) use ($script_asset): string {
307293
*/
308294
private function enqueue_styles(): void
309295
{
296+
$style_handle = '';
297+
310298
try {
311299
$style_asset = $this->package_resolver->resolve_asset('recorderStyle');
300+
$style_handle = $style_asset['handle'];
312301
$css_path = $style_asset['url'];
313302

314303
if ($css_path === '') {
@@ -325,7 +314,7 @@ private function enqueue_styles(): void
325314
StarmusLogger::log($throwable);
326315
}
327316

328-
$this->starmusEnqueueImageAssets($style_asset['handle']);
317+
$this->starmusEnqueueImageAssets($style_handle);
329318
}
330319

331320
/**
@@ -415,6 +404,9 @@ private function starmusEnqueueImageAssets(string $style_handle): void
415404
wp_add_inline_style($style_handle, $custom_css);
416405
}
417406

407+
/**
408+
* @param array<string, mixed> $config
409+
*/
418410
private function build_bootstrap_inline_script(array $config): string
419411
{
420412
$base = $this->build_runtime_bootstrap_base($config);

src/frontend/StarmusConsentUI.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ class StarmusConsentUI
1818
{
1919
private const MAX_UPLOAD_SIZE = 5 * 1024 * 1024; // 5MB
2020

21-
private const CONSENT_STYLE_HANDLE = 'starmus-consent-style';
22-
23-
private const CONSENT_SCRIPT_HANDLE = 'starmus-consent-script';
24-
2521
// Strict MIME allowlist for validation
2622
private const ALLOWED_MIMES = [
2723
'image/png',

src/js/starmus-core.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ export function initCore(store, instanceId, env) {
161161
transcript: source.transcript?.trim() || null,
162162
calibration: calibration.complete
163163
? {
164-
gain: calibration.gain,
165-
speechLevel: calibration.speechLevel,
166-
}
164+
gain: calibration.gain,
165+
speechLevel: calibration.speechLevel,
166+
}
167167
: null,
168168
env: stateEnv,
169169
tier: stateEnv.tier || currentEnvData?.tier || "C",

src/js/starmus-enhanced-calibration.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -216,30 +216,30 @@ class EnhancedCalibration {
216216
let message;
217217

218218
switch (currentPhase) {
219-
case 0:
220-
// Noise floor measurement
221-
if (volume < settings.noiseThreshold) {
222-
noiseFloor = Math.max(noiseFloor, volume);
223-
}
224-
message =
219+
case 0:
220+
// Noise floor measurement
221+
if (volume < settings.noiseThreshold) {
222+
noiseFloor = Math.max(noiseFloor, volume);
223+
}
224+
message =
225225
this.tier === "C"
226226
? "Quick setup..."
227227
: `Phase 1: Measuring background noise (${Math.ceil((phaseDuration - phaseElapsed) / 1000)}s)`;
228-
break;
229-
case 1:
230-
if (volume > settings.speechThreshold) {
231-
speechPeaks.push(volume);
232-
}
233-
message = "Phase 2: Speak your name clearly...";
234-
break;
235-
236-
case 2:
237-
// Optimization (Tier A only)
238-
message = "Phase 3: Optimizing settings...";
239-
break;
240-
241-
default:
242-
message = "Calibration complete";
228+
break;
229+
case 1:
230+
if (volume > settings.speechThreshold) {
231+
speechPeaks.push(volume);
232+
}
233+
message = "Phase 2: Speak your name clearly...";
234+
break;
235+
236+
case 2:
237+
// Optimization (Tier A only)
238+
message = "Phase 3: Optimizing settings...";
239+
break;
240+
241+
default:
242+
message = "Calibration complete";
243243
}
244244

245245
if (onUpdate) {

src/js/starmus-metadata-auto.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ export function initAutoMetadata(store, formEl, _options) {
146146
// 1. Calibration Data
147147
const calData = cal.complete
148148
? {
149-
gain: cal.gain,
150-
speechLevel: cal.speechLevel,
151-
message: cal.message,
152-
}
149+
gain: cal.gain,
150+
speechLevel: cal.speechLevel,
151+
message: cal.message,
152+
}
153153
: {};
154154
updateField(formEl, "_starmus_calibration", calData);
155155

src/js/starmus-recorder.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ class LanguageSignalAnalyzer {
7070
}
7171

7272
switch (this.country) {
73-
case "GM":
74-
return ["en-US"]; // Gambia - English probe only
75-
case "SN":
76-
case "GN":
77-
case "ML":
78-
return ["fr-FR"]; // Francophone - French probe only
79-
default:
80-
return ["en-US"]; // Unknown - English fallback
73+
case "GM":
74+
return ["en-US"]; // Gambia - English probe only
75+
case "SN":
76+
case "GN":
77+
case "ML":
78+
return ["fr-FR"]; // Francophone - French probe only
79+
default:
80+
return ["en-US"]; // Unknown - English fallback
8181
}
8282
}
8383

0 commit comments

Comments
 (0)