feat(onboarding): folder name follows the project name, and project ids are UUIDs (#89)

The paste prompt now carries the project's name so an agent recommends a
folder of that name; with no project at all the recommendation is `shared/`
(and `bdrive init shared` names the new project after the folder), replacing
the old `wiki/` default.

New project ids are UUIDs instead of `p-` + 8 hex chars. The route validator
still accepts the legacy shape — ids are permanent — and the client-side URL
parsers (remote/http.go, bdrive share) now only check the shape of a URL
segment, leaving the hub as the single authority on which ids are valid.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Snow W. Lee (Sungwon)
2026-07-30 13:42:07 +09:00
committed by GitHub
co-authored by Claude Opus 5
parent fb6ce347c4
commit fd4f5c7964
20 changed files with 91 additions and 50 deletions
+4 -1
View File
@@ -36,7 +36,10 @@ type httpBackend struct {
hc *http.Client
}
var projectPathRe = regexp.MustCompile(`^/p/(p-[0-9a-f]{8})/?$`)
// The id is whatever the hub minted (a UUID today, `p-xxxxxxxx` on older
// hubs), so this only checks the shape of a URL segment — the hub is the
// authority on which ids exist.
var projectPathRe = regexp.MustCompile(`^/p/([A-Za-z0-9._-]{4,64})/?$`)
func newHTTPBackend(raw string) (*httpBackend, error) {
u, err := url.Parse(raw)