Skip to content

Commit 2c84d80

Browse files
navidshadclaude
andcommitted
docs: document sibling repos and cross-repo branch workflow
Add a Sibling Repositories section to README.md and CLAUDE.md covering subturtle-dashboard-app (server/dashboard) and pilotui, plus guidance for agents to search/clone a sibling locally and work on a feature branch in the sibling when a change is needed to verify this repo's branch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9aaf15e commit 2c84d80

2 files changed

Lines changed: 55 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,46 @@ yarn typecheck # tsc --noEmit via the upstream-error filter
1717

1818
Load `dist/` as an unpacked extension at `chrome://extensions`. There is no separate dev server — the bundler writes straight to `dist/`, and Chrome reloads when you click the reload button on the extension card.
1919

20+
## Sibling repositories
21+
22+
This extension does not stand alone — it depends on two other `codebridger` repos. They are normally checked out **next to** this repo (`../`), and devs work on all of them side-by-side from the `subturtle-all-apps.code-workspace`.
23+
24+
| Sibling | Repo | Consumed here as | Local checkout |
25+
| --- | --- | --- | --- |
26+
| Server / Dashboard | [`codebridger/subturtle-dashboard-app`](https://github.com/codebridger/subturtle-dashboard-app) | TS types imported by [src/stores/profile.ts](src/stores/profile.ts) via `../../../dashboard-app/frontend/types/database.type`; also the live dev API/auth server at `https://dev.dashboard.subturtle.app/`. | `../dashboard-app` — the import path resolves to a dir of that exact name next to this repo's root. CI clones it there (see [release.yml](.github/workflows/release.yml)). |
27+
| pilotUI | [`codebridger/pilotui`](https://github.com/codebridger/pilotui) | npm dependency `pilotui@^1.29.0` — the Tailwind/Vue component library the whole UI builds on. | `node_modules/pilotui` (a published, built artifact — **not** the source repo). Clone the repo separately to edit the source. |
28+
29+
### Working across siblings (download / search / branch)
30+
31+
When a change on this repo's branch needs a matching change in a sibling — a new field on a `dashboard-app` type, a fix in a `pilotui` component — you can pull the sibling in and work on it. **Do this on a feature branch in the sibling; never commit to the sibling's `main` just to make this repo's branch pass.** The goal is to verify this repo's branch against the modified sibling while keeping the sibling's `main` clean.
32+
33+
1. **Search locally first.** The sibling is often already on disk next to this repo. Confirm before cloning:
34+
```bash
35+
git -C ../dashboard-app remote -v # expect codebridger/subturtle-dashboard-app
36+
ls node_modules/pilotui # the built pilotui (read-only artifact)
37+
```
38+
`dashboard-app` may also be checked out under its full name `../subturtle-dashboard-app`; the import path needs a dir literally named `dashboard-app`, so symlink or clone into that name.
39+
2. **Download it if missing.**
40+
```bash
41+
git clone https://github.com/codebridger/subturtle-dashboard-app.git ../dashboard-app
42+
git clone https://github.com/codebridger/pilotui.git ../pilotui
43+
```
44+
3. **Branch the sibling, then change it.**
45+
```bash
46+
git -C ../dashboard-app checkout -b <feature-branch> # e.g. feat/new-bundle-field
47+
# …edit types/components in the sibling…
48+
```
49+
This keeps the sibling's `main` untouched while this repo's branch is tested against the patched code.
50+
4. **Point this repo at the local pilotui to test a patch** (the dashboard types are already read straight off `../dashboard-app`):
51+
```bash
52+
(cd ../pilotui && yarn link) && yarn link pilotui # use local pilotui source
53+
# …verify…
54+
yarn unlink pilotui && yarn install --force # revert before committing
55+
```
56+
Never leave a `yarn link` / `file:` override in `package.json` when you commit — CI installs `pilotui@^1.29.0` from the registry.
57+
58+
Same confirm-before-acting rule as always: never push a sibling branch or open a PR against a sibling without explicit per-action user confirmation.
59+
2060
## Bundles (+ popup, background)
2161

2262
| Bundle | Entry | Runs on | Purpose |
@@ -146,7 +186,7 @@ And the `SettingsObject` type in [src/common/types/messaging.ts](src/common/type
146186
- **Selection popup must `@mousedown.prevent.stop`.** Otherwise clicking the popup deselects the page text, the composable detects the empty selection, and the popup unmounts mid-click.
147187
- **The mount root in Nibble must not block the page.** Set `width: 0; height: 0; position: fixed; top: 0; left: 0`. Children use their own `position: fixed` to position themselves relative to the viewport.
148188
- **Theme dark class lives on `.subturtle-scope`, not `<html>`.** Tailwind's `dark:` rules are rewritten by `postcss-prefix-selector` to `.subturtle-scope.dark ...` — so the same element must carry both classes. The settings store handles this and a `MutationObserver` keeps Vue Teleport subtrees in sync.
149-
- **`src/stores/profile.ts` imports types from a sibling repo.** The path `../../../dashboard-app/frontend/types/database.type` resolves to a directory _next to_ this repo's root, not inside it. The actual repo is [`codebridger/subturtle-dashboard-app`](https://github.com/codebridger/subturtle-dashboard-app); local builds work because devs check both repos out side-by-side. CI clones the dashboard repo into `../dashboard-app/` before `yarn build` runs (see [.github/workflows/release.yml](.github/workflows/release.yml)). Don't try to "fix" the import to a relative-internal path or vendor the file — both will drift.
189+
- **`src/stores/profile.ts` imports types from a sibling repo.** The path `../../../dashboard-app/frontend/types/database.type` resolves to a directory _next to_ this repo's root, not inside it. The actual repo is [`codebridger/subturtle-dashboard-app`](https://github.com/codebridger/subturtle-dashboard-app); local builds work because devs check both repos out side-by-side. CI clones the dashboard repo into `../dashboard-app/` before `yarn build` runs (see [.github/workflows/release.yml](.github/workflows/release.yml)). Don't try to "fix" the import to a relative-internal path or vendor the file — both will drift. See [§ Sibling repositories](#sibling-repositories) for how to pull in / branch the dashboard and pilotui repos.
150190
- **Playwright Chromium download isn't on CCW's Trusted allowlist.** The chrome-extension-tester-mcp's `postinstall` runs `playwright install chromium`, which pulls from `cdn.playwright.dev` / `playwright.download.prss.microsoft.com`. CCW environments must use Custom network access with those hosts added — see [§ Cloud agent workflow](#cloud-agent-workflow-claude-code-on-the-web). The setup script caches Chromium into the VM snapshot so per-session cost is zero.
151191

152192
## Adding things

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Latest updates
4949
## Table of Contents
5050

5151
- [Project Overview](#project-overview)
52+
- [Sibling Repositories](#sibling-repositories)
5253
- [Architecture](#architecture)
5354
- [Main Modules](#main-modules)
5455
- [Data Flow](#data-flow)
@@ -75,6 +76,19 @@ Subturtle is a Chrome extension designed to help users learn English while watch
7576

7677
---
7778

79+
## Sibling Repositories
80+
81+
This extension is one of three side-by-side `codebridger` repositories. The other two are normally checked out **next to** this repo (`../`) and developed together via the `subturtle-all-apps.code-workspace`.
82+
83+
| Sibling | Repository | Role | How it's used here |
84+
| --- | --- | --- | --- |
85+
| Server / Dashboard | [`codebridger/subturtle-dashboard-app`](https://github.com/codebridger/subturtle-dashboard-app) | Backend API, auth, and user dashboard (dev server at `https://dev.dashboard.subturtle.app/`). | The extension imports shared TypeScript types from it (`src/stores/profile.ts`) and talks to its API at runtime. Cloned to `../dashboard-app` locally and in CI. |
86+
| pilotUI | [`codebridger/pilotui`](https://github.com/codebridger/pilotui) | Shared Tailwind/Vue component library. | Installed as the npm dependency `pilotui` and used across the popup, ConsoleCrane, and subtitle UIs. |
87+
88+
**For contributors and AI agents:** a change in this repo sometimes needs a matching change in a sibling. You can **search for the sibling locally first** (it's usually already cloned next to this repo) and **download/clone it if it's missing**. When you need to modify a sibling to test this repo's branch, do it on a **feature branch in the sibling** rather than committing to its `main`. The full search/clone/branch/link workflow is documented in [CLAUDE.md § Sibling repositories](./CLAUDE.md#sibling-repositories).
89+
90+
---
91+
7892
## Architecture
7993

8094
### Main Modules

0 commit comments

Comments
 (0)