Skip to content

feat(conversations): add move binding endpoint#488

Closed
sytone wants to merge 1 commit into
mainfrom
feat/conversation-binding-move
Closed

feat(conversations): add move binding endpoint#488
sytone wants to merge 1 commit into
mainfrom
feat/conversation-binding-move

Conversation

@sytone
Copy link
Copy Markdown
Owner

@sytone sytone commented May 22, 2026

Closes #140

Changes

New endpoint: POST /api/conversations/{conversationId}/bindings/{bindingId}/move

Allows moving a channel binding from one conversation to another:

  • Removes the binding from the source conversation
  • Adds it to the target conversation
  • Both conversations saved atomically
  • Same-conversation move is a no-op (returns 204)

Request body

{ "targetConversationId": "c_abc123" }

Response codes

  • 204 — success (or same-conversation no-op)
  • 400 — empty targetConversationId
  • 404 — source conversation, binding, or target conversation not found

MoveBindingRequest DTO

Added to ConversationDtos.cs alongside the existing AddBindingRequest.

Tests (6 new)

  • Happy path: binding removed from source, appears in target
  • Same-conversation no-op: count unchanged, returns 204
  • Source not found: 404
  • Binding not found: 404
  • Target not found: 404
  • Empty targetConversationId: 400

All 1642 gateway + 86 CLI + 206 CodingAgent tests pass.

Note: This is the server-side REST API portion of #140. Portal UI (bindings settings panel, drag-to-move) is a follow-up.

…ndings between conversations

- POST /api/conversations/{conversationId}/bindings/{bindingId}/move
- Body: { targetConversationId }
- Removes binding from source, adds to target conversation
- Same-conversation move is a no-op (204)
- 400 on empty targetConversationId
- 404 if source conversation, binding, or target conversation not found
- 6 new tests (happy path, same-conv no-op, source-404, binding-404, target-404, empty target)

Closes #140
@sytone
Copy link
Copy Markdown
Owner Author

sytone commented May 22, 2026

Farnsworth Review -- PR #488

CI: All checks passing
Merge conflicts: CLEAN/MERGEABLE
Conventional commit title: feat(conversations): add move binding endpoint -- correct

Test coverage: 6 tests covering happy path, same-conversation no-op, source/binding/target not-found, empty request body. All 1642 gateway + 86 CLI pass.

Spec completeness vs #140: Server-side REST API portion complete. Portal UI noted as follow-up -- acceptable scope split.

Code notes:
Atomic save of both conversations is good defensive practice.
Same-conversation no-op returning 204 is correct REST semantics.
MoveBindingRequest DTO co-located with AddBindingRequest -- sensible.

LGTM. Ready to merge.

@sytone
Copy link
Copy Markdown
Owner Author

sytone commented May 22, 2026

CI: All checks passing
Merge conflicts: Clean / MERGEABLE
Commit title: Conventional commit format correct
Coverage: 6 tests covering 204 success, no-op same-conversation, 400/404 sad paths
Spec completeness: Closes partial #140 (move binding endpoint) - POST /api/conversations/{id}/bindings/{bid}/move implemented; portal bindings settings panel noted as follow-up

LGTM - ready to merge.

Copy link
Copy Markdown
Owner Author

@sytone sytone left a comment

Choose a reason for hiding this comment

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

Farnsworth Review — PR #488

CI: ✅ All checks passing
Merge conflicts: ✅ Clean (MERGEABLE)
Conventional commit title:feat(conversations): add move binding endpoint

Test coverage:

  • ✅ 6 tests (204 success, no-op same-conv, 400 missing target, 404 conv not found, 404 binding not found)
  • 1642/1642 pass

Spec completeness vs #140 (partial): REST endpoint implemented. Portal UI (bindings settings panel) correctly deferred to PR #493.

LGTM. Ready to merge.

@sytone
Copy link
Copy Markdown
Owner Author

sytone commented May 22, 2026

Closing as part of a planned hard-reset of the in-flight branch set so the new domain-model refactor can land on a clean trunk.

Audit verdict: close

Rationale: ChannelBinding shape changes in Phase 6b (ThreadId removed; composite ChannelAddress). Re-add the endpoint on the new shape.

The new plan (in session state) reshapes core types: Citizen (User+Agent union), Vogen-generated value objects, ThreadId removed in favour of composite ChannelAddress, mark-not-delete compaction, centralised SessionContextProjector, single-path routing. Many in-flight branches touch contracts that are about to change — rebasing later would be more work than rebuilding on the new shape.

If this work is still wanted, refile as a new issue/PR against the post-refactor contracts.

@sytone sytone closed this May 22, 2026
@sytone sytone deleted the feat/conversation-binding-move branch May 22, 2026 18:47
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.

[Conversations] Allow explicit binding management — attach/detach channel address to a conversation

1 participant