open-notebook/api/routers
Luis Novo df0986cee0
Feature/oss 312 notebook item counts (#175)
* fix: small issue where users cant change podcast segments

* feat: display source and note counts on notebook cards (OSS-312)

Add item counters to notebook listing page showing the number of sources
and notes in each notebook. Counts are displayed in a footer section with
FileText and StickyNote icons for visual consistency with ContextIndicator.

Backend changes:
- Add source_count and note_count to NotebookResponse model
- Update /notebooks endpoint to use SurrealDB graph traversal query
- Query: count(<-reference.in) for sources, count(<-artifact.in) for notes
- Update all notebook endpoints to include counts

Frontend changes:
- Add source_count and note_count to TypeScript NotebookResponse interface
- Add footer section to NotebookCard component
- Display counts with FileText and StickyNote icons (h-3 w-3)
- Use border-top separator and muted-foreground styling

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* style: use colorful badges for notebook counts matching ContextIndicator

Update notebook card counts to use Badge components with primary color
styling instead of plain text, matching the visual style of the
ContextIndicator component in the chat window.

Changes:
- Replace plain text divs with Badge components
- Apply text-primary and border-primary/50 styling
- Use same spacing (gap-1.5, px-1.5, py-0.5) as ContextIndicator
- Remove bullet separator (not needed with badge layout)

Visual result matches the colorful badges shown in chat context.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-19 16:03:36 -03:00
..
__init__.py Api podcast migration (#93) 2025-07-17 08:36:11 -03:00
auth.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
chat.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
commands.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
config.py fix: better fix to the backend connectivity problem using the react backend for guessing the API URL 2025-10-19 10:16:58 -03:00
context.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
embedding.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
embedding_rebuild.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
episode_profiles.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
insights.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
models.py OpenAI compatible multimodal (#167) 2025-10-19 07:44:05 -03:00
notebooks.py Feature/oss 312 notebook item counts (#175) 2025-10-19 16:03:36 -03:00
notes.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
podcasts.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
search.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
settings.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
source_chat.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
sources.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
speaker_profiles.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
transformations.py Version 1 (#160) 2025-10-18 12:46:22 -03:00