Skip to content

[#38] Provide context with each meeting#42

Open
julien731 wants to merge 8 commits intodevelopfrom
feature/38-meeting-context
Open

[#38] Provide context with each meeting#42
julien731 wants to merge 8 commits intodevelopfrom
feature/38-meeting-context

Conversation

@julien731
Copy link
Copy Markdown
Member

Story: #38

Summary

Add an optional free-text context field to meetings so users can describe what the meeting is about. This context is injected into analysis prompts, enabling the LLM to produce more focused and relevant analysis.

  • Context textarea on upload form and editable in meeting detail view (saved on blur)
  • context field persisted in metadata.json via Pydantic model with empty string default
  • Analysis prompts include a ## Meeting Context section when context is non-empty
  • Backward compatible: existing meetings without context continue to work

Approach

Context is stored as a plain string field in the existing MeetingMetadata Pydantic model with a default of "", which handles backward compatibility for old metadata files automatically. For prompt injection, a [MEETING CONTEXT] placeholder was added to all templates (matching the existing [PASTE TRANSCRIPT HERE] pattern), and the frontend replaces it with a formatted section or removes it when empty.

Verification

  • Ruff linting and formatting pass (ruff check + ruff format --check)
  • Architect review passed (2 major consistency fixes applied during review)
  • Manual verification steps:
    • Upload a meeting with and without context
    • Edit context from meeting detail view, verify save-on-blur
    • Generate analysis prompts with and without context
    • Load an existing meeting (pre-feature) to verify backward compatibility

Add optional context field to MeetingMetadata (default empty string) and
MeetingUpdate. Accept context in POST /api/meetings upload and handle it
in PATCH /api/meetings/{id}.
Add optional context textarea to the upload form placed before the
preprocessing checkbox. Pass context through API.createMeeting to the
backend.
Show an editable context textarea in the meeting detail view above the
audio player. Context is saved via PATCH on blur.
Add [MEETING CONTEXT] placeholder to all 5 prompt templates. When
generating a prompt, replace with a ## Meeting Context section if
context is non-empty, or remove the placeholder if empty.
@julien731 julien731 added the feature New feature or enhancement label Apr 8, 2026
@julien731 julien731 self-assigned this Apr 8, 2026
@julien731 julien731 added the feature New feature or enhancement label Apr 8, 2026
@julien731
Copy link
Copy Markdown
Member Author

QA Confidence Verdict — Story #38: Provide context with each meeting

What Was Verified

Acceptance Criteria:

AC Status Method
1. Upload form has optional Context textarea PASS Code inspection — textarea added in upload.js with placeholder text, placed before preprocessing checkbox
2. Context saved in metadata and returned by GET PASS Code inspection — context: str = "" on MeetingMetadata, accepted as Form("") in POST endpoint, stripped before save
3. Context editable via PATCH from detail view PASS Code inspection — `MeetingUpdate.context: str
4. Analysis prompts include ## Meeting Context section when non-empty PASS Code inspection — [MEETING CONTEXT] placeholder in all 5 templates, replaced with ## Meeting Context\n\n<text> in analysis-viewer.js
5. Existing meetings without context work (empty default) PASS Code inspection — Pydantic default "" handles missing field; frontend uses meta.context || ''

Truths:

Truth Status Notes
Context defaults to empty string when not provided PASS context: str = "" in schema, Form("") in endpoint
No context section in prompts when context is empty PASS Empty context branch removes [MEETING CONTEXT]\n\n entirely
Context cleared removes section from prompts PASS Same code path — empty string after trim triggers removal
Existing meetings without context field treated as empty via Pydantic default PASS Pydantic = "" handles missing key in JSON
[MEETING CONTEXT] placeholder added to all templates before [PASTE TRANSCRIPT HERE] PASS All 5 templates updated
Frontend replaces placeholder with context section or removes it PASS getMeetingContext() reads textarea, conditional replace in handleGeneratePrompt()

Business Rules:

Rule Status
BR-1: Context is optional PASS
BR-2: Context is per-meeting PASS
BR-3: Context injected in labeled ## Meeting Context section PASS
BR-4: Context editable at any time after upload PASS

What Needs Human Eyes

  • Visual alignment of the context textarea in both upload form and meeting detail view (spacing, sizing)
  • Placeholder text readability in both light and dark themes
  • Toast message "Context saved" appearing correctly on blur

Risk Areas

  • No automated tests. This project has no test suite. Zero test coverage for the new feature. All verification was code inspection only.
  • The empty-context replacement relies on exact \n\n matching between template content and JS string. If template files have different line endings (e.g., \r\n), the replacement could fail silently, leaving the literal [MEETING CONTEXT] text in the prompt.
  • Context input has no length limit (per spec, this is intentional but worth noting for very large inputs).

Spec Drift

None detected. Implementation matches the spec faithfully.

Suggested QA Focus

  • Quick manual test (5 min): Upload a meeting with context, verify it appears in detail view, edit it, generate an analysis prompt and confirm the context section appears. Then clear context and verify the section disappears from the prompt.
  • Quick visual check: Verify textarea styling in both themes.

Verdict: PASS (with caveat on zero test coverage)

All AC, truths, and business rules are satisfied in the code. The implementation is clean and minimal. The main concern is the complete absence of automated tests, which is a pre-existing project-wide gap, not specific to this story.

Add textarea to .form-group CSS selectors so context fields inherit the
same styles as input and select elements. Remove redundant
meeting-context-section styles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant