Skip to content

feat: auto-generate action items from transcripts#57

Merged
StevenLi-phoenix merged 3 commits intomainfrom
feat/issue-11-action-items
Mar 28, 2026
Merged

feat: auto-generate action items from transcripts#57
StevenLi-phoenix merged 3 commits intomainfrom
feat/issue-11-action-items

Conversation

@StevenLi-phoenix
Copy link
Copy Markdown
Owner

@StevenLi-phoenix StevenLi-phoenix commented Mar 26, 2026

Summary

  • LLM-powered action item extraction runs in parallel with summary generation after recording ends
  • Structured JSON parsing with markdown checklist fallback for robust LLM output handling
  • Grouped checklist UI (Tasks/Decisions/Follow-ups) with checkbox persistence, due dates, and assignee display
  • Export to Apple Reminders (EKReminder) and Calendar (EKEvent) via EventKit
  • Copy as Markdown with ActionItemMarkdownFormatter
  • New LLMRole.actionItems for independent model profile configuration
  • SchemaV7 migration adds ActionItem model + RecordingSession.actionItems relationship

New files (8)

ActionItem.swift, SchemaV7.swift, ActionItemParser.swift, ActionItemMarkdownFormatter.swift, RemindersExportService.swift, ActionItemListView.swift, ActionItemParserTests.swift, ActionItemMarkdownFormatterTests.swift

Modified files (13)

RecordingSession.swift, NotetakerMigrationPlan.swift, LLMModelProfile.swift, notetakerApp.swift, PromptBuilder.swift, SummarizerService.swift, BackgroundSummaryService.swift, RecordingViewModel.swift, SessionDetailView.swift, TranscriptExporter.swift, UnitTests.xctestplan, LLMModelProfileTests.swift, CLAUDE.md

Closes #11

Test plan

  • Build passes (xcodebuild -scheme notetaker -configuration Debug build)
  • 21 new tests pass (ActionItemParserTests: 15, ActionItemMarkdownFormatterTests: 6)
  • No regression on existing tests (LLMModelProfileTests.allCases updated for new role)
  • Manual: Record → Stop → Verify action items appear in session detail
  • Manual: Toggle checkbox → Restart app → Verify persistence
  • Manual: Copy as Markdown → Verify clipboard content
  • Manual: Export to Reminders → Verify items created in Reminders app
  • Manual: Export to Calendar → Verify events created for items with due dates
  • Manual: Toolbar "Extract Action Items" → Verify re-extraction works

🤖 Generated with Claude Code

@StevenLi-phoenix
Copy link
Copy Markdown
Owner Author

Block by #55

@StevenLi-phoenix StevenLi-phoenix marked this pull request as draft March 26, 2026 16:01
@StevenLi-phoenix StevenLi-phoenix added the blocked Blocked by dependency label Mar 26, 2026
@StevenLi-phoenix
Copy link
Copy Markdown
Owner Author

Blocked by #55 (LLM 框架: Structured Output 支持)

Action item 提取依赖 Structured Output (JSON Schema 约束输出) 来确保 LLM 返回可靠的 JSON 格式。当前实现有 ActionItemParser 做 fallback(markdown checklist 解析),但正式合并应等 #55 完成后利用 JSON Schema 约束,减少解析失败率。

chatgpt-codex-connector[bot]

This comment was marked as spam.

@github-actions
Copy link
Copy Markdown
Contributor

⏸️ Auto-merge paused: 6 unchecked checkbox(es) in PR body. Merge will proceed automatically once all tasks are checked and a new push triggers the workflow.

Add LLM-powered action item extraction that runs in parallel with
summary generation after recording ends. Includes structured JSON
parsing with markdown fallback, grouped checklist UI, and export
to Apple Reminders/Calendar via EventKit.

- ActionItem SwiftData model + SchemaV7 migration
- ActionItemParser with JSON + markdown checklist fallback
- PromptBuilder.buildActionItemExtractionPrompt() for structured extraction
- BackgroundSummaryService parallel dispatch (separate task dict)
- LLMRole.actionItems for independent model profile config
- ActionItemListView with collapsible grouped checklist
- RemindersExportService for Apple Reminders/Calendar export
- ActionItemMarkdownFormatter for clipboard export
- 21 new tests (ActionItemParserTests + ActionItemMarkdownFormatterTests)
Use generateStructured() with JSON schema when the LLM engine
supports it (OpenAI, Anthropic, Ollama). Falls back to free-text
generation + ActionItemParser for engines without support.

Depends on #55 (structured output support).
@StevenLi-phoenix StevenLi-phoenix force-pushed the feat/issue-11-action-items branch from 2a061e7 to 0a16320 Compare March 26, 2026 16:39
@StevenLi-phoenix StevenLi-phoenix removed the blocked Blocked by dependency label Mar 26, 2026
@github-actions github-actions bot deleted a comment from claude bot Mar 26, 2026
@StevenLi-phoenix
Copy link
Copy Markdown
Owner Author

Dependency #55 merged (PR #58). Rebased on latest main and integrated structured output support — extractActionItems() now uses generateStructured() with JSON schema when the engine supports it, falling back to free-text + parser. Unblocked.

@StevenLi-phoenix StevenLi-phoenix marked this pull request as ready for review March 26, 2026 16:40
@github-actions
Copy link
Copy Markdown
Contributor

⏸️ Auto-merge paused: 6 unchecked checkbox(es) in PR body. Merge will proceed automatically once all tasks are checked and a new push triggers the workflow.

Repository owner deleted a comment from chatgpt-codex-connector bot Mar 26, 2026
@StevenLi-phoenix
Copy link
Copy Markdown
Owner Author

Review Notes — Auto-generate Action Items (#11)

1370 行改动、21 文件,这是个大 PR。几个基于最新调研的建议:

1. 与结构化摘要合并

PR #59StructuredSummary 已包含 action items 字段。建议评估是否可以让 action item 提取复用结构化摘要的输出,而非独立 LLM 调用。单次调用 = 更快 + 更省 token + 结果更一致。

2. 竞品参考:Fireflies 的 agentic 模式

Fireflies 最新版支持从 action items 自动创建 JIRA/Asana ticket。虽然我们暂时不需要做到这个程度,但 ActionItem 模型预留一个 externalID: String? 字段会为未来集成留好扩展点。

3. Apple Reminders 导出的权限

EventKit 导出到 Reminders 需要 com.apple.security.personal-information.calendars entitlement(已有)+ Reminders 授权。建议在 UI 上添加首次导出时的权限说明,类似 PrivacyDisclosureView 的模式。

4. LLMRole.actionItems 的模型选择

新增的 .actionItems role 默认会用哪个 profile?建议 action item 提取可以用更轻量的模型(如 Qwen 3.5 9B 或 Foundation Models),因为任务相对简单,不需要 flagship 模型。

@StevenLi-phoenix
Copy link
Copy Markdown
Owner Author

Manual: Record → Stop → Verify action items appear in session detail
我要是根本不想要actions呢?设置呢?

@StevenLi-phoenix
Copy link
Copy Markdown
Owner Author

Manual: Export to Reminders → Verify items created in Reminders app
权限啥的都没写都不对

@StevenLi-phoenix
Copy link
Copy Markdown
Owner Author

inline warning真的是一个大天才,根本看不见。action直接占了这么大的UI的空间,我甚至找不到内容。

@StevenLi-phoenix
Copy link
Copy Markdown
Owner Author

Manual: Export to Calendar → Verify events created for items with due dates
你都没有due date为什么要出现这么个按钮?而且提示也太小了,inline就是傻逼的设计。

… permissions

- Auto-extraction disabled by default (actionItemExtractionEnabled in SummarizerConfig)
- Settings > Summarization toggle to enable auto-extraction
- Action items moved from inline section to toolbar popover (no longer steals content space)
- Inline error text replaced with .alert() dialogs (visible feedback)
- Success/empty result alerts for manual extraction
- Calendar export hidden when no items have due dates
- Added NSRemindersUsageDescription and reminders entitlement for Reminders export
- Stricter prompt: only extracts explicit commitments, not topic summaries
- State reset on session navigation (showActionItemsPopover, exportSuccessMessage)
@github-actions github-actions bot deleted a comment from claude bot Mar 28, 2026
@StevenLi-phoenix StevenLi-phoenix merged commit a3cd83b into main Mar 28, 2026
3 checks passed
@claude
Copy link
Copy Markdown

claude bot commented Mar 28, 2026

✅ Claude Code Review: APPROVE

Feature is well-implemented following project patterns (SwiftData migration, inline property defaults, BackgroundSummaryService dispatch pattern, re-fetch after await, backwards-compat decoding), with solid test coverage for pure logic; minor UX deviation replacing auto-dismiss errors with modal alerts is acceptable for export confirmation flows.

@github-actions
Copy link
Copy Markdown
Contributor

⏸️ Auto-merge paused: 1 unchecked checkbox(es) in PR body. Merge will proceed automatically once all tasks are checked and a new push triggers the workflow.

@github-actions github-actions bot deleted the feat/issue-11-action-items branch March 28, 2026 22:47
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.

自动生成待办事项 (Auto-generate Action Items)

1 participant