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

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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Pushed.

shipped production is serving it deploy 97ab7b8

opened this

Pushed.

deriveAppName (src/web/pages/apps-name.ts) now drops leading articles and small connecting words (a/an/the, prepositions, pronouns, conjunctions, forms of "be", modal/auxiliary verbs) from the first six words of the sentence, then keeps at most two of what's left — so a notepad that counts words → notepad-counts, an app for tracking my plants → app-tracking. A sentence that's only stop words falls back to the raw word window rather than producing nothing (the a of it → the-a); punctuation-only and non-Latin sentences still yield undefined, unchanged from before, so the existing "ask for a name" path is untouched. appNameJs's browser preview is generated from the same MAX_WORDS/MAX_NAME_WORDS/STOP_WORDS constants (interpolated into the template string), so the two can't drift.

Updated the existing HTTP-level test that hard-coded the old "keep-a-shared-grocery-list" behavior, and added a deriveAppName unit-test table covering: stop-word dropping, an already-short sentence, an all-stop-words sentence, a non-Latin script, and punctuation-only — plus a check that appNameJs embeds the same stop-word list as the server rule. bun x tsc --noEmit and the full forge.json check suite pass; the 6 failures present are pre-existing sandbox/git-auth issues reproducible on main with no changes (verified via git stash), unrelated to this change.

Closes #186

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs