-
Notifications
You must be signed in to change notification settings - Fork 116
Implement meeting block #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
appflowy
wants to merge
1
commit into
main
Choose a base branch
from
implement_meeting_block
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewer's GuideImplements a fully functional AI Meeting block with summary/notes/transcript tabs, audio transcription, AI-generated summaries, new block types, editor/Yjs integration, UI components, and Cypress selectors/tests, replacing the previous unsupported placeholder. Sequence diagram for AI meeting summary generationsequenceDiagram
actor User
participant AIMeetingBlock
participant TabActions
participant RegenerateMenu
participant AIMeetingService
participant BackendAPI as Backend_API
participant AIMeetingUtils
User->>TabActions: click Regenerate
TabActions->>AIMeetingBlock: onRegenerate()
AIMeetingBlock->>AIMeetingBlock: handleRegenerate()
AIMeetingBlock->>RegenerateMenu: get selectedTemplate, selectedInstruction
AIMeetingBlock->>AIMeetingService: handleGenerateSummary(content,options,onMessage)
activate AIMeetingService
AIMeetingService->>BackendAPI: POST /api/ai/{workspaceId}/v2/complete/stream
activate BackendAPI
BackendAPI-->>AIMeetingService: streaming JSON chunks
loop stream chunks
AIMeetingService-->>AIMeetingBlock: onMessage(text,false)
AIMeetingBlock->>AIMeetingUtils: updateSummaryContent(editor,meetingNode,text,false)
end
BackendAPI-->>AIMeetingService: final chunk
AIMeetingService-->>AIMeetingBlock: onMessage(fullText,true)
AIMeetingBlock->>AIMeetingUtils: updateSummaryContent(editor,meetingNode,fullText,true)
AIMeetingBlock->>AIMeetingBlock: set isGeneratingSummary false
deactivate BackendAPI
deactivate AIMeetingService
User->>TabActions: open RegenerateMenu
TabActions->>RegenerateMenu: open menu
User->>RegenerateMenu: select template or detail or language
RegenerateMenu-->>AIMeetingBlock: onTemplateSelect or onDetailSelect or onLanguageSelect
AIMeetingBlock->>AIMeetingBlock: optionally auto handleGenerateSummary()
Sequence diagram for audio upload and transcriptionsequenceDiagram
actor User
participant AIMeetingBlock
participant AudioUpload
participant AIMeetingService
participant BackendMeeting as Backend_meeting_API
participant AIMeetingUtils
User->>AIMeetingBlock: click Transcribe audio file
AIMeetingBlock->>AudioUpload: open=true
User->>AudioUpload: choose or drop audio file
AudioUpload->>AudioUpload: validateFile(file)
User->>AudioUpload: click Transcribe
AudioUpload->>AIMeetingBlock: onUpload(file,options)
AIMeetingBlock->>AIMeetingBlock: handleAudioUpload(file,options)
AIMeetingBlock->>AIMeetingService: transcribeAudio(file,options)
activate AIMeetingService
AIMeetingService->>BackendMeeting: POST /api/meeting/{workspaceId}/transcribe-audio-file
activate BackendMeeting
BackendMeeting-->>AIMeetingService: APIResponse<TranscriptionResult>
deactivate BackendMeeting
AIMeetingService-->>AIMeetingBlock: TranscriptionResult
deactivate AIMeetingService
AIMeetingBlock->>AIMeetingUtils: createSpeakerNodesFromTranscription(editor,meetingNode,result)
AIMeetingUtils->>AIMeetingUtils: replace transcription children with SpeakerNode and ParagraphNode
AIMeetingUtils->>AIMeetingUtils: update speaker_name_map
AIMeetingBlock-->>AudioUpload: resolve onUpload
AudioUpload->>AudioUpload: close dialog
Class diagram for AI Meeting block components and typesclassDiagram
direction LR
class AIMeetingBlock {
+TabType activeTab
+SummaryTemplateResult templates
+boolean isGeneratingSummary
+boolean isTranscribing
+handleTitleChange(newTitle)
+handleGenerateSummary(template,instruction,fixedPrompt)
+handleRegenerate()
+handleTemplateSelect(template,section)
+handleDetailSelect(detail,instruction)
+handleLanguageSelect(languageCode)
+handleAudioUpload(file,options)
+handleCopy()
+handleNewNotes()
}
class AIMeetingService {
-string workspaceId
-AxiosInstance axiosInstance
+AIMeetingService(workspaceId,axiosInstance)
+getSummaryTemplates() SummaryTemplateResult
+generateSummary(content,options,onMessage) StreamResponse
+transcribeAudio(file,options) TranscriptionResult
}
class SummaryTemplateResult {
+SummaryTemplateSection[] sections
+SummaryInstruction[] instructions
+string fixed_prompt
}
class SummaryTemplateSection {
+string section_name
+SummaryTemplate[] templates
}
class SummaryTemplate {
+string prompt_name
+string prompt
+string icon
}
class SummaryInstruction {
+string key
+string value
}
class TranscriptionOptions {
+TranscriptionModel model
+string language
+string prompt
+number temperature
+TranscriptionResponseFormat response_format
}
class TranscriptionResult {
+string text
+string language
+number duration
+TranscriptionSegment[] segments
}
class TranscriptionSegment {
+string id
+number start
+number end
+string text
+string speaker
}
class RegenerateMenu {
+boolean open
+onOpenChange(open)
+onTemplateSelect(template,section)
+onDetailSelect(detail,instruction)
+onLanguageSelect(languageCode)
}
class TabActions {
+onRegenerate()
+onCopy()
+onTemplateSelect(template,section)
+onDetailSelect(detail,instruction)
+onLanguageSelect(languageCode)
}
class AudioUpload {
+boolean open
+onOpenChange(open)
+onUpload(file,options)
}
class AIMeetingBlockData {
+string title
+string date
+string audio_file_path
+string recording_state
+number duration
+string summary_template
+string summary_detail
+string summary_language
+string transcription_provider
+string created_at
+string last_modified
+number selected_tab_index
+Record~string,string~ speaker_name_map
}
class SpeakerBlockData {
+string speaker_id
+string speaker_name
+number timestamp
}
class AIMeetingNode {
+BlockType type
+AIMeetingBlockData data
+Node[] children
}
class AIMeetingSummaryNode {
+BlockType type
+AIMeetingSummaryData data
}
class AIMeetingNotesNode {
+BlockType type
+AIMeetingNotesData data
}
class AIMeetingTranscriptionNode {
+BlockType type
+AIMeetingTranscriptionData data
}
class SpeakerNode {
+BlockType type
+SpeakerBlockData data
}
class AIMeetingSummaryData
class AIMeetingNotesData
class AIMeetingTranscriptionData
class AIMeetingUtils {
+findParentAIMeetingNode(editor,node) AIMeetingNode
+updateNodeData(editor,node,newData)
+updateMeetingTitle(editor,meetingNode,newTitle)
+updateSpeakerName(editor,meetingNode,speakerId,newName)
+getSpeakerDisplayName(meetingNode,speakerId) string
+extractMeetingContent(meetingNode) string
+updateSummaryContent(editor,meetingNode,content,done)
+createNotesContent(editor,meetingNode)
+createSpeakerNodesFromTranscription(editor,meetingNode,result)
}
class TemplateCache {
+getCachedTemplates() SummaryTemplateResult
+isCacheExpired() boolean
+setCachedTemplates(templates)
+clearTemplateCache()
}
class BlockType {
<<enum>>
AIMeetingBlock
AIMeetingSummary
AIMeetingNotes
AIMeetingTranscription
SpeakerBlock
}
AIMeetingBlock --> AIMeetingNode
AIMeetingBlock --> AIMeetingService
AIMeetingBlock --> TabActions
AIMeetingBlock --> AudioUpload
AIMeetingBlock --> AIMeetingUtils
TabActions --> RegenerateMenu
RegenerateMenu --> SummaryTemplateResult
AIMeetingService --> SummaryTemplateResult
AIMeetingService --> TranscriptionResult
TemplateCache --> SummaryTemplateResult
AIMeetingNode --> AIMeetingSummaryNode
AIMeetingNode --> AIMeetingNotesNode
AIMeetingNode --> AIMeetingTranscriptionNode
AIMeetingTranscriptionNode --> SpeakerNode
SpeakerNode --> SpeakerBlockData
AIMeetingNode --> AIMeetingBlockData
AIMeetingSummaryNode --> AIMeetingSummaryData
AIMeetingNotesNode --> AIMeetingNotesData
AIMeetingTranscriptionNode --> AIMeetingTranscriptionData
AIMeetingUtils --> AIMeetingNode
AIMeetingUtils --> AIMeetingSummaryNode
AIMeetingUtils --> AIMeetingTranscriptionNode
AIMeetingUtils --> AIMeetingNotesNode
AIMeetingUtils --> SpeakerNode
AIMeetingNode --> BlockType
AIMeetingSummaryNode --> BlockType
AIMeetingNotesNode --> BlockType
AIMeetingTranscriptionNode --> BlockType
SpeakerNode --> BlockType
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
🥷 Ninja i18n – 🛎��� Translations need to be updatedProject
|
| lint rule | new reports | level | link |
|---|---|---|---|
| Missing translation | 868 | warning | contribute (via Fink 🐦) |
71b3286 to
c05a2e3
Compare
c05a2e3 to
7a3b8fc
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Checklist
General
Testing
Feature-Specific
Summary by Sourcery
Add a fully functional AI Meeting block with nested summary, notes, and transcription sub-blocks, including audio transcription, AI-powered summarization, and editor integration.
New Features:
Enhancements:
Build:
Tests: