mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 19:07:35 +01:00
fix(ai): hide AI Credits + Revenue panels — broken backend, truthful UX
Three components mount API calls to /api/ai-credits/* which depend on three DB tables (ai_user_credits, ai_credit_transactions, ai_credit_deposits) that don't exist. Every render produces a 42P01 and a generic error toast. Until the feature gets a real owner (rip vs. complete is an open product decision), removing the surface stops the user-visible brokenness. Hidden: - AICreditsPricing from /settings/ai (static card, but advertises a feature that errors on use). - AICreditsPanel and AIRevenuePanel from /dashboard/ai-assistants (both hit broken endpoints via useAICreditsPanel and useAIRevenue). Component files and API routes left in place — this is a UX fix, not a rip. Decision on full removal vs. completion deferred. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1230c0cd78
commit
1996d89c5b
8 files changed
+6
-38
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
@@ -2,40 +2,15 @@
|
||||
|
||||
import EntityDashboardPage from '@/components/entity/EntityDashboardPage';
|
||||
import { aiAssistantEntityConfig } from '@/config/entities/ai-assistants';
|
||||
import { AICreditsPanel } from '@/components/ai/AICreditsPanel';
|
||||
import { AIRevenuePanel } from '@/components/ai/AIRevenuePanel';
|
||||
import type { AIAssistant } from '@/types/database';
|
||||
|
||||
/**
|
||||
* AI Assistants Dashboard Page
|
||||
*
|
||||
* Manage your AI assistants - autonomous AI services you create and monetize.
|
||||
* Includes credits panel for managing your AI credits balance.
|
||||
*
|
||||
* Created: 2025-12-25
|
||||
* Last Modified: 2026-01-21
|
||||
* Last Modified Summary: Added AI Credits panel sidebar
|
||||
*/
|
||||
export default function AIAssistantsDashboardPage() {
|
||||
return (
|
||||
<div className="flex flex-col lg:flex-row gap-6">
|
||||
{/* Main content - AI Assistants list */}
|
||||
<div className="flex-1 min-w-0">
|
||||
<EntityDashboardPage<AIAssistant>
|
||||
config={aiAssistantEntityConfig}
|
||||
title="My AI Assistants"
|
||||
description="Build and monetize autonomous AI services powered by your expertise"
|
||||
createButtonLabel="Create AI Assistant"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Sidebar - Credits and Revenue panels */}
|
||||
<div className="lg:w-80 flex-shrink-0">
|
||||
<div className="lg:sticky lg:top-4 space-y-4">
|
||||
<AICreditsPanel />
|
||||
<AIRevenuePanel />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<EntityDashboardPage<AIAssistant>
|
||||
config={aiAssistantEntityConfig}
|
||||
title="My AI Assistants"
|
||||
description="Build and monetize autonomous AI services powered by your expertise"
|
||||
createButtonLabel="Create AI Assistant"
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import { AIKeyManager } from '@/components/ai/AIKeyManager';
|
||||
import { AIModelPreferences, type AIPreferences } from '@/components/ai/AIModelPreferences';
|
||||
import { AIUsageStats } from '@/components/ai/AIUsageStats';
|
||||
import { AIGuidanceSidebar } from '@/components/ai/AIGuidanceSidebar';
|
||||
import { AICreditsPricing } from '@/components/ai/AICreditsPricing';
|
||||
import type { AIFieldType } from '@/lib/ai-guidance';
|
||||
import { logger } from '@/utils/logger';
|
||||
|
||||
@@ -182,12 +181,6 @@ export default function AISettingsPage() {
|
||||
}}
|
||||
/>
|
||||
</section>
|
||||
|
||||
{/* Credits Pricing */}
|
||||
<section>
|
||||
<h2 className="text-lg font-semibold text-foreground mb-4">Credits & Pricing</h2>
|
||||
<AICreditsPricing />
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{/* Guidance Sidebar */}
|
||||
|
||||
Reference in new issue
Block a user