Skip to content

Group notebook summaries and transcripts under parent SummaryGroup (#233) - #238

Open
allenporter wants to merge 1 commit into
mainfrom
feat/group-notebook-summaries-233
Open

Group notebook summaries and transcripts under parent SummaryGroup (#233)#238
allenporter wants to merge 1 commit into
mainfrom
feat/group-notebook-summaries-233

Conversation

@allenporter

Copy link
Copy Markdown
Owner

Description

Fixes #233.

In the Supernote ecosystem and Partner App, digests belonging to the same notebook/document are grouped under a parent SummaryGroup (is_summary_group="Y" / True). Previously, SummaryModule produced root-level summaries (parent_unique_identifier=None) for raw OCR transcripts and Gemini summaries, leading to an unorganized flat digest list in the app.

Changes

  1. Identifier Utilities:
    • Added get_summary_group_id(file_basis: str) -> str in supernote.server.utils.paths returning {file_basis}-group.
  2. Processor Module:
    • Implemented _upsert_group in SummaryModule to ensure a SummaryGroup exists for each note before adding/updating summaries.
    • Linked both the OCR transcript ({file_basis}-transcript) and AI summary ({file_basis}-summary) to the parent group by setting parent_unique_identifier.
  3. Summary Service:
    • Updated SummaryService.update_summary to support updating parent_unique_identifier, source_path, and data_source when provided in UpdateSummaryDTO.
  4. Testing:
    • Added tests/server/utils/test_paths.py for full 1:1 test parity.
    • Updated unit tests in test_summary.py to verify group creation/updates and parent_unique_identifier propagation.
    • Updated integration test in test_processor_integration.py to assert database group creation and child summary hierarchy.

Verification

  • Full test suite passed (597 tests).
  • Ruff check & format verified clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Group notebook summaries and transcripts under a parent SummaryGroup

1 participant