Skip to content

Instantly share code, notes, and snippets.

View sjha4's full-sized avatar

Samir Jha sjha4

View GitHub Profile
@sjha4
sjha4 / pulp_generated_clients_migration_plan.md
Created March 19, 2026 18:43
Vendored OpenAPI Specs with Dev-Time Generation

Implementation Plan: Vendored OpenAPI Specs with Dev-Time Generation

Context

Problem: Katello depends on 9 pre-packaged Pulp Ruby client gems that the Pulp team struggles to maintain and package. These gems must be kept in sync with Pulp versions, creating a packaging bottleneck.

Solution: Generate Ruby API clients from OpenAPI specs in development, commit generated code to repository, and package with Katello RPM. This eliminates dependency on Pulp team's gem packaging while catching all generation issues in Dev/QE before customer release.

@sjha4
sjha4 / chat.md
Created March 19, 2026 14:13
Team spin up prompt

Katello Content Credentials React Conversion - Team Setup

User Request

I want a prompt to start a team of claude agents, one which works on Katello repository to convert Contentcredentials Details page to React with all the subtabs that exist in the engines/bastion_katello code for Content Credentials with routing via experimental labs under /labs/ route. I want another agent which writes the tests based on the conversion by conversion agent. I want another agent that creates airgun entities for the new components so they can be tested and then a robottelo agent that uses these new entities to come up with good tests for the new details page. Give me such a prompt which creates that team and opens a tmux split pane session.


Generated Team Setup Prompt

@sjha4
sjha4 / settings.json
Created March 19, 2026 14:10
~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
},
"preferences": {
"tmuxSplitPanes": true
},
"skipDangerousModePermissionPrompt": true
}
rtl-code-reviewer │
│ /home/sajha/.claude/agents/rtl-code-reviewer.md │
│ │
│ Description (tells Claude when to use this agent): │
│ Use this agent to review React tests when prompted to review a RTL test
name snapshottests-rtl-converter
description Converts Enzyme snapshot tests to React Testing Library tests with realistic fixtures and API mocking
tools Bash, Glob, Grep, Read, Edit, Write, NotebookEdit, WebFetch, TodoWrite, WebSearch, BashOutput, KillShell, ListMcpResourcesTool, ReadMcpResourceTool
model sonnet
color pink

You are an experienced React Javascript engineer who is proficient in writing and understanding react tests

@sjha4
sjha4 / angular-to-react-migrator.md
Last active November 12, 2025 18:29
Claude-angular-react-converter-agent.md

name: angular-to-react-migrator description: Use this agent when working on migrating AngularJS components from the engines/bastion_katello directory to React in the webpack directory of the katello/katello repository. Specifically invoke this agent when:\n\n\nContext: User is starting to migrate an AngularJS workflow to React.\nuser: "I need to migrate the content views workflow from AngularJS to React"\nassistant: "I'm going to use the Task tool to launch the angular-to-react-migrator agent to help with migrating the content views workflow from AngularJS to React."\n\nThe user is requesting a migration from AngularJS to React, which is exactly what this agent specializes in. Use the Agent tool to invoke the angular-to-react-migrator.\n\n\n\n\nContext: User has just written a new React component as part of a migration.\nuser: "I've created the new ContentViewsIndex component in webpack/components/ContentViews/"\nassistant: "Great! Let me use the angula


🧠 Setting up GitHub MCP Server for Claude

This guide walks through how to connect Claude to GitHub via an MCP (Model Context Protocol) server, enabling Claude to review PRs, comment on issues, and assist with testing workflows.


🔧 Prerequisites

@sjha4
sjha4 / convert-to-image-mode
Created May 1, 2025 14:04
Convert package-mode centos10 to image-mode
podman run --rm -it --privileged --pull=newer --security-opt label=type:unconfined_t -v /var/lib/containers/storage:/var/lib/containers/storage -v /:/target -v /root/.ssh/authorized_keys:/bootc_authorized_ssh_keys/root --pid=host quay.io/centos-bootc/centos-bootc:stream10 bootc install to-existing-root --root-ssh-authorized-keys /bootc_authorized_ssh_keys/root
@sjha4
sjha4 / SmartProxyContentTest.js
Created January 7, 2025 20:19
SmartProxyContentTest fix
diff --git a/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js b/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js
index 234fc35a71..501bf6df4f 100644
--- a/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js
+++ b/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js
@@ -1,5 +1,5 @@
import React from 'react';
-import { renderWithRedux, patientlyWaitFor, within } from 'react-testing-lib-wrapper';
+import { renderWithRedux, patientlyWaitFor, fireEvent, within, act } from 'react-testing-lib-wrapper';
import { nockInstance, assertNockRequest } from '../../../test-utils/nockWrapper';
@sjha4
sjha4 / Trip
Created December 12, 2024 05:23
21st : Williamsburg Checkin
22nd: Willaimsbug checkout -> DC checkin
23,24: DC
25th : Checkout DC, checkin - Philadelphia
27th Checkout Philadelphia - Checkin NY
28
29
30
31
1st-checkout -> Raleigh