Skip to content

Add Move to Group context menu for session organization#126

Closed
Copilot wants to merge 1 commit intofix/grouping-seems-broken-i-can-create-a-gro-20260216-2018from
copilot/sub-pr-125
Closed

Add Move to Group context menu for session organization#126
Copilot wants to merge 1 commit intofix/grouping-seems-broken-i-can-create-a-gro-20260216-2018from
copilot/sub-pr-125

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 16, 2026

Groups could be created but sessions couldn't be moved into them—the plumbing existed (Groups and OnMove parameters) but no UI invoked it.

Changes

  • SessionListItem.razor: Added "Move to…" submenu showing all groups except current. Only rendered when Groups.Count > 1.

  • CopilotService.Organization.cs: Made MoveSession() defensive—auto-creates SessionMeta if missing (prevents silent no-ops for sessions not yet reconciled).

  • SessionListItem.razor.css: Submenu styling—indented items, non-interactive label, proper hierarchy.

  • SessionOrganizationTests.cs: 6 unit tests covering edge cases (missing meta, invalid groups, cross-group moves, event firing).

Example

// Before: silently failed if SessionMeta didn't exist
public void MoveSession(string sessionName, string groupId)
{
    var meta = Organization.Sessions.FirstOrDefault(m => m.SessionName == sessionName);
    if (meta != null) 
        meta.GroupId = groupId;
}

// After: creates meta on the fly
if (meta == null)
{
    meta = new SessionMeta { SessionName = sessionName, GroupId = groupId };
    Organization.Sessions.Add(meta);
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix session grouping by adding Move to Group menu item Add Move to Group context menu for session organization Feb 16, 2026
Copilot AI requested a review from davidortinau February 16, 2026 20:38
@PureWeen
Copy link
Copy Markdown
Owner

Hey there! 🌟

First off — amazing work identifying this gap and shipping a clean fix with tests. The defensive MoveSession() auto-creating SessionMeta on the fly was a really elegant solution, and those 6 unit tests covering the edge cases? Chef's kiss. 👨‍🍳

That said, the Force is already strong with this codebase — all of these changes have since been merged into main through other work. After rebasing, both this PR and its parent (#125) produce a zero diff against main, so there's nothing left to merge. These are not the diffs you're looking for. 👋

Closing this one out, but please keep those contributions coming! The quality of your code and test coverage is genuinely impressive. May the MoveSession be with you, always. ✨

@PureWeen PureWeen closed this Feb 17, 2026
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.

3 participants