From 706ba1382c28031bb2aac4fb96266bb9946d4b70 Mon Sep 17 00:00:00 2001 From: ayobamiseun Date: Sun, 26 Jul 2026 14:59:49 +0100 Subject: [PATCH] docs: fix stale platform/ paths left over from monorepo extraction The GUI README still pointed every command at a platform/ directory that does not exist in this repo, so a fresh checkout could not follow it: setup_dev_env.sh, the venv, and the gui directory all resolve from the repo root. Also normalize platform/docs/ doc citations to docs/ in Python docstrings/comments, and correct the src-tauri doc comment that described the dev fallback as platform/.venv (the code resolves the repo-root .venv). Comment/doc changes only; no behavior change. --- coworker/connectors/adapters.py | 2 +- coworker/connectors/senders.py | 2 +- coworker/personas/__init__.py | 2 +- coworker/testing/fake_slack/__init__.py | 2 +- coworker/testing/fake_slack/server.py | 2 +- surfaces/gui/README.md | 16 ++++++++-------- surfaces/gui/src-tauri/src/lib.rs | 2 +- tests/conftest.py | 2 +- tests/test_fake_slack.py | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/coworker/connectors/adapters.py b/coworker/connectors/adapters.py index 3d64d952..e4014c26 100644 --- a/coworker/connectors/adapters.py +++ b/coworker/connectors/adapters.py @@ -194,7 +194,7 @@ async def connect(self) -> bool: # Base-URL override so tests (and the FakeSlack harness) can redirect every Web API # call — auth.test/users.info/conversations.info/chat.update AND Socket Mode's # apps.connections.open, which the handler issues on this same client. Default is the - # real Slack API. See platform/docs/FAKE-SLACK-SPEC.md. + # real Slack API. See docs/FAKE-SLACK-SPEC.md. base_url = os.environ.get("SLACK_API_URL", "https://slack.com/api/") client = AsyncWebClient(token=self.bot_token, base_url=base_url) self._app = AsyncApp(client=client) diff --git a/coworker/connectors/senders.py b/coworker/connectors/senders.py index 9ca9ff8e..b8707410 100644 --- a/coworker/connectors/senders.py +++ b/coworker/connectors/senders.py @@ -23,7 +23,7 @@ def _slack_api_base() -> str: """Web API base URL. `SLACK_API_URL` (trailing slash) lets tests / the FakeSlack harness - redirect outbound sends to a local fake. See platform/docs/FAKE-SLACK-SPEC.md.""" + redirect outbound sends to a local fake. See docs/FAKE-SLACK-SPEC.md.""" return os.environ.get("SLACK_API_URL", "https://slack.com/api/") diff --git a/coworker/personas/__init__.py b/coworker/personas/__init__.py index 2b6c46ec..ef72838c 100644 --- a/coworker/personas/__init__.py +++ b/coworker/personas/__init__.py @@ -3,7 +3,7 @@ A persona is a manifest (YAML frontmatter + a markdown body that is the system prompt) that composes vetted catalog capabilities, a family/workspace shape, and lifecycle metadata. The built-in surfaces (Code, Cowork, Chat, Ops) are themselves manifests — the same format third -parties use. See `platform/docs/PERSONAS.md`. +parties use. See `docs/PERSONAS.md`. """ from __future__ import annotations diff --git a/coworker/testing/fake_slack/__init__.py b/coworker/testing/fake_slack/__init__.py index db4b6606..c73dab10 100644 --- a/coworker/testing/fake_slack/__init__.py +++ b/coworker/testing/fake_slack/__init__.py @@ -1,6 +1,6 @@ """FakeSlack — a local, controllable Slack test double (Web API + Socket Mode). -See :mod:`coworker.testing.fake_slack.server` and ``platform/docs/FAKE-SLACK-SPEC.md``. +See :mod:`coworker.testing.fake_slack.server` and ``docs/FAKE-SLACK-SPEC.md``. """ from __future__ import annotations diff --git a/coworker/testing/fake_slack/server.py b/coworker/testing/fake_slack/server.py index c297eec0..d245df70 100644 --- a/coworker/testing/fake_slack/server.py +++ b/coworker/testing/fake_slack/server.py @@ -5,7 +5,7 @@ Slack app console**. Built on Starlette + uvicorn (both already core deps) and served on an ephemeral port via an in-process ``uvicorn.Server`` background task. -See ``platform/docs/FAKE-SLACK-SPEC.md``. The adapter is pointed at the fake via the +See ``docs/FAKE-SLACK-SPEC.md``. The adapter is pointed at the fake via the ``SLACK_API_URL`` base-URL override (env), which redirects every Web API call — including Socket Mode's ``apps.connections.open``, so the fake decides the WebSocket URL. diff --git a/surfaces/gui/README.md b/surfaces/gui/README.md index b17e54ed..60afdedf 100644 --- a/surfaces/gui/README.md +++ b/surfaces/gui/README.md @@ -5,23 +5,23 @@ Same codebase runs in a browser (dev) and as the OpenWorker desktop app. ## First time: bootstrap the Python backend -A fresh checkout has no server to run — create the venv both flows below expect: +A fresh checkout has no server to run — create the venv both flows below expect +(run from the repo root): ```bash -bash platform/packaging/setup_dev_env.sh # → platform/.venv (server + this repo's aisuite) +bash packaging/setup_dev_env.sh # → .venv (server + this repo's aisuite) ``` ## Run it (browser, two terminals) 1. **Start the server** (needs a model key, e.g. `OPENAI_API_KEY`, in the environment — - or add one later in the app's Settings): + or add one later in the app's Settings). From the repo root: ```bash - cd platform ./.venv/bin/openworker-server --cwd /path/to/your/project --port 8765 ``` 2. **Start the UI:** ```bash - cd platform/surfaces/gui + cd surfaces/gui npm install # first time npm run dev # → http://localhost:5173 ``` @@ -35,11 +35,11 @@ Vite if the server is restarted. The Tauri shell wraps the same UI and supervises the Python server itself — no separate terminal. It needs the Rust toolchain (`rustup`) plus the venv from the bootstrap step; -in dev it finds the server at `platform/.venv/bin/openworker-server` automatically (a -packaged sidecar binary is only produced by the release scripts in `platform/packaging/`). +in dev it finds the server at `.venv/bin/openworker-server` automatically (a +packaged sidecar binary is only produced by the release scripts in `packaging/`). ```bash -cd platform/surfaces/gui +cd surfaces/gui npm install # first time npm run tauri dev # builds the shell, launches the window, starts the server ``` diff --git a/surfaces/gui/src-tauri/src/lib.rs b/surfaces/gui/src-tauri/src/lib.rs index 460021b4..e8b75381 100644 --- a/surfaces/gui/src-tauri/src/lib.rs +++ b/surfaces/gui/src-tauri/src/lib.rs @@ -54,7 +54,7 @@ fn launch_token() -> String { /// (next to the app exe) on Windows. /// 3. Legacy onefile slot: `openworker-server[.exe]` next to the app binary (pre-onedir /// builds used Tauri externalBin). -/// 4. Dev fallback: the repo venv, relative to this crate (`src-tauri` → `platform/.venv`; +/// 4. Dev fallback: the repo venv, relative to this crate (`src-tauri` → `.venv`; /// `bin/` on POSIX, `Scripts\` on Windows). fn server_bin() -> PathBuf { if let Ok(p) = std::env::var("COWORKER_SERVER_BIN") { diff --git a/tests/conftest.py b/tests/conftest.py index 61abb579..ec4f986e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,7 +3,7 @@ `fake_slack` boots the in-process FakeSlack harness on an ephemeral port and points the Slack adapter at it via `SLACK_API_URL`, so the real `SlackAdapter` / `slack_bolt` stack runs end-to-end with no network, tokens, or the Slack app console. See -`coworker.testing.fake_slack` and `platform/docs/FAKE-SLACK-SPEC.md`. +`coworker.testing.fake_slack` and `docs/FAKE-SLACK-SPEC.md`. """ from __future__ import annotations diff --git a/tests/test_fake_slack.py b/tests/test_fake_slack.py index 05df88a8..252738ec 100644 --- a/tests/test_fake_slack.py +++ b/tests/test_fake_slack.py @@ -1,5 +1,5 @@ """FakeSlack acceptance tests — the real SlackAdapter / slack_bolt stack driven against the -in-process fake (no network). Mirrors the acceptance list in `platform/docs/FAKE-SLACK-SPEC.md`. +in-process fake (no network). Mirrors the acceptance list in `docs/FAKE-SLACK-SPEC.md`. These are hermetic (no real Slack) and run in CI — not marked `integration`. The `fake_slack` fixture (see conftest.py) starts the server and sets `SLACK_API_URL`.