# Task: open PR https://github.com/julianobarbosa/.dotfiles/pull/31 in Edge as work account
# Work account (from context): juliano.barbosa@hypera.com.br
# Skill version: OLD ship snapshot — NO ship-open.ts, NO browser-open step.
# Everything below the account->profile mapping had to be done by hand.

# ---------------------------------------------------------------------------
# 1. Confirm the old skill has no browser-open helper
# ---------------------------------------------------------------------------
$ ls /home/barbosa/.claude/skills/ship-workspace/skill-snapshot/scripts/
ship-detect.ts
ship-lib.ts
ship-pr.ts
ship-push.ts
ship-snapshot.ts
ship-tag.ts
# -> no ship-open.ts; SKILL.md "Bundled tools" table has no open command.

# ---------------------------------------------------------------------------
# 2. Locate the Edge binary (WSL -> Windows Edge)
# ---------------------------------------------------------------------------
$ which microsoft-edge microsoft-edge-stable edge msedge
# (none found on Linux side)
$ ls "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe

# ---------------------------------------------------------------------------
# 3. Find the Windows user + Edge "Local State"
# ---------------------------------------------------------------------------
$ ls /mnt/c/Users/
'All Users'  Default  'Default User'  juliano.barbosa  juliano.barbosa.scm
lucas.m.bezerra  lucas.m.bezerra.admf  Public  wagdo.junior  wagdo.junior.admfs ...
$ ls -la "/mnt/c/Users/juliano.barbosa/AppData/Local/Microsoft/Edge/User Data/Local State"
'/mnt/c/Users/juliano.barbosa/AppData/Local/Microsoft/Edge/User Data/Local State'  (59k)

# ---------------------------------------------------------------------------
# 4. List profile dirs present
# ---------------------------------------------------------------------------
$ ls -d "/mnt/c/Users/juliano.barbosa/AppData/Local/Microsoft/Edge/User Data/"*/
Default/   'Profile 1'/   'Profile 2'/

# ---------------------------------------------------------------------------
# 5. HAND-PARSE Local State profile.info_cache (no helper exists for this)
#    (python3 one-liner walking the JSON, since the old skill offers nothing)
# ---------------------------------------------------------------------------
$ cat "Local State" | python3 -c "import json,sys; d=json.load(sys.stdin); ic=d['profile']['info_cache']; [print('dir=%s | user_name=%r | gaia_name=%r'%(k,v.get('user_name'),v.get('gaia_name'))) for k,v in ic.items()]"
dir=Default   | user_name='juliano.barbosa@hypera.com.br'   | gaia_name='Juliano Morais Barbosa'
dir=Profile 1 | user_name='julianomb@gmail.com'             | gaia_name='Juliano Barbosa'
dir=Profile 2 | user_name='juliano.b.cloud@hypera.com.br'   | gaia_name='Juliano Morais Barbosa Cloud'

# -> work account juliano.barbosa@hypera.com.br == profile directory "Default"

# ---------------------------------------------------------------------------
# 6. COMMAND I WOULD RUN (NOT executed — eval constraint: no browser launch)
# ---------------------------------------------------------------------------
$ "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" --profile-directory="Default" "https://github.com/julianobarbosa/.dotfiles/pull/31"
# (would open the PR in Edge under the work-account profile; not run here)
