fix: WYSIWYG editor, content generation, and writing assistant bug fixes

- Fix text selection menu not showing: wire contentRef via inputRef on multiline TextField
- Fix blog title not truncating: add min-w-0 for flex item overflow
- Fix outline generation 500: escape curly braces in f-string prompt template
- Fix content generation 'NoneType not callable': replace SessionLocal() with get_session_for_user(), add db param to MediumBlogGenerator, fix signature mismatch in database_task_manager
- Fix writing assistant suggest 500: add auth + user_id to API endpoint and service, replace sync requests with httpx.AsyncClient
- Fix hallucination detector 404: explicitly include router in main.py and app.py
- Fix missing error_data in task failure responses
- Hide CopilotKit web inspector button
- Remove hardcoded fallback suggestions from SmartTypingAssist
- Fix stale closure refs in SmartTypingAssist handleTypingChange
- Add two-column editor layout, stats bar, section hover menu
- Various subscription, billing, and research module improvements
This commit is contained in:
ajaysi
2026-05-14 09:11:30 +05:30
parent 7385100017
commit 928c2f20aa
113 changed files with 4344 additions and 10064 deletions

View File

@@ -318,10 +318,12 @@ export const billingService = {
const raw = response.data.data as any;
// Coerce usage stats first to ensure proper typing
const currentUsage = coerceUsageStats(raw?.current_usage ?? raw);
const totalUsage = coerceUsageStats(raw?.total_usage ?? raw);
const currentPeriodUsage = coerceUsageStats(raw?.current_period_usage ?? {});
const coerced: DashboardData = {
current_usage: currentUsage,
total_usage: totalUsage,
current_period_usage: currentPeriodUsage,
trends: raw?.trends ?? {
periods: [],
total_calls: [],

View File

@@ -589,11 +589,8 @@ export interface AssistiveSuggestionResponse {
}
export const assistiveWritingApi = {
async getSuggestion(text: string, maxResults: number = 1): Promise<AssistiveSuggestionResponse> {
const { data } = await aiApiClient.post('/api/writing-assistant/suggest', {
text,
max_results: maxResults
});
async getSuggestion(text: string): Promise<AssistiveSuggestionResponse> {
const { data } = await aiApiClient.post('/api/writing-assistant/suggest', { text });
return data;
}
};

View File

@@ -22,7 +22,7 @@ import {
} from "../components/PodcastMaker/types";
import { checkPreflight, PreflightOperation } from "./billingService";
import { TaskStatus } from "./storyWriterApi";
import { isPodcastOnlyDemoMode } from "../utils/demoMode";
import { isFeatureOnlyMode } from "../utils/demoMode";
const DEFAULT_KNOBS: Knobs = {
voice_emotion: "neutral",
@@ -360,7 +360,7 @@ export const podcastApi = {
exaSuggestedConfig: analysisResp.data?.exa_suggested_config || undefined,
};
const researchConfig = isPodcastOnlyDemoMode() ? null : await getResearchConfig();
const researchConfig = isFeatureOnlyMode() ? null : await getResearchConfig();
// Use AI-generated queries if available, fallback to legacy mapping
let queries: Query[] = [];