chrome-localhost3000-usage
Guide and workflow for Chrome Superpowers - localhost:3000 Usage. Use when you need Chrome Superpowers - localhost:3000 Usage.
What this skill does
# Chrome Superpowers - localhost:3000 Usage
## AI Universe Frontend Testing
### Typing in the Chat Input
**Problem**: Chrome Superpower's `type` action doesn't trigger React's onChange handlers.
**Solution**: Use JavaScript eval to properly dispatch React events:
```javascript
const textarea = document.querySelector('textarea[placeholder*="Ask"]');
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, 'value').set;
nativeInputValueSetter.call(textarea, 'YOUR_MESSAGE_HERE');
// Dispatch input and change events to trigger React handlers
const inputEvent = new Event('input', { bubbles: true });
textarea.dispatchEvent(inputEvent);
const changeEvent = new Event('change', { bubbles: true });
textarea.dispatchEvent(changeEvent);
```
### Clicking the Send Button
**Selector**: `[data-testid="chat-input-submit"]`
```javascript
// Click the send button
action: "click"
selector: "[data-testid=\"chat-input-submit\"]"
```
### Taking Screenshots
Save to `/tmp/screenshots/` directory:
```javascript
action: "screenshot"
payload: "/tmp/screenshots/descriptive-name.png"
```
### Navigation
```javascript
action: "navigate"
payload: "http://localhost:3000"
```
### Capturing Console Logs
Console logs cannot be accessed directly via CDP, but you can inject a capture script:
```javascript
// Inject log capture
if (!window.__capturedLogs) {
window.__capturedLogs = [];
const originalLog = console.log;
console.log = function(...args) {
window.__capturedLogs.push({ type: 'log', message: args.join(' '), timestamp: Date.now() });
originalLog.apply(console, args);
};
}
// Later, retrieve logs
window.__capturedLogs.filter(log =>
log.message.includes('๐ต') || log.message.includes('๐ข') ||
log.message.includes('๐ก') || log.message.includes('๐ฃ')
);
```
## Disappearing Messages Bug Investigation (Nov 2025)
### Bug Summary
Messages disappear immediately after clicking Send, only reappearing after page reload.
### Reproduction Evidence
- โ
Bug confirmed with screenshots (`/tmp/screenshots/7-after-foobar-send.png`)
- โ
Message submission works (button shows "Asking...", backend processes)
- โ **Optimistic UI update missing**: User message not visible in chat area
### Key Hypothesis: Cache Invalidation Race Condition
**Likely cause**: `queryClient.invalidateQueries()` called too early in `onSuccess` handler (src/hooks/useConversations.ts:993-1000)
**Sequence**:
1. User clicks Send
2. `onMutate` adds optimistic message โ UI shows message โ
3. API call starts
4. `invalidateQueries` called before backend saves message
5. Query refetches โ returns OLD data without new message
6. Cache updated with stale data โ **message disappears** โ
### Debug Logs Added
Location: `src/hooks/useConversations.ts:850-1063`
- ๐ต = onMutate operations (optimistic updates)
- ๐ข = onSuccess operations (after API succeeds)
- ๐ก = Skipped operations (conditional branches)
- ๐ฃ = Cache state checks (deduplication)
### Investigation Files
- Findings: `/tmp/disappearing-messages-findings.md`
- Reference bead: `convov-b2e`
- Screenshots: `/tmp/screenshots/`
### Recommended Fix
See `/tmp/disappearing-messages-findings.md` for three potential fixes:
1. Remove premature invalidation
2. Delay invalidation until backend confirms save
3. Use `setQueryData` instead of invalidation
## Key Learnings
1. React controlled inputs require native value setter + event dispatching
2. Screenshots should be descriptive and timestamped
3. Always wait for elements before interacting: `await_element` action
4. Console logs can be captured by injecting wrapper functions
5. Race conditions between optimistic updates and query invalidation cause UI bugs
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.