Skip to content

Resolve conflicts in view switch functionality - #119

Merged
leefaus merged 2 commits into
devfrom
bug/no-merge
Jul 21, 2026
Merged

leefaus merged 2 commits into
devfrom
bug/no-merge

Conversation

@leefaus

@leefaus leefaus commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces several improvements to the view listing command and enhances the merge engine's ability to resolve multi-way and concurrent insertion conflicts more intelligently. The main changes include a new --short option for concise view listings, improved metadata display, and a more robust semantic merge strategy that deduplicates identical changes and resolves concurrent insertions where possible.

View Listing Command Improvements:

  • Added a new --short (-s) option to the atomic view list command, allowing users to display only view names without metadata. The default output now includes metadata, and the old --verbose option is hidden but retained for backward compatibility. [1] [2]
  • Enhanced the default output to show view metadata such as scope, change counts (including a breakdown of own vs. inherited changes for draft views), state hash, and parent view.
  • Updated help text, examples, and tests to reflect the new behavior and options. [1] [2] [3] [4]

Semantic Merge Engine Enhancements:

  • The merge engine now deduplicates vertices with identical content in conflict groups, automatically resolving N-way forks where possible. If all sides are identical, the conflict is resolved without user intervention.
  • For concurrent insertions, the engine checks if one side's tokens are a subsequence of the other's (i.e., one side subsumes the other); if so, it auto-merges in favor of the superset. [1] [2]
  • Refactored the merge logic for clarity, including a dedicated run_three_way method and improved logging for merge outcomes. [1] [2] [3]

Repository Metadata:

  • The ViewInfo struct now distinguishes between total change count and the number of changes unique to a view (own_change_count), supporting more informative listings.

Output Consistency:

  • Updated handling of unresolved forks to clarify that markers are emitted for all children when no CRDT data is available after deduplication.

@leefaus
leefaus merged commit b216da5 into dev Jul 21, 2026
8 checks passed
@leefaus
leefaus deleted the bug/no-merge branch August 12, 2026 13:09
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