Goal
Let the viewer load any URL-accessible features.json via a query parameter, so people can share a link instead of cloning a repo.
Why
Roadmap top item: "Share via URL". Current viewer only loads bundled examples or local files. Adding ?features=<url> and ?repo=<owner>/<repo> makes codeSee viable for showcasing OSS projects, code review sharing, blog embeds.
Scope (what is in)
Out of scope
- Authenticated fetches (private repos): user can drag-drop the file instead
?layout=URL for layout (do in follow-up issue)
- Embed mode (
?embed=1): separate issue
Files likely involved
viewer/src/App.tsx (parse URL, dispatch to loader)
viewer/src/fcg/loader.ts (loadFromUrl already exists, may need polish)
viewer/src/app/TopBar.tsx (source label)
Acceptance criteria
Estimated effort
~3-4 hours / ~3 files
Hints
fetchFromUrl in loader.ts does most of the work. Main delta is URL parsing + the ?repo= expansion + safe error rendering.
Security check
- Don't execute anything from the JSON
- Treat the URL hostname as untrusted
- Validate response < 5MB before parsing
Want to take this?
Comment "I'd like to take this" and I'll confirm within 24h.
Goal
Let the viewer load any URL-accessible
features.jsonvia a query parameter, so people can share a link instead of cloning a repo.Why
Roadmap top item: "Share via URL". Current viewer only loads bundled examples or local files. Adding
?features=<url>and?repo=<owner>/<repo>makes codeSee viable for showcasing OSS projects, code review sharing, blog embeds.Scope (what is in)
?features=<url>fromlocation.search?repo=<owner>/<repo>shorthand → expand tohttps://raw.githubusercontent.com/{owner}/{repo}/main/.codesee/features.json?repo=owner/repo@branchfor non-main branchesFeaturesFilebefore rendering?features=is set,?example=is ignoredOut of scope
?layout=URLfor layout (do in follow-up issue)?embed=1): separate issueFiles likely involved
viewer/src/App.tsx(parse URL, dispatch to loader)viewer/src/fcg/loader.ts(loadFromUrlalready exists, may need polish)viewer/src/app/TopBar.tsx(source label)Acceptance criteria
?features=https://raw.githubusercontent.com/Kaka-cheaper/codeSee/main/viewer/public/features.jsonloads and renders?repo=Kaka-cheaper/codeSeedoes the same via shorthandEstimated effort
~3-4 hours / ~3 files
Hints
fetchFromUrlinloader.tsdoes most of the work. Main delta is URL parsing + the?repo=expansion + safe error rendering.Security check
Want to take this?
Comment "I'd like to take this" and I'll confirm within 24h.