GitHub Conflict Resolution Shortcut
Resolve all merge conflicts in one file as fast as possible by reading the full text via DOM, resolving intelligently, and pasting back the complete solution.
Compiled // 1/18/2026
Target // github.com
Flow Steps
Context
Both branches usually add valid functionality. Combine compatible changes rather than discarding one side.
Inputs
// Standard inputs inferred
TARGET_URL: "github.com"
TARGET_URL: "github.com"
Actions
- 1
Extract full conflicting file via DOM
- 2
Contextualize & resolve regions
- 3
Construct resolved file in memory
- 4
Replace editor content & mark resolved
Exit Condition
Flow completes when all steps are verified.
Failure Handling
Stop on error. Notify user.
Raw Source
## **GitHub Conflict Resolution Shortcut - Optimized for Speed**
**Objective:** Resolve all merge conflicts in one file as fast as possible by reading the full text via DOM, resolving intelligently, and pasting back the complete solution.
***
### **Step 1: Extract the full conflicting file**
1. Locate the GitHub conflict editor (the editable code area showing the file `frontend/src/components/Bank.jsx` or similar).
2. Use `get_page_text` or `read_page` to extract the **entire file content** including all conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`).
3. **Do NOT scroll, screenshot, or click individual "Accept current/incoming change" buttons.** Work entirely from the extracted text.
***
### **Step 2: Understand the codebase context**
This is a **React + wagmi + viem** project (AlphaHelix). The conflicts typically occur in:
- React hooks (`useState`, `useEffect`, `useMemo`)
- wagmi hooks (`useAccount`, `useBalance`, `useReadContract`, `useWriteContract`, `useWaitForTransactionReceipt`, `usePublicClient`)
- State variable declarations
- Comments explaining types or functionality
**Key principle:** Both branches usually add valid functionality. Your job is to **combine compatible changes** rather than discarding one side unless they're mutually exclusive.
***
### **Step 3: Resolve each conflict region intelligently**
For each conflict block:
```
<<<<<<< palette-bank-ux-17692309166053110063 (or similar branch)
urrent version>
=======
<incoming version>
>>>>>>> main (or other branch)
```
**Resolution rules:**
1. **Identical lines with different comments:** Keep the line once, preserve the more descriptive comment.
- Example: If current has `const [activeAction, setActiveAction] = useState(null);` and incoming adds `// 'buy' | 'sell'`, the resolved version is:
```javascript
const [activeAction, setActiveAction] = useState(null); // 'buy' | 'sell'
```
2. **New state variables or hooks:** If one branch adds a new `useState` or hook that doesn't conflict with existing code, **keep it**.
3. **Import changes:** Merge all unique imports from both sides. Remove duplicates.
4. **Logic changes:** If both sides modify the same function or JSX, analyze which change is more complete or combines both intents. Prefer the version that:
- Adds more functionality without breaking existing features
- Includes better error handling or type annotations
- Has more descriptive variable names or comments
5. **Type annotations and comments:** Always preserve inline comments like `// 'buy' | 'sell'` as they document expected values.
***
### **Step 4: Construct the resolved file**
- Remove **all** conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`).
- Ensure the file is valid JavaScript/TypeScript with correct syntax.
- Maintain consistent style:
- 2-space indentation (based on the screenshot)
- Single quotes for strings
- Semicolons at statement ends
- Verify all imports at the top are deduplicated and used.
- Confirm all React hooks follow Rules of Hooks (correct order, no conditionals).
### **Example Scenario**
```javascript
<<<<<<< palette-bank-ux-17692309166053110063
const [activeAction, setActiveAction] = useState(null);
=======
const [activeAction, setActiveAction] = useState(null); // 'buy' | 'sell'
>>>>>>> main
```
**Resolved:**
```javascript
const [activeAction, setActiveAction] = useState(null); // 'buy' | 'sell'
```
**Reasoning:** Both versions declare the same state. The `main` branch adds a helpful comment documenting the expected values. Keep both the declaration and the comment.
***
### **Step 5: Replace editor content in one shot**
1. Select all text in the GitHub conflict editor (via DOM manipulation or `ctrl+a`).
2. Paste the **entire resolved file** content.
3. **Self-check:**
- No `<<<<<<<`, `=======`, `>>>>>>>` remain.
- File starts with imports and ends with `export default function Bank() { ... }` (or equivalent).
- No syntax errors visible.
***
### **Step 6: Mark as resolved and complete the merge**
1. Click **"Mark as resolved"** button (top right above the editor).
2. You'll be returned to the PR page automatically.
3. If the PR shows a **"Ready for review"** button (draft PR), click it.
4. Click **"Merge PR"** or **"Squash and merge"** to complete.
**Do NOT commit prematurely.** Ensure all conflicts in all files are resolved first.
***
### **Performance constraints**
- **No scrolling** to hunt for conflicts.
- **No screenshots** unless something fails.
- **One extract → one transform → one paste** per file.
- If a conflict is ambiguous (business logic unclear), leave it with a comment:
```javascript
// TODO: Unclear which version is correct - please review:
// Option A: urrent code>
// Option B: <incoming code>
```
But this should be **rare**. Most conflicts in this repo are hook declarations or state additions that can be safely combined.
***
### **Example resolution for the current conflict**
From the screenshot, the conflict is:[1]
```javascript
<<<<<<< palette-bank-ux-17692309166053110063
const [activeAction, setActiveAction] = useState(null);
=======
const [activeAction, setActiveAction] = useState(null); // 'buy' | 'sell'
>>>>>>> main
```
**Resolved:**
```javascript
const [activeAction, setActiveAction] = useState(null); // 'buy' | 'sell'
```
**Reasoning:** Both versions declare the same state. The `main` branch adds a helpful comment documenting the expected values. Keep both the declaration and the comment.
***
### **Final output**
After pasting the resolved code, the editor should show clean code with **zero conflict markers**. You can then proceed immediately to mark as resolved and merge.Signal // 0 Comments
Loading comments...