mirror of
https://github.com/coleam00/Archon.git
synced 2025-12-24 02:39:17 -05:00
fix: Event propagation and data loading in Edit Crawler Configuration
- Add stopPropagation wrapper to prevent dialog clicks from bubbling to card - Include crawl configuration fields at top level of knowledge item response - Ensure max_depth, tags, and crawl_config are accessible for edit dialog - Fix issue where clicking inside edit dialog would open document browser
This commit is contained in:
@@ -121,8 +121,9 @@ export const EditCrawlConfigDialog: React.FC<EditCrawlConfigDialogProps> = ({
|
||||
const isProcessing = updateMutation.isPending;
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="sm:max-w-[600px] max-h-[90vh] overflow-hidden flex flex-col">
|
||||
<div onClick={(e) => e.stopPropagation()}>
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="sm:max-w-[600px] max-h-[90vh] overflow-hidden flex flex-col">
|
||||
<DialogHeader className="flex-shrink-0 pb-2">
|
||||
<DialogTitle>Edit Crawler Configuration</DialogTitle>
|
||||
<DialogDescription>
|
||||
@@ -232,5 +233,6 @@ export const EditCrawlConfigDialog: React.FC<EditCrawlConfigDialogProps> = ({
|
||||
)}
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -375,6 +375,11 @@ class KnowledgeItemService:
|
||||
"url": first_page_url,
|
||||
"source_id": source_id,
|
||||
"code_examples": code_examples,
|
||||
# Include important fields at top level for easy access
|
||||
"knowledge_type": source_metadata.get("knowledge_type", "technical"),
|
||||
"max_depth": source_metadata.get("max_depth"),
|
||||
"tags": source_metadata.get("tags", []),
|
||||
"crawl_config": source_metadata.get("crawl_config"),
|
||||
"metadata": {
|
||||
# Spread source_metadata first, then override with computed values
|
||||
**source_metadata,
|
||||
|
||||
Reference in New Issue
Block a user