You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2fbc90d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(careers): scan the repo for install locations instead of guessing (#189)
The careers PR flow blind-probed ten hardcoded paths at a single root
(astro.config.*, app/layout.*, src/app/layout.*). Anything else — a site
at web/, frontend/, packages/site/, or any monorepo path the customer
didn't type into the subdirectory box — came back "No Next.js App Router
or Astro site found there", which reads as a missing feature rather than
a missed guess.
The stats tracker installer already solved this: findInstallCandidates
scans, ranks, and hands the UI a picker with a manual-path escape hatch.
This brings the careers flow to the same shape.
- repos: add listRepoTree, one recursive git-trees request for the whole
file list. The contents API can only confirm paths you already know.
- install-careers: careersCandidatesFromTree derives every possible route
directory from that listing and ranks it with the tracker's heuristics
(apps/ and sites/ up, examples/fixtures down, root-level app first).
findCareersCandidates wraps it and still falls back to the direct probe
when the tree is unavailable or GitHub truncated it, so a huge repo
degrades to the old behaviour rather than claiming the site is missing.
Locations that already have a careers page are listed and flagged, not
hidden — "you already have this" beats an empty list.
- route: add mode=candidates (read-only, no PR, no run row) and accept
target_dir on submit. A directory chosen in the browser is user input,
so verifyCareersDir re-probes for the framework marker before any
write; the installer's promise is that it only writes where it can
positively see a site.
- ui: replace the single detect line with the ranked list, preselecting
the best match, plus a manual directory box for truncated repos.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments