Skip to content

Commit adbe87e

Browse files
committed
feat(ui): update app screens and analytics; remove unused asset
1 parent ce85663 commit adbe87e

File tree

6 files changed

+13
-30
lines changed

6 files changed

+13
-30
lines changed

src/App.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { ProjectSettings } from '@/components/ProjectSettings';
2323
import { TabManager } from "@/components/TabManager";
2424
import { TabContent } from "@/components/TabContent";
2525
import { useTabState } from "@/hooks/useTabState";
26-
import { AnalyticsConsentBanner } from "@/components/AnalyticsConsent";
2726
import { useAppLifecycle, useTrackEvent } from "@/hooks";
2827
import { StartupIntro } from "@/components/StartupIntro";
2928

@@ -392,8 +391,7 @@ function AppContent() {
392391
onAgentsClick={() => setShowAgentsModal(true)}
393392
/> */}
394393

395-
{/* Analytics Consent Banner */}
396-
<AnalyticsConsentBanner />
394+
397395

398396
{/* Main Content */}
399397
<div className="flex-1 overflow-hidden">

src/assets/react.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/components/NFOCredits.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const NFOCredits: React.FC<NFOCreditsProps> = ({ onClose }) => {
8484

8585
// Credits content
8686
const creditsContent = [
87-
{ type: "header", text: "opcode v0.1.0" },
87+
{ type: "header", text: "opcode v0.2.0" },
8888
{ type: "subheader", text: "[ A STRATEGIC PROJECT BY ASTERISK ]" },
8989
{ type: "spacer" },
9090
{ type: "section", title: "━━━ CREDITS ━━━" },

src/components/Settings.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { StorageTab } from "./StorageTab";
2727
import { HooksEditor } from "./HooksEditor";
2828
import { SlashCommandsManager } from "./SlashCommandsManager";
2929
import { ProxySettings } from "./ProxySettings";
30-
import { AnalyticsConsent } from "./AnalyticsConsent";
3130
import { useTheme, useTrackEvent } from "@/hooks";
3231
import { analytics } from "@/lib/analytics";
3332
import { TabPersistenceService } from "@/services/tabPersistence";
@@ -91,8 +90,6 @@ export const Settings: React.FC<SettingsProps> = ({
9190

9291
// Analytics state
9392
const [analyticsEnabled, setAnalyticsEnabled] = useState(false);
94-
const [analyticsConsented, setAnalyticsConsented] = useState(false);
95-
const [showAnalyticsConsent, setShowAnalyticsConsent] = useState(false);
9693
const trackEvent = useTrackEvent();
9794

9895
// Tab persistence state
@@ -121,7 +118,6 @@ export const Settings: React.FC<SettingsProps> = ({
121118
const settings = analytics.getSettings();
122119
if (settings) {
123120
setAnalyticsEnabled(settings.enabled);
124-
setAnalyticsConsented(settings.hasConsented);
125121
}
126122
};
127123

@@ -686,9 +682,7 @@ export const Settings: React.FC<SettingsProps> = ({
686682
id="analytics-enabled"
687683
checked={analyticsEnabled}
688684
onCheckedChange={async (checked) => {
689-
if (checked && !analyticsConsented) {
690-
setShowAnalyticsConsent(true);
691-
} else if (checked) {
685+
if (checked) {
692686
await analytics.enable();
693687
setAnalyticsEnabled(true);
694688
trackEvent.settingsChanged('analytics_enabled', true);
@@ -1081,15 +1075,7 @@ export const Settings: React.FC<SettingsProps> = ({
10811075
)}
10821076
</ToastContainer>
10831077

1084-
{/* Analytics Consent Dialog */}
1085-
<AnalyticsConsent
1086-
open={showAnalyticsConsent}
1087-
onOpenChange={setShowAnalyticsConsent}
1088-
onComplete={async () => {
1089-
await loadAnalyticsSettings();
1090-
setShowAnalyticsConsent(false);
1091-
}}
1092-
/>
1078+
10931079
</div>
10941080
);
10951081
};

src/lib/analytics/consent.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export class ConsentManager {
2424
} else {
2525
// Initialize with default settings
2626
this.settings = {
27-
enabled: false,
28-
hasConsented: false,
27+
enabled: true,
28+
hasConsented: true,
2929
};
3030
}
3131

@@ -41,15 +41,15 @@ export class ConsentManager {
4141
}
4242

4343
return this.settings || {
44-
enabled: false,
45-
hasConsented: false,
44+
enabled: true,
45+
hasConsented: true,
4646
};
4747
} catch (error) {
4848
console.error('Failed to initialize consent manager:', error);
4949
// Return default settings on error
5050
return {
51-
enabled: false,
52-
hasConsented: false,
51+
enabled: true,
52+
hasConsented: true,
5353
};
5454
}
5555
}
@@ -82,8 +82,8 @@ export class ConsentManager {
8282

8383
// Reset settings with new anonymous ID
8484
this.settings = {
85-
enabled: false,
86-
hasConsented: false,
85+
enabled: true,
86+
hasConsented: true,
8787
userId: this.generateAnonymousId(),
8888
sessionId: this.generateSessionId(),
8989
};

src/lib/analytics/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class AnalyticsService {
3232
persistence: 'localStorage',
3333
autocapture: false, // We'll manually track events
3434
disable_session_recording: true, // Privacy first
35-
opt_out_capturing_by_default: true, // Require explicit opt-in
35+
opt_out_capturing_by_default: false, // Capture enabled by default
3636
};
3737
}
3838

0 commit comments

Comments
 (0)