fix: include default region in self-hosted CLI console deployment URLs#1661
Conversation
Console routes use project-{region}-{id}; without a fetched region the CLI
omitted it and produced broken links like project-{id} instead of
project-default-{id}.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Greptile SummaryFixes broken console URLs generated for self-hosted Appwrite deployments when no project region is available. The
Confidence Score: 5/5Change is minimal, self-contained, and all affected test cases have been updated to match the new behaviour. The fix is a two-line change that collapses a conditional into a single expression. Cloud and explicit-region paths are untouched, and the e2e assertions cover both the no-region and explicit-region cases for non-cloud hosts. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "(fix): expect default region in self-hos..." | Re-trigger Greptile |
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
project-{region}-{projectId}(region defaults todefault), matching Appwrite console and Builds worker URLs.getConsoleProjectSlugpreviously omitted the region when it wasn't fetched (common with API-key-only pushes), producing broken links like/console/project-{id}/...instead of/console/project-default-{id}/....project-default-{id}when no region is available; keep explicit regions and cloud subdomain behavior unchanged.Test plan
getConsoleProjectSlug("http://localhost/v1", "proj1")→project-default-proj1getConsoleProjectSlug("http://localhost/v1", "proj1", "fra")→project-fra-proj1console-slug-regionassertion passes