feat: fixed issues of note management

Issues Fixed

- Missing pagination fields in API response schemas (page, page_size, has_more)
- NOTE enum missing from frontend Zod schema
- Missing fields in DocumentRead response construction (content_hash, updated_at)
- BlockNote slash menu clipped by overflow-hidden CSS
- Sidebar click conflicts - hidden action buttons intercepting clicks
- Rewrote All Notes sidebar - replaced fragile custom portal with shadcn Sheet
- Missing translation keys for new UI strings
- Missing NOTE retrieval logic in researcher agent
- Added search to All Notes sidebar
- Removed frontend logging - was causing toasters on every page refresh
- Added backend logging to document reindex Celery task
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-12-17 00:09:43 -08:00
parent 3c3527d498
commit c768730b8c
37 changed files with 758 additions and 740 deletions

View file

@ -492,6 +492,7 @@ async def fetch_documents_by_ids(
"CLICKUP_CONNECTOR": "ClickUp (Selected)",
"AIRTABLE_CONNECTOR": "Airtable (Selected)",
"LUMA_CONNECTOR": "Luma Events (Selected)",
"NOTE": "Notes (Selected)",
}
source_object = {
@ -1162,6 +1163,33 @@ async def fetch_relevant_documents(
}
)
elif connector == "NOTE":
(
source_object,
notes_chunks,
) = await connector_service.search_notes(
user_query=reformulated_query,
search_space_id=search_space_id,
top_k=top_k,
start_date=start_date,
end_date=end_date,
)
# Add to sources and raw documents
if source_object:
all_sources.append(source_object)
all_raw_documents.extend(notes_chunks)
# Stream found document count
if streaming_service and writer:
writer(
{
"yield_value": streaming_service.format_terminal_info_delta(
f"📝 Found {len(notes_chunks)} Notes related to your query"
)
}
)
except Exception as e:
logging.error("Error in search_airtable: %s", traceback.format_exc())
error_message = f"Error searching connector {connector}: {e!s}"

View file

@ -34,6 +34,7 @@ def get_connector_emoji(connector_name: str) -> str:
"LUMA_CONNECTOR": "",
"ELASTICSEARCH_CONNECTOR": "",
"WEBCRAWLER_CONNECTOR": "🌐",
"NOTE": "📝",
}
return connector_emojis.get(connector_name, "🔎")
@ -59,6 +60,7 @@ def get_connector_friendly_name(connector_name: str) -> str:
"LUMA_CONNECTOR": "Luma",
"ELASTICSEARCH_CONNECTOR": "Elasticsearch",
"WEBCRAWLER_CONNECTOR": "Web Pages",
"NOTE": "Notes",
}
return connector_friendly_names.get(connector_name, connector_name)