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:
@@ -37,6 +37,7 @@ import {
|
||||
Warning,
|
||||
} from '@mui/icons-material';
|
||||
import { ImageStudioLayout } from './ImageStudioLayout';
|
||||
import { DashboardHeaderProps } from '../shared/types';
|
||||
import { useContentAssets, AssetFilters, ContentAsset } from '../../hooks/useContentAssets';
|
||||
import { intentResearchApi } from '../../api/intentResearchApi';
|
||||
import { AssetFilters as AssetFiltersComponent } from './AssetLibraryComponents/AssetFilters';
|
||||
@@ -127,6 +128,29 @@ export const AssetLibrary: React.FC = () => {
|
||||
return baseFilters;
|
||||
}, [debouncedSearch, idSearch, modelSearch, filterType, tabValue, page, pageSize, urlSourceModule]);
|
||||
|
||||
const headerProps: DashboardHeaderProps | undefined = useMemo(() => {
|
||||
if (!urlSourceModule) return undefined;
|
||||
switch (urlSourceModule) {
|
||||
case 'blog_writer':
|
||||
return {
|
||||
title: 'Blog Posts',
|
||||
subtitle: 'Manage and review your published blog posts.',
|
||||
};
|
||||
case 'research_tools':
|
||||
return {
|
||||
title: 'Research Documents',
|
||||
subtitle: 'Access and manage your research projects.',
|
||||
};
|
||||
case 'product_marketing':
|
||||
return {
|
||||
title: 'Marketing Assets',
|
||||
subtitle: 'Marketing content generated by Product Marketing tools.',
|
||||
};
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}, [urlSourceModule]);
|
||||
|
||||
const { assets, loading, error, total, toggleFavorite, deleteAsset, trackUsage, refetch } = useContentAssets(filters);
|
||||
|
||||
// Refetch assets when component mounts with research_tools filter to show latest drafts
|
||||
@@ -338,7 +362,7 @@ export const AssetLibrary: React.FC = () => {
|
||||
}, [assets, statusFilter, dateFilter]);
|
||||
|
||||
return (
|
||||
<ImageStudioLayout>
|
||||
<ImageStudioLayout headerProps={headerProps}>
|
||||
<Paper
|
||||
elevation={0}
|
||||
sx={{
|
||||
@@ -561,7 +585,13 @@ export const AssetLibrary: React.FC = () => {
|
||||
No assets found
|
||||
</Typography>
|
||||
<Typography variant="body2">
|
||||
Generated content from all ALwrity tools will appear here.
|
||||
{urlSourceModule === 'blog_writer'
|
||||
? 'No blog posts found. Generate your first blog post in Blog Writer.'
|
||||
: urlSourceModule === 'research_tools'
|
||||
? 'No research documents found. Start a new research project.'
|
||||
: urlSourceModule === 'product_marketing'
|
||||
? 'No marketing assets found. Create one in Product Marketing.'
|
||||
: 'Generated content from all ALwrity tools will appear here.'}
|
||||
</Typography>
|
||||
</Box>
|
||||
) : viewMode === 'list' ? (
|
||||
|
||||
Reference in New Issue
Block a user