Skip to content

✨ Point the site at a local effectionx checkout - #1242

Merged
taras merged 1 commit into
v4from
tm/local-effectionx-checkout
Sep 27, 2026
Merged

taras merged 1 commit into
v4from
tm/local-effectionx-checkout

Conversation

@taras

@taras taras commented Sep 20, 2026

Copy link
Copy Markdown
Member

Motivation

The site clones thefrontside/effectionx into build/clones and reads its packages from main, so there is no way to see a package you are working on — a new package, a renamed one, an edited description — until the work is pushed and merged. Everything that renders /x, the header, and llms.txt goes through useClone(), which only knows how to clone and git reset --hard.

Approach

initClones takes a checkouts option, a map of owner/repo to a directory to use in place of a clone, and main.tsx wires EFFECTIONX_DIR to thefrontside/effectionx:

EFFECTIONX_DIR=../effectionx deno task dev

A mapped repository never reaches cloneOrRefresh, so it is never cloned, fetched or reset — the site reads whatever branch and uncommitted work are on disk, and cannot disturb a checkout you are working in. Paths are resolved and checked before the clones directory is emptied, so a path that is not there fails at startup with cannot use /path as a local checkout of thefrontside/effectionx: no such directory rather than on the first request that needs the repository. Each mapping is logged at startup.

Verified against a real checkout on a feature branch: /x listed its 26 packages, /x/task-buffer rendered v1.4.0, the version on that branch, where origin/main has 1.3.3 — so the page is reading the working tree, not a clone. build/clones/ stayed empty, and the checkout came through with the same HEAD and a byte-identical git status, untracked files included. Pointing EFFECTIONX_DIR at a throwaway two-package directory showed only that directory's package in llms.txt and on /x.

www/deno.json's test task gets --allow-env, because importing lib/clones.ts pulls in the process helpers, which read OSTYPE at module load. That is the same one-line change as #1241; whichever merges second merges cleanly, since both make the line identical. Worth knowing for anything added to www later: the root deno task test that CI runs picks up the www workspace, and it grants --allow-env but not --allow-write, so the test here sticks to pure resolution and touches no files. Both entrypoints pass — deno task test in www, and the root one at 39 passed.

@pkg-pr-new

pkg-pr-new Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/effection@1242

commit: 7ba3c74

@codspeed

codspeed Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing tm/local-effectionx-checkout (7ba3c74) with v4 (37a6177)

Open in CodSpeed

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Deploy Preview Ready!

@cowboyd cowboyd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to go ahead and approve this with the proviso that we should 100% be using configliere for argument parsing and variable binding precisely for this use case.

The site clones thefrontside/effectionx into build/clones and reads its
packages from main, so there was no way to see a package you were working
on until it was pushed and merged.

`initClones` now takes checkouts, a map of `owner/repo` to a directory to
use in place of a clone, and main wires the `effectionxDir` parameter to
it:

    EFFECTIONX_DIR=../effectionx deno task dev
    deno task dev --effectionx-dir ../effectionx

A mapped repository is never cloned, fetched or reset, so the site reads
the branch and the uncommitted work that are there and cannot disturb a
checkout you are working in. Paths are resolved before the clone
directory is emptied, so a path that is not there fails at startup rather
than on the first request that needs the repository.
@taras
taras force-pushed the tm/local-effectionx-checkout branch from c9e005f to 7ba3c74 Compare September 27, 2026 17:09
@taras
taras enabled auto-merge (squash) September 27, 2026 17:11
@taras
taras merged commit e9337e6 into v4 Sep 27, 2026
18 checks passed
@taras
taras deleted the tm/local-effectionx-checkout branch September 27, 2026 17:11

This branch was successfully deployed

1 active deployment
Preview — 7ba3c749 Deployed Sep 27, 2026 by taras via deploy-preview #1384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants