# Rename Project: `client-ndk` → `client`

Plan for renaming this project from `client-ndk` to `client`, covering directory rename, workspace file, package manifest, source/doc edits, build regeneration, and external cleanup.

---

## 1. Directory Rename (Manual, outside VS Code)

The workspace directory itself is `/home/user/lt/client-ndk`. Rename at the filesystem level:

```bash
# Close VS Code first, then:
mv /home/user/lt/client-ndk /home/user/lt/client
```

After rename, reopen VS Code at `/home/user/lt/client`.

## 2. Workspace File Rename

- [`client-ndk.code-workspace`](../client-ndk.code-workspace:1) → rename to `client.code-workspace`. Contents don't reference the name, so only the filename changes.

## 3. Package Manifest

- [`package-lock.json`](../package-lock.json:2) — change `"name": "client-ndk"` to `"name": "client"` (appears at root `name` and at `packages[""].name`).
- The top-level [`package.json`](../package.json:1) has no `name` field, so nothing to change there unless you want to add one.

## 4. Project-Authored Source / Docs Containing the String

| File | Line(s) | Context |
|------|---------|---------|
| [`README.md`](../README.md:1) | 1 | `# client-ndk` title heading |
| [`docs/SETTINGS.md`](../docs/SETTINGS.md:3) | 3, 94 | Prose references |
| [`docs/cache-first-page-patterns.md`](../docs/cache-first-page-patterns.md:3) | 3 | "client-ndk Pages" |
| [`plans/music-player-page.md`](music-player-page.md:5) | 5 | Prose reference |
| [`agent_browser_login.sh`](../agent_browser_login.sh:3) | 3 | Comment |
| [`www/css/strudel.css`](../www/css/strudel.css:389) | 389 | Comment "client-ndk theme" |

## 5. Deployment Path (no change needed)

- [`upload_www.sh`](../upload_www.sh:7) already uses `FINAL_PATH="/var/www/html/client"`. No change required unless you're also restructuring server deployment.

## 6. Build Artifacts (auto-regenerated — do NOT hand-edit)

These reference `/home/teknari/lt_gitea/client-ndk/...` but are produced by [`build-ndk-bundle.js`](../build-ndk-bundle.js:1) using `path.join(__dirname, ...)`. After the directory rename, simply re-run the build:

- [`build/ndk-entry.js`](../build/ndk-entry.js:1)
- [`build/meta.json`](../build/meta.json:1)
- [`build/ndk-core.bundle.js.map`](../build/ndk-core.bundle.js.map:1)
- [`www/ndk-core.bundle.js.map`](../www/ndk-core.bundle.js.map:1)

Regenerate with:

```bash
./build_and_copy.sh
```

## 7. Vendored / Third-Party Files — Leave Alone

These contain `client-ndk` only inside bundled third-party build metadata (not your code):

- [`www/strudel-repl/index.js`](../www/strudel-repl/index.js:100)
- [`www/strudel-repl/index-Bvzuq3Qo.js`](../www/strudel-repl/index-Bvzuq3Qo.js:32670)

Modifying minified vendor bundles risks breakage and they'll be overwritten on any vendor update.

## 8. Git / External

- Rename the remote repo (GitHub/Gitea/etc.) if it's also called `client-ndk` and update `.git/config`'s `origin` URL.
- Review [`.gitmodules`](../.gitmodules:1) for any path references.
- Spot-check [`.roo/`](../.roo) for hardcoded paths.
- Check shell aliases, cron jobs, systemd units, or `.desktop` entries referencing the old absolute path.
- VS Code's recent-projects list will self-heal once you open the new path.

---

## Execution Checklist

- [ ] 1. Close VS Code
- [ ] 2. `mv /home/user/lt/client-ndk /home/user/lt/client`
- [ ] 3. Rename `client-ndk.code-workspace` → `client.code-workspace`
- [ ] 4. Edit [`package-lock.json`](../package-lock.json:2) (`"client-ndk"` → `"client"`)
- [ ] 5. Edit [`README.md`](../README.md:1) heading (line 1)
- [ ] 6. Edit [`docs/SETTINGS.md`](../docs/SETTINGS.md:3) (lines 3, 94)
- [ ] 7. Edit [`docs/cache-first-page-patterns.md`](../docs/cache-first-page-patterns.md:3) (line 3)
- [ ] 8. Edit [`plans/music-player-page.md`](music-player-page.md:5) (line 5)
- [ ] 9. Edit [`agent_browser_login.sh`](../agent_browser_login.sh:3) (line 3)
- [ ] 10. Edit [`www/css/strudel.css`](../www/css/strudel.css:389) (line 389)
- [ ] 11. Reopen VS Code at `/home/user/lt/client`
- [ ] 12. Run `./build_and_copy.sh` to regenerate build/www bundle artifacts
- [ ] 13. Update git remote URL if the remote repo was also renamed
- [ ] 14. Verify no stragglers with the grep below

## Verification Command

```bash
grep -rn "client-ndk" . \
  --exclude-dir=node_modules \
  --exclude-dir=ndk \
  --exclude-dir=build \
  --exclude-dir=.git \
  --exclude-dir=strudel-repl \
  --include='*.md' --include='*.sh' --include='*.js' --include='*.mjs' \
  --include='*.css' --include='*.json' --include='*.html' --include='*.code-workspace'
```

Expected result after completion: only hits inside vendored `strudel-repl` files and auto-generated `build/`/`*.map` artifacts (before you rebuild). After `./build_and_copy.sh`, the build/map hits go away too, leaving only the leave-alone vendored files.

## Workflow Diagram

```mermaid
flowchart TD
    A[Close VS Code] --> B[mv directory client-ndk to client]
    B --> C[Rename .code-workspace file]
    C --> D[Edit source files: README, docs, css, sh, package-lock]
    D --> E[Reopen VS Code at new path]
    E --> F[Run build_and_copy.sh - regenerates artifacts]
    F --> G[Update git remote if renamed]
    G --> H[grep verify no stragglers]
```

---

## Summary

- **7 project files** need content edits (package-lock.json + 6 docs/comments)
- **1 workspace file** needs renaming
- **1 directory** needs renaming (external action)
- **4 build artifacts** auto-regenerate after one build command
- **2 vendored files** should be left alone
- External: git remote, shell env, and user-specific references to the old absolute path
