Skip to content

Conversation

@konstantiniiv
Copy link
Collaborator

@konstantiniiv konstantiniiv commented Dec 3, 2025


  • I understand that contributing to this repository will require me to agree with the CLA

Description

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 tech-docs
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements message history tracking for chat previews, enabling the system to display the previous message when the current preview message is deleted. It also adds a fallback to display "Untitled" for empty chat space titles in the UI.

  • Adds a message history buffer (up to 10 messages per chat) to track recent messages for preview fallback
  • Updates the deletion handler to restore the previous message from history when a message is deleted
  • Adds "Untitled" fallback display for empty chat space titles

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
domain/src/main/java/com/anytypeio/anytype/domain/chats/ChatPreviewContainer.kt Implements message history tracking with a ConcurrentHashMap storing up to 10 messages per chat, enabling preview fallback on message deletion
app/src/main/java/com/anytypeio/anytype/ui/vault/VaultChatCard.kt Adds fallback to display "Untitled" string resource when chat space title is empty

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@konstantiniiv konstantiniiv merged commit 76f49e1 into release/0-42-0 Dec 3, 2025
3 checks passed
@konstantiniiv konstantiniiv deleted the droid-4057-vault-preview-is-empty-after-deleting-last-message-and-space-fix branch December 3, 2025 14:27
@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants