Skip to content

feat: GitHub MCP guide, ChannelMessageStore memory leak fix, dead state cleanup, and ReverseWordsPipe tests#12

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/vscode-mmvtzseu-31vq
Draft

feat: GitHub MCP guide, ChannelMessageStore memory leak fix, dead state cleanup, and ReverseWordsPipe tests#12
Copilot wants to merge 3 commits intomasterfrom
copilot/vscode-mmvtzseu-31vq

Conversation

Copy link

Copilot AI commented Mar 18, 2026

Addresses outstanding items from the MCP exploration session: documents GitHub MCP capabilities, fixes a resource leak in the channel message store, removes dead state, and adds missing pipe tests.

Changes

github-mcp-demo.md (new)

Documents the GitHub MCP server's capabilities — reading repos/branches/files, issue and PR management, code search, Actions log inspection, and security alerts — with practical DABubble-specific examples and a tip for combining Angular + GitHub MCP.

ChannelMessageStore — memory leak fix

destroy() was only clearing Firestore listeners; the module-level channelSnapshots Map (used for pagination cursors) was never released and state was never reset.

// before
destroy(): void {
  listener.clearAllListeners();
}

// after
destroy(): void {
  listener.clearAllListeners();
  channelSnapshots.clear();
  patchState(store, initialState);
}

ChannelState — dead state removed

publicChannels: Channel[] was declared in the state interface and initial state but never written to or consumed anywhere. The getPublicChannels computed signal already derives correctly from channels.

ReverseWordsPipe — spec added

Unit tests covering normal input, single word, empty string, null/undefined, and space-preservation with word reversal.

Original prompt

nun, was kann ich mit mcp github machen? kannst du die ganzen repos in meinem acocunt einlesen usw.?

[Chronological Review: The conversation began with the user asking how to use the MCP Angular in their project. They then requested a review of their signals for best practices, followed by a request to create a pipe that reverses words using Angular MCP. The user inquired about the execution of commands via agents and the use of the MCP Angular CLI Server with an example. Finally, they asked about the capabilities of MCP GitHub, specifically regarding reading repositories in their account.]

[Intent Mapping:

  1. "wie kann ich den mcp angular in meinem projekt benutzen?" - User wants to understand how to implement MCP Angular.
  2. "willst du mir die signals chacken, ob ich alles best practis gemacht habe." - User requests a review of their signals for adherence to best practices.
  3. "willst du mir eine pipe via angular mcp erstellen die jedes wort rückwärts schreibt." - User asks for a specific implementation of a pipe in Angular.
  4. "und die hast du jetzt nicht via agenten local auf meinem rechner ausgeführt?" - User questions the execution method of commands.
  5. "aber ich will einmal den MCP Angular CLI Server verwenden. kannst du das mit einem beispiel machen." - User requests an example of using the MCP Angular CLI Server.
  6. "ja bitte" - User confirms their request for the example.
  7. "nun, was kann ich mit mcp github machen? kannst du die ganzen repos in meinem acocunt einlesen usw.?" - User inquires about the capabilities of MCP GitHub regarding their repositories.]

[Technical Inventory:

  • MCP Angular: A tool for Angular projects.
  • Angular CLI: Command Line Interface for Angular applications.
  • GitHub API: For accessing repositories and other GitHub functionalities.]

[Code Archaeology: No specific files or code changes were discussed in detail, but the user is working with the file /home/dev2k/SynologyDrive/dev2k-Angular/newbubble/dabubble/.vscode/mcp.json.]

[Progress Assessment: The user has made several requests regarding the implementation and usage of MCP Angular and its CLI, but no specific tasks have been completed yet.]

[Context Validation: All user requests and intents are captured, focusing on the implementation of MCP Angular, best practices, and GitHub repository management.]

[Recent Commands Analysis:

  • Last Agent Commands: The user has not executed any specific commands via the agent but has made several requests for information and examples.
  • Tool Results Summary: No tool results were returned as the conversation focused on user inquiries.
  • Pre-Summary State: The agent was actively discussing the use of the MCP Angular CLI Server and the capabilities of MCP GitHub when the token budget was exceeded.
  • Operation Context: The user is exploring the functionalities of MCP Angular and GitHub, seeking practical examples and best practices.]
1. Conversation Overview: - Primary Objectives: - "wie kann ich den mcp angular in meinem projekt benutzen?" - Understanding MCP Angular usage. - "willst du mir die signals chacken, ob ich alles best practis gemacht habe." - Review of signals for best practices. - "willst du mir eine pipe via angular mcp erstellen die jedes wort rückwärts schreibt." - Request for a specific Angular pipe implementation. - "aber ich will einmal den MCP Angular CLI Server verwenden. kannst du das mit einem beispiel machen." - Request for an example using the MCP Angular CLI Server. - "nun, was kann ich mit mcp github machen? kannst du die ganzen repos in meinem acocunt einlesen usw.?" - Inquiry about MCP GitHub capabilities.
  • Session Context: The conversation has revolved around the user's exploration of MCP Angular, its CLI, and GitHub functionalities, with a focus on practical implementations and best practices.

  • User Intent Evolution: The user started with general inquiries about MCP Angular and progressed to specific requests for examples and reviews of their work.

  1. Technical Foundation:
  • MCP Angular: A tool for enhancing Angular projects.
  • Angular CLI: Used for managing Angular applications.
  • GitHub API: For accessing and managing repositories.
  1. Codebase Status:
  • File Name: /home/dev2k/SynologyDrive/dev2k-Angular/newbubble/dabubble/.vscode/mcp.json
  • Purpose: Configuration file for MCP Angular.
  • Current State: No specific modifications discussed yet.
  1. Problem Resolution:
  • Issues Encountered: No specific technical problems were identified, but the user is seeking guidance on best practices and implementation.
  • Solutions Implemented: None yet; the user is inquiring about potential solutions.
  • Debugging Context: Ongoing exploration of MCP Angular and GitHub functionalities.
  • Lessons Learned: User is learning about the capabilities of MCP Angular and its integration with GitHub.
  1. Progress Tracking:
  • Completed Tasks: None reported yet.
  • Partially Complete Work: User is actively seeking examp...

Created from VS Code.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

…WordsPipe tests

Co-authored-by: KosMaster87 <95174263+KosMaster87@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Angular pipe to reverse words feat: GitHub MCP guide, ChannelMessageStore memory leak fix, dead state cleanup, and ReverseWordsPipe tests Mar 18, 2026
Copilot AI requested a review from KosMaster87 March 18, 2026 09:33
@KosMaster87 KosMaster87 requested a review from Copilot March 18, 2026 15:56
Copy link

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 adds MCP (Model Context Protocol) demo assets and a small Angular utility pipe, while also making minor store and styling adjustments in the Angular app.

Changes:

  • Added MCP demo documentation (Angular + GitHub) and a Python script for manually testing an MCP server via JSON-RPC.
  • Added a standalone reverseWords Angular pipe with unit tests.
  • Cleaned up store state (removed unused publicChannels field) and improved ChannelMessageStore teardown; added a dark-theme icon filter in the profile view.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test-mcp.py Adds a manual MCP server test script using npx @angular/cli mcp.
src/app/stores/channel.store.ts Removes publicChannels from state/interface and initial state.
src/app/stores/channel-message.store.ts Enhances destroy() to clear pagination snapshots and reset store state.
src/app/shared/pipes/reverse-words-pipe.ts Introduces a standalone pipe that reverses each word in a string.
src/app/shared/pipes/reverse-words-pipe.spec.ts Adds unit tests for the new pipe.
src/app/shared/dashboard-components/profile-view/profile-view.component.scss Adds dark-theme styling for an icon via :host-context.
mcp-demo.md Adds an Angular MCP guide/demo write-up.
github-mcp-demo.md Adds a GitHub MCP capabilities guide.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +29 to +37
proc = subprocess.Popen(
["npx", "-y", "@angular/cli", "mcp"],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
bufsize=1,
cwd=os.path.dirname(os.path.abspath(__file__))
)
Comment on lines +12 to +22
def send_request(proc, method, params, request_id):
"""Send a JSON-RPC request to the MCP server"""
request = {
"jsonrpc": "2.0",
"id": request_id,
"method": method,
"params": params
}
proc.stdin.write(json.dumps(request) + "\n")
proc.stdin.flush()
return proc.stdout.readline()

import subprocess
import json
import sys
Comment on lines +1 to +13
/**
* @fileoverview Reverse Words Pipe
* @description Pipe that reverses each word in a string individually
* @example
* 'Hello World' | reverseWords => 'olleH dlroW'
* 'Angular Signals' | reverseWords => 'ralugnA slangS'
*/
import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
name: 'reverseWords',
standalone: true,
})
Comment on lines +64 to +71
# Step 3: Get best practices (example tool call)
print("\n🎯 Step 3: Calling 'get_best_practices' tool...")
print(" (This demonstrates how to call MCP tools)")

# Note: Tool calls may require specific parameters
# This is just a demonstration of the protocol

print("\n✅ MCP Server is working correctly!")
Comment on lines +140 to +152
```typescript
// Copilot sendet intern:
{
"method": "tools/call",
"params": {
"name": "generate_schematic",
"arguments": {
"type": "pipe",
"name": "reverse-words",
"path": "shared/pipes"
}
}
}
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