Skip to content

fix(cli): link Cloud console pages to the new console - #1908

Merged
HarshMN2345 merged 3 commits into
mainfrom
fix/cli-console-links
Sep 15, 2026
Merged

HarshMN2345 merged 3 commits into
mainfrom
fix/cli-console-links

Conversation

@HarshMN2345

@HarshMN2345 HarshMN2345 commented Sep 15, 2026

Copy link
Copy Markdown
Member

All CLI console links, Cloud and self-hosted, now use the new console's root routes:

  • Deployments: /projects/{projectId}/functions/{functionId}/deployments/{deploymentId} and /projects/{projectId}/sites/{siteId}/deployments/{deploymentId}
  • GitHub installation setup: /projects/{projectId}/settings
  • No-organizations error: the console root /

The base is appwrite.io (staging.appwrite.io) on Cloud and the instance root on self-hosted. The legacy /console/project-{region}-{projectId} slug is gone, along with the project lookup that only resolved its region, and the unused legacy console URL fixtures in tests/e2e/Base.php.

On Cloud, deployment, project settings and onboarding links now point at
appwrite.io (staging.appwrite.io) with root routes such as
/projects/{projectId}/functions/{functionId}/deployments/{deploymentId},
so no region is needed and the region-less project slug is gone.

Self-hosted links keep the /console/project-{region}-{projectId} shape.
The onboarding link there becomes /console, since /console/onboarding
has no route in the new console.
@greptile-apps

greptile-apps Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The route migration appears safe to merge, although the existing non-blocking request for observable coverage of all changed link variants remains unresolved.

Fix All in Claude CodeFindings

  1. P2 Changed routes lack coverage
Fix with agent prompt
### Issue 1
templates/cli/internal/cmd/initfunction_test.go:22-33
This test covers only the production Cloud GitHub settings URL. The new Cloud deployment routes, self-hosted deployment fallback, staging origin, and Cloud and self-hosted no-organization links have no behavioral coverage. Add cases for the final user-visible Function, Site, organization, staging, and self-hosted URLs so malformed routes cannot ship while the suite remains green.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR migrates generated CLI links from legacy Console slugs to the new root-route format.

  • Maps production and staging Cloud API endpoints to their new Console origins.
  • Updates GitHub setup, organization creation, Function deployment, and Site deployment links.
  • Removes legacy project-region resolution and obsolete Console URL fixtures.

Reviews (2) · Last reviewed commit: "test(cli): drop unused legacy console UR..."

Comment on lines 22 to 33
func TestMissingGitHubInstallationOffersConsoleLinkAndLocalFallback(t *testing.T) {
setupURL := githubInstallationSetupURL(
"https://sgp.cloud.appwrite.io/v1", "project-id")
wantURL := "https://cloud.appwrite.io/console/project-sgp-project-id/settings"
wantURL := "https://appwrite.io/projects/project-id/settings"
if setupURL != wantURL {
t.Fatalf("setup URL = %q, want %q", setupURL, wantURL)
}
baseURL := githubInstallationSetupURL(
"https://cloud.appwrite.io/v1", "project-id")
if baseURL != "https://cloud.appwrite.io/console/project-project-id/settings" {
if baseURL != wantURL {
t.Fatalf("base Cloud setup URL = %q", baseURL)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Changed routes lack coverage

This test covers only the production Cloud GitHub settings URL. The new Cloud deployment routes, self-hosted deployment fallback, staging origin, and Cloud and self-hosted no-organization links have no behavioral coverage. Add cases for the final user-visible Function, Site, organization, staging, and self-hosted URLs so malformed routes cannot ship while the suite remains green.

Knowledge Base Used: Command-line templates

Prompt To Fix With AI
This is a comment left during a code review.
Path: templates/cli/internal/cmd/initfunction_test.go
Line: 22-33

Comment:
**Changed routes lack coverage**

This test covers only the production Cloud GitHub settings URL. The new Cloud deployment routes, self-hosted deployment fallback, staging origin, and Cloud and self-hosted no-organization links have no behavioral coverage. Add cases for the final user-visible Function, Site, organization, staging, and self-hosted URLs so malformed routes cannot ship while the suite remains green.

**Knowledge Base Used:** [Command-line templates](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-generator/-/docs/command-line-templates.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex

Self-hosted deployment, project settings and onboarding links now use the
same root routes as Cloud, built on the instance root:
/projects/{projectId}/functions/{functionId}/deployments/{deploymentId},
/projects/{projectId}/sites/{siteId}/deployments/{deploymentId},
/projects/{projectId}/settings and /.

The /console/project-{region}-{projectId} slug is gone, and with it the
console project lookup that only existed to resolve its region.
consoleBaseURL now picks the Cloud console origin itself, so every link
is built from one base.
CLI_CONSOLE_URL_RESPONSES only listed /console/project-{region}-{projectId}
URLs, and nothing has read it since the TypeScript CLI tests were removed.
@HarshMN2345
HarshMN2345 merged commit dfeaafd into main Sep 15, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants