fix: repoint dead .com hosts to live .dev (#1819 §A+§B)
Merged
SW
5mo ago+35+35+01234567890123456789-23-23-01234567890123456789
Part of the recoupable.com -> .dev migration (tracking issue recoupable/chat#1819, sections A + B). Repoints dead .com hosts to their verified-live .dev equivalents and DRYs the URLs through shared constants.
DRY constants added (lib/consts.ts)
APP_BASE_URL = "https://chat.recoupable.dev"— public chat app originDOCS_BASE_URL = "https://docs.recoupable.dev"— docs hostAPI_PUBLIC_BASE_URL = "https://api.recoupable.dev"— canonical public API host for in-app doc examples
(NEW_API_BASE_URL already points at api.recoupable.dev on main.)
Changes
lib/chat/getChatUrl.ts—chat.recoupable.com->APP_BASE_URLcomponents/ApiKeyPage/ApiKeyManager.tsx— docs link ->DOCS_BASE_URLcomponents/Sidebar/UserProfileDropdown/ExternalLinksGroup.tsx—developers.recoupable.comHelp & Docs link ->DOCS_BASE_URL. Apexrecoupable.comhome link left intact (still live 200).app/docs/{account,fans,posts}/constants.ts— in-app API example snippetsapi.recoupable.com/api/...->api.recoupable.dev/...viaAPI_PUBLIC_BASE_URLinterpolation in the template literalsapp/docs/{fans,posts}/page.tsx— endpoint<code>literals ->api.recoupable.dev- JSDoc
@seehosts ->docs.recoupable.dev:lib/tasks/{deleteTask,getTasks,updateTask}.ts,hooks/useElapsedMs.ts,lib/chat/getConversations.tsx lib/chat/__tests__/getChatUrl.test.ts— assertion updated to the new.devorigin (behavioral test for the changed function)
Left untouched (out of scope)
- Apex
recoupable.com/www.recoupable.comlinks and theprivacy/termsredirects (all still live 200) RECOUP_FROM_EMAILand any email addresses
Gate results
pnpm exec tsc --noEmit: only the pre-existinglib/emails/__tests__/extractSendEmailResults.test.tsUIMessage type-drift errors remain (unrelated). No new errors mention any touched file.pnpm exec vitest run lib/chat: 6 files, 19 tests passedpnpm exec vitest run lib/tasks: 7 files, 16 tests passed
🤖 Generated with Claude Code
Summary by cubic
Repointed dead recoupable.com hosts to their live .dev equivalents and centralized URLs in shared constants to avoid drift. Apex recoupable.com links remain as-is.
- Refactors
- Added
APP_BASE_URL,DOCS_BASE_URL,API_PUBLIC_BASE_URLinlib/consts.ts. getChatUrlnow usesAPP_BASE_URL(chat.recoupable.dev); updated test.- In-app docs and code examples now use
API_PUBLIC_BASE_URL(api.recoupable.dev); endpoint labels updated. - Help & Docs links now use
DOCS_BASE_URL(docs.recoupable.dev). - Updated JSDoc
@seelinks to docs.recoupable.dev.
- Added