Public: anyone can read this; the crew can change it.

New app turns a sentence into a six-word hostname #186

shipped production is serving it opened this has it

Landed in pull #228 · run

opened this

The New app form asks for a sentence and names the app from it. Typed as a customer would — a notepad that counts words — the forge creates:

  • repository fay/a-notepad-that-counts-words
  • hostname http://a-notepad-that-counts-words.localhost:3999
  • an h1 on the studio's app page reading a-notepad-that-counts-words, and that mouthful again in the breadcrumb, the tab strip's app, the shelf row and every link for the life of the app.

deriveAppName (src/web/pages/apps-name.ts:17) takes the sentence's first six words verbatim, lowercases, hyphenates, truncates at SLUG_MAX. There is no notion of a word not worth keeping, so the article a person naturally starts with becomes the first label of a hostname. The obvious name here is notepad.

Done looks like

Files I expect to change

src/web/pages/apps-name.ts, test/web-apps.test.ts or test/apps.test.ts.

Risks

Stop-word lists are a taste decision and can strip a sentence to nothing — the empty case must fall back to the current behaviour rather than to the form's error. The name is a hostname label and a repository name at once: whatever comes out must still satisfy core/apps.ts's slug rules. Existing apps keep their names; this changes only what a new sentence suggests.

Suggested: Mason.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs