🐛 Fix: Docs button in create sites repositories section #2300#2302
🐛 Fix: Docs button in create sites repositories section #2300#2302AryanBagade wants to merge 2 commits into
Conversation
- Replace broken '#' link with correct GitHub App configuration docs - Add external prop to both docs and GitHub buttons for security - Links to specific section about updating repository permissions Fixes #10402
- Replace broken '#' link with correct GitHub App configuration docs - Add external prop to both docs and GitHub buttons for security - Links to specific section about updating repository permissions Fixes appwrite#2300 References appwrite/appwrite#10402
ConsoleProject ID: Sites (2)
Note You can use Avatars API to generate QR code for any text or URLs. |
WalkthroughThe change updates the Docs button in src/routes/(console)/project-[region]-[project]/sites/create-site/repositories/+page.svelte to use a specific external documentation URL (https://appwrite.io/docs/advanced/self-hosting/sites#configure-github-app) instead of "#", and sets the button as external. Additionally, the "Go to GitHub" button is marked as external; its href remains the dynamic GitHub organization URL. No logic or exported/public API changes were made. Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/routes/(console)/project-[region]-[project]/sites/create-site/repositories/+page.svelte(1 hunks)
🔇 Additional comments (2)
src/routes/(console)/project-[region]-[project]/sites/create-site/repositories/+page.svelte (2)
69-72: Docs button fix LGTM.Correct URL and external target improve UX and security. Nice, focused fix.
75-75: Marking “Go to GitHub” as external is correct.Prevents reverse tabnabbing when paired with rel=noopener,noreferrer in the Button component. Confirm the Button’s
externalprop sets both attributes.
| <Button | ||
| href="https://appwrite.io/docs/advanced/self-hosting/sites#configure-github-app" | ||
| external | ||
| secondary>Docs</Button> |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Optional: add tracking/UTM and guard against doc anchor drift.
- Consider UTM params for attribution and a central constant for the docs URL.
- Verify the anchor still exists; fail-safe if docs restructure.
Apply UTM (query must precede hash):
- href="https://appwrite.io/docs/advanced/self-hosting/sites#configure-github-app"
+ href="https://appwrite.io/docs/advanced/self-hosting/sites?utm_source=console&utm_medium=button&utm_campaign=sites-missing-repo#configure-github-app"Verification script:
🏁 Script executed:
#!/bin/bash
set -euo pipefail
base='https://appwrite.io/docs/advanced/self-hosting/sites'
code=$(curl -sL -o /dev/null -w '%{http_code}' "$base")
echo "HTTP $code for $base"
html=$(curl -sL "$base")
if grep -q 'configure-github-app' <<<"$html"; then
echo "Anchor 'configure-github-app' found"
else
echo "Anchor 'configure-github-app' NOT found"; exit 1
fiLength of output: 157427
Fix broken docs anchor and centralize URL
- In
src/routes/(console)/project-[region]-[project]/sites/create-site/repositories/+page.svelte(lines 69–72), change the fragment from#configure-github-appto#gitto match the current docs anchor. - Extract the docs base URL into a shared constant and append UTM parameters there for consistency.
🤖 Prompt for AI Agents
In
src/routes/(console)/project-[region]-[project]/sites/create-site/repositories/+page.svelte
around lines 69–72, update the docs link fragment from #configure-github-app to
#git and replace the hardcoded full URL by importing a shared docs base constant
(e.g. from src/lib/constants/docs.ts) that already includes the UTM parameters,
then construct the final href by appending the #git fragment to that base
constant; add or update the shared constant file to export the canonical docs
base URL with UTM params so all components reuse it.

What does this PR do?
This PR fixes a broken "Docs" button in the Sites creation flow. The button in the "Missing a repository?" section had href="#" which created a broken link that didn't navigate anywhere.
Changes made:
externalprop to both docs and GitHub buttons for security and UX best practicesThis specifically addresses the scenario described in the tooltip - helping users configure GitHub App permissions when repositories are missing.
Test Plan
Manual Testing:
Automated Testing:
pnpm run formatpnpm run checkwith no issuesCode Quality:
externalprop for security (target="_blank" + rel="noopener noreferrer")Related PRs and Issues
This is a cross-repo fix - the issue was originally reported in the main appwrite repo but the fix belongs in the console frontend repo.
Have you read the Contributing Guidelines on issues?
Yes, I have read and followed the Contributing Guidelines:
fix-docs-button-create-sitesCloses appwrite/appwrite#2300
Summary by CodeRabbit