Skip to content

Conversation

@konstantiniiv
Copy link
Collaborator


  • 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 a store-based architecture for managing relation options with drag-and-drop reordering capabilities. The changes replace the SpaceManager dependency with direct SpaceId usage and introduce a global subscription system for relation options.

Key Changes:

  • Introduces StoreOfRelationOptions with RelationOptionsSubscriptionManager for centralized relation option management
  • Adds SetRelationOptionOrder use case with full middleware integration for persisting option order
  • Implements drag-and-drop reordering UI with haptic feedback for editable tag/status relations

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
TagOrStatusValueViewModel.kt Refactored to use SetRelationOptionOrder instead of SpaceManager; added OnMove action handler for drag-and-drop
TagOrStatusValueViewModelFactory.kt Updated dependency injection to replace SpaceManager with SetRelationOptionOrder
StoreOfRelationOptions.kt New domain store with thread-safe CRUD operations and relation key indexing
RelationOptionsSubscriptionManager.kt New global subscription manager for relation options lifecycle
RelationOptionsSubscriptionContainer.kt New subscription container handling real-time relation option updates
SetRelationOptionOrder.kt New use case for persisting relation option order
MiddlewareServiceImplementation.kt Added setRelationOptionsOrder RPC method implementation
BlockMiddleware.kt Added repository integration for setRelationOptionOrder
GlobalSubscriptionManager.kt Integrated relation options subscription into global lifecycle
TagOrStatusCompose.kt Implemented reorderable list UI with drag handles and haptic feedback
TagItem.kt / StatusItem.kt Added drag handle UI elements and dragging state animations
Common.kt Removed unused ItemTagOrStatusCreate composable
Relations.kt Added RELATION_OPTION_ORDER constant
ObjectWrapper.kt Added relationKey and orderId properties to Option wrapper
Command.kt Added SetRelationOptionsOrder command
DI modules Updated dependency injection for new components
Comments suppressed due to low confidence (2)

core-ui/src/main/java/com/anytypeio/anytype/core_ui/relations/Common.kt:1

  • These imports are no longer used after removing the ItemTagOrStatusCreate composable. They should be removed to keep the import list clean.
package com.anytypeio.anytype.core_ui.relations

core-ui/src/main/java/com/anytypeio/anytype/core_ui/relations/Common.kt:1

  • These imports are no longer used after removing the ItemTagOrStatusCreate composable. They should be removed to keep the import list clean.
package com.anytypeio.anytype.core_ui.relations

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

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@konstantiniiv konstantiniiv marked this pull request as draft November 29, 2025 17:38
@konstantiniiv konstantiniiv marked this pull request as ready for review December 4, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants