Skip to content

Conversation

@atharvadeosthale
Copy link
Member

@atharvadeosthale atharvadeosthale commented Oct 26, 2025

Summary by CodeRabbit

  • New Features

    • AI-driven starter prompts added to platform clone flows (Web, Android, iOS, Flutter, React Native) with one-click copy and “open in external tools” options.
    • Theme-aware larger cursor icon in project overview.
  • UI

    • Inline LLM banner in Clone starter steps showing generated setup prompts, contextual instructions, and an action menu for external-tool links; Android/Flutter flows fetch latest SDK versions for up-to-date guidance.
  • Analytics

    • Tracking added for prompt copy and external-tool open actions.
  • Chores

    • Updated UI package versions.
  • Style

    • Removed size override for AI icon notification variant.

@railway-app
Copy link

railway-app bot commented Oct 26, 2025

This PR was not deployed automatically as @atharvadeosthale does not have access to the Railway project.

In order to get automatic PR deploys, please add @atharvadeosthale to your workspace on Railway.

@appwrite
Copy link

appwrite bot commented Oct 26, 2025

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Silent mode disables those chatty PR comments if you prefer peace and quiet

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 26, 2025

Walkthrough

The PR adds an LLM-driven starter prompt feature: a new llmBanner.svelte component and LLMPromptConfig utilities (type, generatePromptFromConfig, buildPlatformConfig) in platforms/store.ts. The banner is integrated into Android, Apple, Flutter, React Native, and Web create flows (Android/Flutter also fetch SDK versions). It introduces a theme-aware CursorIconLarge.svelte component, updates analytics Click enum with three new members, updates two package references, and removes a CSS size override from an AI icon component.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • llmBanner.svelte: derived-store logic, prompt generation, clipboard/analytics calls, opener URL construction, accessibility and dismissible alert behavior.
  • platforms/store.ts: LLMPromptConfig shape, generatePromptFromConfig formatting, platformConfigs mapping and buildPlatformConfig validation.
  • Platform integration files: createAndroid, createApple, createFlutter, createReactNative, createWeb — correct props/llmConfig wiring, onMount SDK fetch usage and error handling.
  • Analytics enum change: ensure new CopyPromptStarterKitClick, OpenInCursorClick, OpenInLovableClick match usages in llmBanner.
  • package.json updates and small UI/CSS tweak: verify dependency URLs and the removed icon size rule had no unintended effects.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Copy prompt v2' is vague and generic, using non-descriptive terms that don't clearly convey the meaningful changes in the changeset. Consider using a more specific title that describes the primary change, such as 'Add LlmBanner component for platform setup prompts' or 'Implement AI-assisted platform integration prompts'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-2491-revert-2477-copy-prompt

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@atharvadeosthale atharvadeosthale marked this pull request as ready for review October 28, 2025 08:56
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (7)
src/routes/(console)/project-[region]-[project]/overview/platforms/createReactNative.svelte (1)

71-75: Consider consistent prop naming.

The promptConfigCode variable is passed to LlmBanner as configCode, while other platform files directly use a variable named configCode. Consider renaming this to configCode for consistency across the codebase.

Apply this diff:

-    const promptConfigCode = `
+    const configCode = `
     const client = new Client()
         .setProject("${projectId}")
         .setEndpoint("${sdk.forProject(page.params.region, page.params.project).client.config.endpoint}")
     `;

Then update line 260:

                     <LlmBanner
                         platform="reactnative"
-                        configCode={promptConfigCode}
+                        {configCode}
                         {alreadyExistsInstructions}
                         openers={['cursor']} />
src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte (1)

166-212: Consider standardizing the banner configuration approach.

The Web platform uses a LLMPromptConfig object approach while other platforms (Android, Apple, Flutter, React Native) use individual props (platform, configCode, alreadyExistsInstructions). This creates an inconsistency across the codebase.

Consider either:

  1. Updating other platforms to use the LLMPromptConfig approach, or
  2. Updating Web to use individual props like other platforms

The LLMPromptConfig approach appears more maintainable and type-safe, so option 1 might be preferable.

src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (3)

28-33: Consider user-friendly error handling instead of throwing.

The derived config throws an error if required props are missing. This could crash the component and show a developer-facing error to users. Consider either:

  1. Rendering a fallback UI with a user-friendly message, or
  2. Using console.error and returning a minimal valid config

Example:

 const config = $derived.by(() => {
     if (customConfig) return customConfig;
     if (platform && configCode)
         return buildPlatformConfig(platform, configCode, alreadyExistsInstructions);
-    throw new Error('LlmBanner: must provide either config OR (platform + configCode)');
+    console.error('LlmBanner: must provide either config OR (platform + configCode)');
+    return null;
 });

Then add a guard in the template:

{#if showAlert && config}
  <!-- existing content -->
{/if}

135-135: Use kebab-case for aria attributes.

The ariaLabel prop should be aria-label following HTML attribute naming conventions. While Svelte may handle the conversion, using the standard kebab-case is clearer.

Apply this diff:

-                                ariaLabel="Open action menu"
+                                aria-label="Open action menu"

190-244: Reduce reliance on !important.

The styles contain multiple !important declarations which suggest CSS specificity issues. Consider using more specific selectors or scoped styles instead of forcing precedence with !important. This makes the styles more maintainable and easier to override when needed.

src/routes/(console)/project-[region]-[project]/overview/platforms/store.ts (2)

112-120: Consider narrowing the platformKey parameter type.

The platformKey parameter is currently typed as string, but it could be narrowed to the keys of platformConfigs for better type safety at compile time.

Apply this diff to narrow the type:

 export function buildPlatformConfig(
-    platformKey: string,
+    platformKey: keyof typeof platformConfigs,
     configCode: string,
     alreadyExistsInstructions: string
 ): LLMPromptConfig {

122-131: Optional: Use object property shorthand.

Line 124 can use ES6 shorthand syntax for cleaner code.

Apply this diff:

     return {
         title: config.title,
-        alreadyExistsInstructions: alreadyExistsInstructions,
+        alreadyExistsInstructions,
         cloneCommand: `git clone https://github.com/appwrite/${config.repoName}\ncd ${config.repoName}`,
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bfcb207 and 8787d8b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • package.json (1 hunks)
  • src/lib/actions/analytics.ts (1 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/components/CursorIconLarge.svelte (1 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createApple.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createReactNative.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (1 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/store.ts (1 hunks)
🔇 Additional comments (13)
package.json (1)

27-27: Dependency updates verified and valid.

Both commit hashes (85d1b43) for @appwrite.io/pink-icons-svelte and @appwrite.io/pink-svelte are reachable and successfully resolve in the lockfile. The dependencies are compatible with Svelte 5.25.3 and with each other (pink-svelte correctly depends on pink-icons-svelte 2.0.0-RC.1).

The llmBanner component exists and uses icons from the updated pink-icons-svelte library. The codebase extensively uses both updated dependencies across hundreds of files with no import breakage detected. The lockfile confirms successful resolution and no version conflicts.

src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte (1)

200-204: LGTM!

The LlmBanner integration follows the established pattern and correctly passes the necessary props.

src/routes/(console)/project-[region]-[project]/overview/platforms/createReactNative.svelte (1)

42-62: LGTM!

The setup instructions are well-structured and correctly use template literals to interpolate the dynamic projectId and endpoint values.

src/routes/(console)/project-[region]-[project]/overview/platforms/createApple.svelte (1)

73-78: Good refactor to const.

Changing platforms from let to const is appropriate since the object is never reassigned. This makes the code's intent clearer.

src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte (2)

42-62: LGTM!

The setup instructions are well-structured and correctly use template literals to interpolate dynamic values. The Flutter SDK integration guidance is clear and comprehensive.


308-312: LGTM!

The LlmBanner integration follows the established pattern across other platform creation flows.

src/lib/actions/analytics.ts (1)

198-201: LGTM!

The new analytics event identifiers follow the established naming convention and align with the LLM banner feature's interaction tracking needs. The trailing comma addition is also a good practice.

src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte (1)

356-356: LGTM!

The LlmBanner integration correctly uses the config object and includes both 'cursor' and 'lovable' openers, providing users with multiple AI tool options.

src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (2)

87-98: LGTM!

The copyPrompt function correctly implements clipboard copying with proper analytics tracking and user feedback via notifications.


51-83: Well-structured opener configuration.

The openersConfig object provides a clean, extensible pattern for supporting multiple AI tools. The URL generation logic correctly encodes prompts and tracks analytics events.

src/routes/(console)/project-[region]-[project]/overview/platforms/store.ts (3)

20-29: LGTM: Well-structured type definition.

The LLMPromptConfig type is comprehensive and includes all necessary fields for prompt generation across different platforms.


35-57: LGTM: Clear prompt generation logic.

The function generates a well-structured prompt with appropriate fallback handling (line 44) and clear section delineation.


69-110: Web platform is intentionally configured separately—no missing configuration.

The web platform already exists and is properly implemented, but uses a different configuration approach than the other platforms. The createWeb.svelte component defines its own llmConfig directly (lines 166-212) rather than relying on the platformConfigs mapping. This is by design, not an oversight, since web platforms have different setup requirements than mobile frameworks.

No action required.

atharvadeosthale and others added 2 commits October 28, 2025 14:33
…orms/createApple.svelte

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8787d8b and 1adc92f.

📒 Files selected for processing (1)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createApple.svelte (3 hunks)
🔇 Additional comments (3)
src/routes/(console)/project-[region]-[project]/overview/platforms/createApple.svelte (3)

31-31: LGTM!

The import is correctly structured and the component is properly utilized in the template.


73-78: Good immutability improvement.

Changing from let to const prevents accidental mutation and follows best practices since this object is never reassigned.


228-232: LGTM!

The LlmBanner component is properly integrated with appropriate props and logical placement within the Clone starter flow.

@HarshMN2345 HarshMN2345 self-requested a review October 29, 2025 10:45
{/if}

<style lang="scss">
:global(.btn-no-right-radius),
Copy link
Member

Choose a reason for hiding this comment

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

Can we please avoid or reduce the use of global classes here? They tend to introduce unintended side effects

Copy link
Member Author

Choose a reason for hiding this comment

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

Strangely things were not working if I didn't use global, I'll try again

Copy link
Contributor

Choose a reason for hiding this comment

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

they are still here, in this case you are probably messing with the design system in a way you shouldnt :-P

can we solve this by not using any classes or !improtant here?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/routes/(console)/project-[region]-[project]/overview/platforms/createReactNative.svelte (1)

30-62: React Native LlmBanner integration is correct; consider reducing snippet duplication

The banner props (platform="reactnative", configCode={promptConfigCode}, alreadyExistsInstructions, openers={['cursor']}) are consistent with the shared llmBanner API and the RN platform config. The client setup shown in promptConfigCode matches the instructions block, which is good.

If you want to tidy things up later, you could factor the repeated client snippet into a single clientConfigSnippet constant and reuse it in both alreadyExistsInstructions and promptConfigCode to avoid divergence over time.

Also applies to: 71-76, 258-262

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e4cf187 and 0c3d29a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • package.json (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/components/CursorIconLarge.svelte (1 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createApple.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createReactNative.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (1 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/store.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createApple.svelte
  • package.json
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte
  • src/routes/(console)/project-[region]-[project]/overview/components/CursorIconLarge.svelte
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: e2e
🔇 Additional comments (5)
src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte (1)

30-62: LlmBanner wiring and Flutter instructions look consistent

The new alreadyExistsInstructions content and LlmBanner usage line up with the Flutter platform config (env file path, “Send a ping” flow, and starter repo), and props match the banner’s expected shape (platform, configCode, alreadyExistsInstructions, openers). I don’t see issues here.

Also applies to: 308-312

src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (2)

14-27: Align alreadyExistsInstructions expectations with buildPlatformConfig

The config derivation logic is solid: prefer customConfig, otherwise fall back to platform + configCode via buildPlatformConfig, and throw if neither path is valid. One nuance: alreadyExistsInstructions is optional at the prop level but passed directly into buildPlatformConfig, whose signature currently requires a string.

Once you apply the default parameter suggested in store.ts, this tension goes away and the platform + configCode path becomes safe even if a caller omits alreadyExistsInstructions in future usages. Until then, this is a potential TS nullability warning.

No changes needed here after buildPlatformConfig is updated.

Also applies to: 28-36


51-86: Overall banner behavior, analytics, and styling look sound

  • Openers are whitelisted via openersConfig and validOpeners, so unknown IDs are safely ignored.
  • External links are opened with window.open(..., '_blank', 'noopener,noreferrer'), which is the right security posture.
  • The inline alert + split “copy”/menu button UX is clear, and the CSS customizations are scoped under .custom-inline-alert and a couple of explicit button classes, which keeps global side effects reasonably constrained for a shared design component.

I don’t see functional issues here; this component should be safe to reuse across the different platform flows.

Also applies to: 120-183, 189-243

src/routes/(console)/project-[region]-[project]/overview/platforms/store.ts (2)

35-61: Fix clone command construction in generated prompt

The cloneCommand is constructed as a multi-line sequence including git clone followed by cd, and appending . to it produces invalid syntax like cd starter-kit .. The proposed fix correctly removes the trailing . and simplifies the preceding sentence to convey the same instruction more concisely.

-1. Clone the starter kit using ${config.using || 'the terminal'}. Make sure to clone in the current working directory so that the cloned files are directly available in the working directory.
+1. Clone the starter kit using ${config.using || 'the terminal'} in the current working directory.
@@
-```bash
-${config.cloneCommand} .
+```bash
+${config.cloneCommand}

---

`63-71`: **Add default parameter to `buildPlatformConfig` to handle optional `alreadyExistsInstructions`**

Type-safety issue confirmed: `llmBanner.svelte` defines `alreadyExistsInstructions` as optional (`?: string`), but passes it to `buildPlatformConfig` which requires it as a non-optional string parameter. Under `strictNullChecks`, this causes a type error at line 31 of `llmBanner.svelte`.

Apply the proposed fix to the function signature at line 116:

```diff
export function buildPlatformConfig(
    platformKey: string,
    configCode: string,
-    alreadyExistsInstructions: string
+    alreadyExistsInstructions = ''
): LLMPromptConfig {

This resolves the type mismatch and provides sensible runtime behavior (empty instructions default to empty string).

Likely an incorrect or invalid review comment.

atharvadeosthale and others added 2 commits November 18, 2025 17:57
…orms/store.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte (1)

40-82: Consider extracting the hardcoded SDK version to a constant for maintainability.

The Appwrite Android SDK version "11.3.0" (lines 50, 60, 64) is currently the latest released version and is correct. However, extracting it to a constant at the top of the file would improve maintainability when the version needs updating in the future:

 const projectId = page.params.project;
+const APPWRITE_ANDROID_SDK_VERSION = "11.3.0";

 const alreadyExistsInstructions = `
 ...
 [libraries]
-appwrite = { module = "io.appwrite:sdk-for-android", version = "11.3.0" }
+appwrite = { module = "io.appwrite:sdk-for-android", version = "${APPWRITE_ANDROID_SDK_VERSION}" }
 \`\`\`
 ...
 Only when the project lacks ./gradle/libs.versions.toml should you hardcode the dependency:
 \`\`\`kotlin
-implementation("io.appwrite:sdk-for-android:11.3.0")
+implementation("io.appwrite:sdk-for-android:${APPWRITE_ANDROID_SDK_VERSION}")
 \`\`\`
 Legacy Groovy scripts should use:
 \`\`\`groovy
-implementation "io.appwrite:sdk-for-android:11.3.0"
+implementation "io.appwrite:sdk-for-android:${APPWRITE_ANDROID_SDK_VERSION}"
 \`\`\`
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c3d29a and 04a1b2e.

📒 Files selected for processing (7)
  • AGENTS.md (2 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createApple.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createReactNative.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/store.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/store.ts
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createReactNative.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: e2e
🔇 Additional comments (8)
src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte (3)

51-57: LGTM!

The imports are correctly structured and appropriately bring in the new LLM prompt configuration type and banner component.


358-358: LGTM!

The LlmBanner component is correctly integrated with the appropriate props.


214-214: Field name using is valid—verified against type definition.

Verification confirms that using is a legitimate field in the LLMPromptConfig type definition (defined at src/routes/(console)/project-[region]-[project]/overview/platforms/store.ts:28). The code at line 214 correctly uses this field.

src/routes/(console)/project-[region]-[project]/overview/platforms/createApple.svelte (3)

31-31: LGTM!

The LlmBanner import is properly structured and consistent with its usage in the component.


73-78: LGTM!

Changing platforms from let to const is a good practice since the object is never reassigned, preventing accidental mutations.


227-231: LGTM!

The LlmBanner integration is properly wired with all required props (platform, configCode, alreadyExistsInstructions, openers) and follows the consistent pattern used across other platform flows.

src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte (2)

29-29: LGTM!

The import is correctly structured and the component is properly utilized in the template.


219-223: LGTM!

The LlmBanner component is properly integrated with correct prop bindings. The placement within the optional "Clone starter" step is appropriate for providing AI-driven assistance to users setting up their Android platform.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04a1b2e and 9555ef5.

📒 Files selected for processing (2)
  • .github/workflows/dockerize-profiles.yml (1 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/dockerize-profiles.yml

17-17: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


19-19: the runner of "docker/setup-qemu-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


21-21: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: e2e
🔇 Additional comments (1)
.github/workflows/dockerize-profiles.yml (1)

3-49: Structural reorganization is correct.

The indentation and nesting adjustments properly align with standard GitHub Actions workflow YAML structure. All steps remain in their original execution order, and no functional changes are introduced.

@ItzNotABug ItzNotABug self-requested a review November 18, 2025 14:26
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/lib/actions/analytics.ts (1)

198-201: Add trailing comma to the last enum entry for consistency.

The trailing comma was added to WebsiteOpenClick (line 198), which is a good practice for maintainability. However, OpenInLovableClick (line 201) is missing a trailing comma, creating an inconsistency.

Apply this diff to maintain consistency:

-    OpenInLovableClick = 'click_open_in_lovable'
+    OpenInLovableClick = 'click_open_in_lovable',
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9555ef5 and 8a708ce.

📒 Files selected for processing (1)
  • src/lib/actions/analytics.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: e2e
  • GitHub Check: build

{/if}

<style lang="scss">
:global(.btn-no-right-radius),
Copy link
Contributor

Choose a reason for hiding this comment

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

they are still here, in this case you are probably messing with the design system in a way you shouldnt :-P

can we solve this by not using any classes or !improtant here?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (2)
src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (2)

189-203: Resolve the global styles and !important usage flagged in previous reviews.

Previous reviewers specifically requested avoiding global classes and !important declarations (see past comments on line 190), but these patterns remain in the code. This approach can introduce unintended side effects and specificity conflicts.

Consider these alternatives:

  1. Use a button group component from the design system if available
  2. Apply scoped styles with proper specificity without !important
  3. Extend the Button component to accept radius customization props
  4. Use CSS custom properties that the design system can override

Apply a refactor to eliminate the global overrides and work within the design system's intended usage patterns.


212-243: Critical: Extensive !important overrides violate design system principles.

This section contains numerous !important declarations overriding the design system's Alert component internals (lines 224, 228-229, 232-233, 237, 241). Past reviewers specifically flagged color overrides (line 232).

This approach:

  • Creates brittle styles that may break with design system updates
  • Violates encapsulation and component boundaries
  • Makes the codebase harder to maintain

Recommended solution:
Work with the design system maintainers to:

  1. Expose official customization props for Alert.Inline (variant, padding, spacing, color scheme)
  2. Create a specialized Alert variant for this AI prompt use case
  3. Use design tokens/CSS custom properties for theme values instead of direct overrides

If immediate design system changes aren't feasible, document these overrides as technical debt and create an issue to track proper implementation.

🧹 Nitpick comments (2)
src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte (1)

144-158: Consider adding rate limit handling and user feedback.

The implementation is functional, but could be enhanced:

  1. The GitHub API has rate limits (60 requests/hour for unauthenticated requests), which could affect users in shared network environments.
  2. Errors are silently logged to console without user notification, though the fallback version provides graceful degradation.

Consider adding conditional checks or caching to reduce API calls, or optionally notify users when the latest version cannot be fetched.

src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (1)

87-98: LGTM! Consider error handling for copy operation.

The implementation correctly handles the copy flow with analytics and user feedback. The copy helper likely handles errors internally, but if it can throw, consider adding a try-catch to show an error notification.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8a708ce and 8b25d4f.

📒 Files selected for processing (3)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createApple.svelte (3 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte (5 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createApple.svelte
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: e2e
  • GitHub Check: build
🔇 Additional comments (7)
src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte (3)

41-43: LGTM!

The GitHub API endpoint and default version fallback are appropriate.


207-207: LGTM!

The fire-and-forget pattern is appropriate here since there's a fallback default version.


331-335: LGTM!

The LlmBanner integration is correctly configured with appropriate props.

src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (4)

14-33: Props validation is appropriate given Svelte 5 constraints.

The runtime error for missing required props is clear and will surface immediately if misconfigured. While compile-time validation would be ideal, the current approach with $derived.by() and a thrown error is reasonable given Svelte's prop system.


120-127: LGTM!

The button configuration and disabled state handling are appropriate. The defensive check for prompt validity is good practice.


128-181: LGTM!

The Popover and ActionMenu implementation is secure and well-structured. The use of noopener,noreferrer prevents potential security issues with window.open.


101-187: LGTM!

The component template is well-structured with proper use of slots, good component composition, and appropriate accessibility attributes.

Comment on lines +45 to +67
function buildFlutterInstructions(version: string) {
return `
Install the Appwrite Flutter SDK using the following command:
\`\`\`
flutter pub add appwrite:${version}
\`\`\`
From a suitable lib directory, export the Appwrite client as a global variable, hardcode the project details too:
\`\`\`
final Client client = Client()
.setProject("${projectId}")
.setEndpoint("${sdk.forProject(page.params.region, page.params.project).client.config.endpoint}");
\`\`\`
On the homepage of the app, create a button that says "Send a ping" and when clicked, it should call the following function:
\`\`\`
client.ping();
\`\`\`
`;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify the Flutter package installation syntax and API availability.

Two concerns:

  1. Line 50: The syntax appwrite:${version} may not be valid for Flutter's pub add command. Flutter typically uses package_name version format without a colon.

  2. Line 64: Verify that the Appwrite Flutter SDK client has a ping() method.

Run the following script to check the Flutter pub add syntax:

Also, please search the web to verify:

  1. The correct syntax for flutter pub add with specific versions
  2. Whether the Appwrite Flutter SDK client supports a ping() method

🏁 Script executed:

#!/bin/bash
# Check Flutter pub add command syntax in official docs

rg -n "flutter pub add" --type=md -A 2 -B 2

Length of output: 0


🌐 Web query:

What is the correct syntax for flutter pub add command with a specific version?

💡 Result:

You include the version after a colon. Examples:

  • Add a package with a caret (compatible) constraint:
    flutter pub add package_name:^1.2.3. [1]

  • Add an exact version:
    flutter pub add package_name:1.2.3. [2]

To add as a dev dependency use --dev (e.g. flutter pub add --dev package_name:^1.2.3). [1][2]

Sources: [1] Flutter docs — Using packages. [2] dart/pub hosted example (Cloudsmith documentation).


🌐 Web query:

Does Appwrite Flutter SDK client have a ping method?

💡 Result:

Short answer: No — the Appwrite Flutter/Dart client doesn't expose a single Client.ping() method. Use the Health service (e.g., Health.getXXX or GET /v1/health) or call the desired endpoint (e.g., /v1/health) via the SDK instead. [1][2]

Sources:

  • Appwrite Health API docs (usage across SDKs). [1]
  • Appwrite REST Health endpoints (/v1/health). [2]

Replace client.ping() with a valid Appwrite Flutter SDK health check call.

The Flutter pub add syntax at line 50 is correct. However, line 64 has a critical issue: the Appwrite Flutter SDK client does not expose a ping() method. The Appwrite Flutter/Dart client should use the Health service instead.

Replace the ping example with a Health service call, such as calling the /v1/health endpoint via the SDK's Health service.

🤖 Prompt for AI Agents
In
src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte
around lines 45 to 67, the example uses client.ping() which does not exist on
the Appwrite Flutter SDK; replace that line with a call to the SDK’s Health
service (the Health endpoint for /v1/health) using the SDK’s health client
method (e.g., invoke the Health service getter and call its health check
method), handle the returned Future/response and errors appropriately so the
example shows a valid health check call instead of client.ping().

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte (1)

98-112: Consider user feedback for SDK version fetch failures.

The function silently falls back to the default version '11.3.0' when fetching fails. While this prevents blocking the user flow, it may cause users to work with outdated instructions without awareness.

Consider adding a subtle notification or indicator when the fetch fails and fallback is used:

         } catch (error) {
             console.error('Unable to fetch latest Android SDK version', error);
+            addNotification({
+                type: 'info',
+                message: 'Using default Android SDK version. Unable to fetch latest version.'
+            });
         }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b25d4f and c7fb232.

📒 Files selected for processing (1)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte (5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: e2e
  • GitHub Check: build
🔇 Additional comments (4)
src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte (4)

43-87: Comprehensive LLM instructions with proper dynamic value injection.

The buildAndroidInstructions function generates detailed, context-aware guidance for LLM agents. It correctly injects dynamic values (version, endpoint at line 76, projectId at line 77) and covers important scenarios like version catalogs, DSL variants, and existing client detection.


153-168: Proper lifecycle integration.

The fetchAndroidSdkVersion call is correctly placed in onMount, running as a non-blocking background operation that doesn't interfere with the existing realtime connection logic.


243-247: LlmBanner integration looks good.

The component is properly integrated with correct props (platform, configCode, alreadyExistsInstructions, openers) and logical positioning in the Clone starter flow.


39-41: GitHub API approach addresses past review but consider rate limiting implications.

The code does use an API as the past review comment requested—specifically GitHub's public releases API. However, the implementation has noteworthy limitations worth verifying:

  • Unauthenticated requests: Limited to 60 requests/hour per IP, problematic in shared networks or high-traffic scenarios
  • No caching: Fetch occurs on every page mount; repeated calls accumulate against rate limit quota
  • Silent failures: Errors only log to console; users unaware when fetch fails, then see outdated fallback versions ('11.3.0', '20.3.0')
  • Stale fallback: Default versions will become outdated as new SDK releases publish

Verify this approach is acceptable for your use case, or consider:

  1. Adding GitHub API authentication (token) to increase rate limits
  2. Implementing cache (localStorage/sessionStorage) to reduce API calls
  3. Notifying users when version fetch fails

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (2)

114-115: Reconsider CSS variable overrides on Alert component.

The CSS custom property overrides on the Alert.Inline component appear to work around the design system's intended styling. Per previous feedback, these overrides may introduce unintended side effects or maintenance issues.

Consider these alternatives:

  • Use a different status prop value if the design system supports it
  • Check if a variant or theme prop can achieve the desired styling
  • Collaborate with the design system team to add official support for this use case

If overrides are unavoidable, document why they're necessary and what visual requirement they fulfill.

Based on learnings


169-169: Replace global button radius classes with scoped styles.

The btn-no-right-radius and btn-no-left-radius classes are not defined in this file and likely rely on global styles, which past reviews have flagged as problematic.

Add a <style> section to scope these styles locally:

+<style>
+    :global(.btn-no-right-radius) {
+        border-top-right-radius: 0;
+        border-bottom-right-radius: 0;
+    }
+    :global(.btn-no-left-radius) {
+        border-top-left-radius: 0;
+        border-bottom-left-radius: 0;
+    }
+</style>

Alternatively, investigate whether the PinkButton.Split component provides props to control radius without custom classes.

Based on learnings

Also applies to: 176-176

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6930968 and d174af8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • package.json (1 hunks)
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/icon/ai.svelte (0 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte (6 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte (6 hunks)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (1 hunks)
💤 Files with no reviewable changes (1)
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/icon/ai.svelte
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: atharvadeosthale
Repo: appwrite/console PR: 2512
File: src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte:51-83
Timestamp: 2025-11-19T11:22:42.544Z
Learning: In src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte, the Cursor integration URL format `https://cursor.com/link/prompt` with the `text` query parameter is correct and functional.
Learnt from: atharvadeosthale
Repo: appwrite/console PR: 2512
File: src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte:51-83
Timestamp: 2025-11-19T11:22:42.544Z
Learning: In src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte, the Lovable integration URL format `https://lovable.dev/` with `autosubmit` and `prompt` as query parameters (set via searchParams) is correct and functional.
📚 Learning: 2025-09-26T06:48:57.938Z
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2373
File: src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte:629-631
Timestamp: 2025-09-26T06:48:57.938Z
Learning: In the Appwrite console codebase using appwrite.io/pink-svelte, the Icon component automatically handles CSS variable names passed to its color prop by internally wrapping them with var(). Therefore, passing '--some-css-variable' as a string to the Icon color prop works correctly without needing to manually wrap it with var().

Applied to files:

  • package.json
📚 Learning: 2025-11-19T11:22:42.544Z
Learnt from: atharvadeosthale
Repo: appwrite/console PR: 2512
File: src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte:51-83
Timestamp: 2025-11-19T11:22:42.544Z
Learning: In src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte, the Lovable integration URL format `https://lovable.dev/` with `autosubmit` and `prompt` as query parameters (set via searchParams) is correct and functional.

Applied to files:

  • src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte
📚 Learning: 2025-11-19T11:22:42.544Z
Learnt from: atharvadeosthale
Repo: appwrite/console PR: 2512
File: src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte:51-83
Timestamp: 2025-11-19T11:22:42.544Z
Learning: In src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte, the Cursor integration URL format `https://cursor.com/link/prompt` with the `text` query parameter is correct and functional.

Applied to files:

  • src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte
📚 Learning: 2025-10-13T05:13:54.542Z
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2413
File: src/routes/(console)/project-[region]-[project]/databases/table.svelte:33-39
Timestamp: 2025-10-13T05:13:54.542Z
Learning: In Svelte 5, `import { page } from '$app/state'` provides a reactive state proxy that can be accessed directly (e.g., `page.params`), unlike the older `import { page } from '$app/stores'` which returns a readable store requiring the `$page` syntax for auto-subscription in components.

Applied to files:

  • src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte
📚 Learning: 2025-10-05T09:41:40.439Z
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2398
File: src/routes/(console)/verify-email/+page.svelte:48-51
Timestamp: 2025-10-05T09:41:40.439Z
Learning: In SvelteKit 5, `page` imported from `$app/state` is a reactive state object (using runes), not a store. It should be accessed as `page.data` without the `$` prefix, unlike the store-based `$page` from `$app/stores` in earlier versions.

Applied to files:

  • src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: e2e
🔇 Additional comments (7)
src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte (4)

39-44: LGTM! API version fetching implemented as requested.

This implementation addresses the previous feedback to fetch versions from the API. The endpoint is correctly derived from the region-specific API endpoint, and the default version provides a reasonable fallback.

Based on learnings


46-90: Comprehensive and well-structured setup instructions.

The dynamic instruction generation correctly interpolates the SDK version, project ID, and endpoint. The guidance covers multiple scenarios (Version Catalogs, Kotlin/Groovy DSL, existing clients) which will help users across different project configurations.


101-115: Robust version fetching with proper error handling.

The function includes appropriate validation and error handling:

  • Checks HTTP response status
  • Validates the version string type and content
  • Gracefully falls back to the default version on failure
  • Logs errors for debugging

246-250: LLM banner integration is correct.

The component receives the necessary props with dynamic configuration. Note that only the Cursor opener is enabled for Android; if Lovable support is desired, add 'lovable' to the openers array.

src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte (2)

22-41: Props and config validation look good.

The Svelte 5 runes syntax is used correctly, and the config derivation includes proper validation to ensure either a full config or the platform+configCode combination is provided.


59-106: Opener configurations and copy functionality are correct.

The URL construction for both Cursor and Lovable matches the verified formats, analytics tracking is properly implemented, and the copy function includes user feedback via notifications.

Based on learnings

package.json (1)

27-27: Verify that pre-release package versions are intentional.

Both URLs resolve successfully (HTTP 200), and the commit hashes are valid references within pkg.vc's artifact registry. However, @appwrite.io/pink-icons-svelte publishes an RC as the latest (2.0.0‑RC.1), indicating these dependencies are pinned to pre-release builds rather than stable releases.

Confirm:

  1. Whether using RC versions is intentional for the codebase's current state
  2. That testing with the LLM banner functionality has been completed and verified

@TorstenDittmann TorstenDittmann merged commit 2632b0a into main Nov 19, 2025
4 checks passed
@TorstenDittmann TorstenDittmann deleted the revert-2491-revert-2477-copy-prompt branch November 19, 2025 13:35
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.

5 participants