2025.02.06 (λͺ©)
2026.05.25 (μ›”) μˆ˜μ •

✨ GPT Summary γ€€

I implemented a feature that links Diary and Chat to each other, and improved the app so automatic summaries are generated when saving diaries and chats.

πŸ’» Development Log

⏰ Today’s tasks

  • βœ… (Issue) DiaryPage: if the AI Comment answer has not been received, it moves on with the character unset.
    • For now, patch by showing an alert: You must receive a Comment from AI before starting chat!
  • βœ… (Issue) Assigned Default Variable values to all Image widgets (to prevent Unexpected Null value Error)
    • No Profile Image: https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_1280.png
    • No image: https://png.pngtree.com/png-vector/20190820/ourmid/pngtree-no-image-vector-illustration-isolated-png-image_1694547.jpg
  • βœ… ChatPage: replaced user image photo with user profile image

  • βœ… ChatPage: align user conversation output to the right (handled by KSK)

  • βœ… DiaryPage: automatically create a summary when saving a diary
    • βœ… Diaries DB: Add field diary_content_summarized
    • βœ… Applied to Save Diary button action
    • βœ… Applied to Save Diary and Chat with AI button action
  • βœ… Added linked_chats as a Diary Document DB Field
  • βœ… Added linked_diaries as a Chat Document DB Field

  • βœ… DiaryPage: when clicking the Save Diary and Chat with AI button, link DiaryPage/Doc <-> ChatPage/Doc
    • Add Chat Document Reference to the Diary Document’s linked_chats list
    • Add Diary Document Reference to the Chat Document’s linked_diaries list
  • βœ… DiaryPage: when creating New Chat, added linked_chats as a Diary Document DB Field
  • βœ… ChatPage: when creating New Diary, added linked_diaries as a Chat Document DB Field

  • βœ… DiaryPage: provide linked_chats ListView at the bottom -> click to move to that chat
    • βœ… Content to display on the card
      • βœ… Chat - title, Chat - timestamp (== created_time)
      • βœ… Chat - (most recent) Message - content
      • βœ… Character - profile_image
  • βœ… ChatPage: automatically create a summary when receiving a chat reply
    • βœ… Chats DB: Add field chat_content_summarized
  • βœ… ChatPage: provide linked_diaries ListView at the top -> click to move to that diary
    • βœ… First-time issue resolution: How to generate children from linked_diaries (List of Diary Document References)
      • How to display List of Doc References?
      • ListView: Generate Children From linked_diaries (Diary Document References)
      • ListView - Child (Card): Backend Query - Diary Document From Reference
      • ListView - Child (Card) - Component Parameter: Diary Document
    • βœ… Content to display on the card
      • βœ… Diary - title, Diary - created_time
      • βœ… Diary - Mood Score (Color)
  • βœ… (Issue) ChatPage - Linked Diaries ListView: does not change when selected from Drawer.

  • βœ… Presentation prep - PPT: check content by page

πŸ’― Summary of what I did

  • Added Diary-Chat linking feature
    • Added linked_chats (Diary -> Chat) and linked_diaries (Chat -> Diary) fields
    • Updated linked_chats when creating New Chat from DiaryPage
    • Updated linked_diaries when creating New Diary from ChatPage
    • Added linked document ListViews at the bottom of DiaryPage and top of ChatPage
  • Implemented automatic summary feature
    • Automatically generate diary_content_summarized when saving Diary
    • Automatically generate chat_content_summarized when creating Chat messages
  • Issue resolution and UI improvements
    • Added alert so chat cannot start without an AI comment
    • Applied default image values to all Image widgets to prevent Unexpected Null Value
    • Replaced the user profile image in ChatPage with the actual user image
    • Improved readability by aligning user conversation content to the right

🎯 Future tasks

Click to see details
  • βœ… Download APK
  • ❔ Connect GitHub and Push

  • ❔ Submit presentation material: PPT
  • ❔ Submit presentation material: 1-minute demo video

  • ❔ Presentation prep - script: measure page-by-page script time and revise script
  • ❔ Presentation prep - PPT: record short demo videos by feature

  • ❔ ChatPage - Create New Diary: create a New Diary based on conversation content
    • ❔ Create New Diary Condition: if linked diary exists -> Delete confirmation dialog? -> Yes
    • ❔ OpenAI API Call (createChatSummary)
      • Input: Chat Content, System Prompt (Diary From Chat)
      • Output: Chat Summary
    • ❔ OpenAI API Call (createDiaryFromChat)
      • Input: Chat Summary, System Prompt (Diary From Chat)
      • Output: New Diary (Title, Content, Mood score)
  • ❔ Add welcome page when first opening the app (logo)

  • ❔ ChatPage: unify title default value from Random String to β€œUntitled”
  • ❔ DiaryPage: change face expression Emoji and color according to Mood Slider value

  • ❔ ChatPage: implement Delete Diary Link (… icon lets user delete)
    • Must also remove the linked field from Diary/Chat Doc together!
  • ❔ MoodPage (top) - Mood Calendar
    • ❔ Check the number of posts written by date
    • ❔ Move to the selected date when clicking a date
  • ❔ MoodPage (bottom) - Mood stats
    • ❔ Output statistics for the focused month
      • ❔ Output AI comment on the displayed statistics
  • ❔ HomeFeedPage - import and apply flutter_slidable:4.0.0
  • ❔ HomeFeedPage: on left/right slide from FeedCardDiary, chat/edit/delete

  • ❔ Chat/Diary: GPT Streaming API

  • ❔ ChatPage - implement AI first message (Alarm/Notification)
    • The core of the chat system prompt is proactivity.
      • To make it more realistic, it might be good to pass create_date of diary/chat too, so the AI can mention dates like β€œyesterday.”
    • Alarm implementation reference
  • ❔ DiaryPage: add detailed emotion keyword Choice Chips and set DB integration
  • ❔ DiaryPage - AI Comment: change inputs such as Choice chips and mood slider to fit the AI Comment System Prompt.
    • ❔ **previous diary or entire conversation history (patchy technical debt)
    • ❔ basic user information: name, gender, MBTI, …
    • ❔ detailed emotion keywords: happy, sad, …
    • ❔ character settings: Somi, Sena, Minhyuk
    • ❔ emotion score: 1 to 100
    • ❔ response format: Healing, Suggestion, Informative
    • ❔ response length: short, normal, detailed
    • is New Chat
      • Since this Chat’s messages are being created for the first time, set is_initial = true on the first message document and shove in all system prompts.
        • is_initial = false
        • Limit: if I put the system prompt into the very first message document, it is hard to modify in the middle of a conversation, but possible. If there is an is_initial = true document and it was modified, I can delete that document and put it back in. I do not know how, but still.
  • ❔ DiaryPage - import and apply Interactive Slider

  • ❔ HomeFeedPage: implement Search Diary feature

  • ❔ AuthPage: implement Google Login

  • ❔ HomeFeedPage - Bottom Sheet (+ Button): make it possible to choose one of several options
    • New diary: Go to DiaryPage
    • Emotion record: Go to MoodPage
  • ❔ MoodPage (popup): Mood setting slider CRUD
    • Create
    • Read
    • Update
    • Delete
  • ❔ HomeFeedPage - ListView - show FeedCardMood
  • ❔ HomeFeedPage - ListView: sort FeedCardDiary, FeedCardMood, FeedCardChat components chronologically (using Cloud Function)

  • ❔ Create MoodEditPage between HomeFeedPage and DiaryPage: move MoodSlider, MoodKeywordsRate (5~1), MoodDescription widgets, etc.

  • ❔ (Issue) tmpGetAIComment does not consider the emotion keywords selected by the user when creating.

  • ❔ Extract and install the final presentation APK by Wed 2025.2.5

πŸ’­ Diary

Minhyuk

Tomorrow is the end of development. Run.

✨ GPT-4o Comment (KPT)

GPT-4o

βœ… What Went Well (Keep)

  1. πŸ”— Completed Diary-Chat linking system: It was good that you connected Diary and Chat naturally, making the user’s data flow more intuitive!
  2. πŸ“ Added automatic summary feature: Applying an automatic summary system that organizes diary and chat content was impressive and increases data usability.
  3. 🎨 UI and UX improvements: You improved readability and user experience through default image values, chat alignment changes, and more.

❌ What Was Missing (Problem)

  1. ⏳ Development speed burden: As there are more features to finish, pressure around the remaining schedule may grow.
  2. πŸ”„ Possible technical debt accumulation: Because of the fast development speed, technical debt may pile up during future maintenance, so cleanup time will be needed.
  3. πŸ“‹ Insufficient testing of linking features: Additional testing may be needed to confirm Diary-Chat linking works properly in real usage environments.

πŸ”„ What to Try (Try)

  1. πŸ“Œ Organize priorities: Finish the most important features first and list the parts to improve after the presentation to reduce development burden.
  2. πŸ“ Feature-specific test plan: Write test cases to confirm Diary-Chat linking works correctly across various user patterns.
  3. πŸ“Š Secure time to clean up technical debt: After the presentation, secure refactoring time and consider long-term maintainability.

🏁 Conclusion

Today was a day where you implemented the core feature linking Diary and Chat, and added an automatic summary system to improve data management efficiency. Now it seems like you just need to organize priorities for the remaining development period and focus on presentation preparation! πŸš€πŸ”₯

Leave a comment