# Chrome Exploration Tasks

> App URL: https://nexuscrm.pingcap.com/
> Tool: `dev-browser --browser nexuscrm`
> Screenshots: save to `screenshots/` with `saveScreenshot(buf, "area/name.png")`

## How to Use

Each subdirectory contains exploration task documents. An agent should:

1. Read the task document for the assigned area
2. Login to the app (token injection via localStorage)
3. Follow every operation path listed
4. Take a screenshot at each checkpoint marked with `[SCREENSHOT]`
5. Record observations in the "Results" section of the document
6. Note any bugs or deviations from expected behavior

## Login Script

```javascript
const page = await browser.getPage("main");
await page.goto("https://nexuscrm.pingcap.com/");
await page.evaluate((token) => {
  localStorage.clear();
  localStorage.setItem('auth_token', token);
  localStorage.setItem('instance_url', 'https://nexuscrm.pingcap.com');
}, TOKEN);
await page.goto("https://nexuscrm.pingcap.com/object/Lead");
await new Promise(r => setTimeout(r, 3000));
```

Get TOKEN via:
```bash
TOKEN=$(curl -s -X POST "https://nexuscrm.pingcap.com/services/oauth2/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials&client_id=test-gosf-client&client_secret=test-gosf-secret-123" \
  | python3 -c "import sys,json; print(json.load(sys.stdin).get('access_token',''))")
```

## Directory Index

| Dir | Area | Priority | Est. Paths |
|-----|------|----------|-----------|
| `global/` | App shell, search, nav, user menu | P1 | 8 |
| `lead/` | Lead list, detail, edit, convert | P1 | 12 |
| `account/` | Account list, detail, edit, related | P1 | 10 |
| `opportunity/` | Opportunity list, detail, edit, stage | P2 | 10 |
| `quote/` | Quote list, detail, new, analytics | P1 | 12 |
| `contract/` | Contract list, detail | P3 | 6 |
| `order/` | Order list, detail | P3 | 6 |
| `approvals/` | Queue, process config, submit, approve | P1 | 14 |
| `flows/` | Flow list, builder canvas, edit nodes | P1 | 8 |
| `setup/` | Users, profiles, objects, import/export | P2 | 16 |
| `tasks-calendar/` | Tasks, events, calendar view | P3 | 6 |
| `reports-dashboards/` | Reports, dashboards, analytics | P3 | 6 |

## Screenshot Naming Convention

`{area}/{operation}_{state}.png`

Examples:
- `lead/list_default.png`
- `lead/detail_view.png`
- `lead/edit_form.png`
- `lead/edit_save_error.png`
- `approvals/queue_default.png`
- `approvals/approve_dialog.png`
