valentyn-vb / valentyn-vb/Recap-Project-6

AI-powered "Generate Summary" action for Goals

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Learning Companion - AI-powered summary

Tasks
  • Add a "Generate summary" action/button on the goal detail page.
  • Collect the goal's recent LearningSessions (date, duration, notes, tags) and attached Resources (title, type, url).
  • Send this context to the OpenAI Chat Completions API with a prompt that asks for a progress summary (e.g. "You spent 5 hours on Docker; you've covered X, next focus: Y").
  • Display the returned summary on the goal detail page.
  • Store the OpenAI API key the idiomatic way for the framework. Never hardcode it.
Acceptance criteria
  • Clicking "Generate summary" on a goal with sessions/resources returns a coherent summary referencing that goal's actual logged time and resources.
  • API key is read from environment/config, not committed to source control.
  • Handles the case of a goal with no sessions/resources yet (no crash, sensible empty-state message).
  • Handles OpenAI API errors gracefully (timeout, rate limit, invalid key) with a user-facing error message instead of a stack trace.
  • Tests cover: request payload construction (sessions/resources correctly gathered and scoped to the current user's goal), and graceful handling of API failure (mock the OpenAI call — do not hit the real API in tests).
Notes for agent
  • Mock/stub the OpenAI API call in tests — do not make real API calls during the test suite.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the goal detail page and trace how the current user's goal, recent LearningSessions, and attached Resources are loaded. Then review the OpenAI Chat Completions API integration requirements and the existing test setup. Done means the action displays a scoped summary, handles empty data and API failures, keeps the key in configuration, and covers payload construction and mocked failures in tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ai, api, full-stack, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.