Skip to content

feat(project): register every Git checkout in a workspace with --scan - #958

Merged
runkids merged 2 commits into
mainfrom
runkids/project-add-scan
Nov 18, 2026
Merged

runkids merged 2 commits into
mainfrom
runkids/project-add-scan

Conversation

@runkids

@runkids runkids commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Type

Linked Issue

Closes #953

Summary

Some tools, such as Codex, look for project skills only up to the Git root of the folder you open, so skills synced to a workspace folder are not seen inside the checkouts it holds.

CLI: skillshare project add <root> --scan DIR [--scan DIR]... registers the root and each Git checkout below the scan folders as ordinary projects entries with the same settings, in one write. No new config field; projects_storage, --machine-local and -n work as for a single add.

  • Only adds: a checkout registered with the same settings is kept; one with different settings, its own .skillshare/, or a name that is already used is skipped with the reason.
  • On a name clash the name comes from the path (.worktrees/app-a → worktrees-app-a) and is saved as name.
  • A scan folder that is missing or cannot be read is skipped with a warning instead of failing the scan.
  • --json rows carry path (relative to the root) and a skip code.

Dashboard: the Add project dialog gains Also add each checkout inside this folder with the folders to look in. Review runs the scan as a dry run (POST /api/projects/scan) and lists each folder as Added, Kept or Skipped with a translated reason, and an Open link for a project whose settings differ. Nothing is written until Add N projects is confirmed. MCP and Hooks, when picked, are set up for each added project.

Docs: project.md and ui.md with their ja, ko, zh-Hans and zh-Hant translations, the built-in skill reference, and the project command runbook.

Not covered

  • If MCP or Hooks setup fails after the projects are saved, the dialog shows the error and returns to the form; a new review lists those projects as kept, so MCP or Hooks for them are added from each project's page.
  • The scan runs while the server holds its config lock, so a very large tree delays other dashboard requests until it finishes.
  • A scan folder that is a link or a plain file stops the scan with the server's English error.
  • The HTTP tests cover global mode with config.yaml storage; machine-local storage is covered by the CLI integration tests only.

Checks

  • make check in the devcontainer
  • UI: vitest (1001 tests), format:check, build, lint:typed (0 errors)
  • python3 scripts/ai-context.py check
  • Dashboard checked by hand: form, review and result in Clean light and dark, Playful, and at 390px wide
  • Not run: website build, the project command E2E runbook, Windows

Checklist

  • I've read CONTRIBUTING.md, including its AI-assisted contributions section
  • I've reviewed every line of the diff and can explain it
  • Tests included and passing (make check) — for code changes
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

Some tools, such as Codex, look for project skills only up to the Git root
of the folder you open. When one workspace folder holds several checkouts
or worktrees, skills synced to the workspace are not seen inside them, and
registering each checkout by hand repeats the same settings many times.

`project add <root> --scan DIR` registers the root and each Git checkout
found below the scan folders as ordinary project entries with the same
settings, in one write. No scan setting is saved; rerun it after a new
clone. It only adds: a checkout already registered with the same settings
is kept, one with different settings or its own .skillshare/ is skipped
with the reason, and a name clash derives the name from the path. A scan
folder that is missing or cannot be read is skipped with a warning so one
unreadable folder does not block the rest. Rows carry a root-relative path
and a skip code so the dashboard can explain them in its own words.

Refs #953
The dashboard should offer what `project add --scan` does, so a workspace
with many checkouts can be set up without the terminal.

The Add project dialog gains "Also add each checkout inside this folder"
with the folders to look in. Review runs the scan as a dry run through the
new POST /api/projects/scan and lists each folder as Added, Kept or Skipped
with a translated reason and a link to a project whose settings differ;
nothing is written until it is confirmed. The write scans again and counts
what it actually added, so a checkout registered in the meantime is not
reported as new. MCP and Hooks, when picked, are set up for each added
project. Without an explicit storage choice the default follows
projects_storage, as the CLI does without a flag.

Refs #953

Release-As: 0.30.12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T17:09:00.367450Z 747366f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@runkids
runkids merged commit 52744e2 into main Nov 18, 2026
18 of 19 checks passed
@runkids
runkids deleted the runkids/project-add-scan branch November 24, 2026 11:12
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.

Discover Git checkouts under a managed project for skill sync

1 participant