Skip to content

Conversation

@ItzNotABug
Copy link
Member

@ItzNotABug ItzNotABug commented Dec 24, 2025

What does this PR do?

Fixes -

Uncaught TypeError: Cannot read properties of undefined (reading 'smallIcon')
    at get icon (createWeb.svelte:341:54)
    at children (createWeb.svelte:312:46)
    at createWeb.svelte:312:46
    at children (createWeb.svelte:312:46)
    at createWeb.svelte:312:46
    at children (createWeb.svelte:312:46)
    at createWeb.svelte:312:46

Because platform.key !== framework.key.

Test Plan

Manual.

Related PRs and Issues

N/A.

Have you read the Contributing Guidelines on issues?

Yes.

Summary by CodeRabbit

  • Refactor
    • Onboarding component reworked to use internal prop binding and derived state for platforms.
    • Platform setup flow simplified by removing the external "key" field from creation and wizard steps.
    • Navigation links and routing updated to use project-scoped routes for more consistent navigation.

✏️ Tip: You can customize this high-level summary in your review settings.

@ItzNotABug ItzNotABug self-assigned this Dec 24, 2025
@appwrite
Copy link

appwrite bot commented Dec 24, 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

Environment variable changes require redeployment to take effect

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 24, 2025

Walkthrough

Reworks props in onboard.svelte: exported pingCount and platforms are removed and replaced by a typed local destructure from $props(). Adds a derived platformMap and introduces projectRoute (via resolve) used for navigation; updates multiple hrefs/goto calls to use projectRoute. In platforms/+page.svelte the continuePlatform signature drops the key parameter and no longer sets or forwards key. The platforms wizard store removes key from its initial/reset state. Minor import adjustments reflect these API and routing changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title claims to fix crashes caused by empty string keys, but the actual changes systematically remove the key parameter from function signatures and store initialization across three files, fundamentally altering the API surface rather than fixing a crash condition. Update the title to accurately reflect the primary change: removing the key parameter from platform-related APIs (e.g., 'Refactor: Remove key parameter from platform continuation API').
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-web-crash

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4af5e83 and c2c9a40.

📒 Files selected for processing (1)
  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx,js,jsx,svelte}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,svelte}: Import reusable modules from the src/lib directory using the $lib alias
Use minimal comments in code; reserve comments for TODOs or complex logic explanations
Use $lib, $routes, and $themes aliases instead of relative paths for module imports

Files:

  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
src/routes/**/*.svelte

📄 CodeRabbit inference engine (AGENTS.md)

Use SvelteKit file conventions: +page.svelte for components, +page.ts for data loaders, +layout.svelte for wrappers, +error.svelte for error handling, and dynamic route params in square brackets like [param]

Files:

  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
**/*.{ts,tsx,js,jsx,svelte,json}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration

Files:

  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
**/*.svelte

📄 CodeRabbit inference engine (AGENTS.md)

Use Svelte 5 + SvelteKit 2 syntax with TypeScript for component development

Files:

  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
src/routes/**

📄 CodeRabbit inference engine (AGENTS.md)

Configure dynamic routes using SvelteKit convention with [param] syntax in route directory names

Files:

  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
🧠 Learnings (5)
📓 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.553Z
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.
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.553Z
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: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to src/routes/**/*.svelte : Use SvelteKit file conventions: +page.svelte for components, +page.ts for data loaders, +layout.svelte for wrappers, +error.svelte for error handling, and dynamic route params in square brackets like [param]
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to src/lib/components/**/*.svelte : Use PascalCase for component file names and place them in src/lib/components/[feature]/ directory structure
📚 Learning: 2025-11-19T11:22:42.553Z
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.553Z
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/onboard.svelte
📚 Learning: 2025-11-19T11:22:42.553Z
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.553Z
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/onboard.svelte
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to src/routes/**/*.svelte : Use SvelteKit file conventions: +page.svelte for components, +page.ts for data loaders, +layout.svelte for wrappers, +error.svelte for error handling, and dynamic route params in square brackets like [param]

Applied to files:

  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
📚 Learning: 2025-10-13T05:16:07.656Z
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2413
File: src/routes/(console)/project-[region]-[project]/databases/database-[database]/header.svelte:54-58
Timestamp: 2025-10-13T05:16:07.656Z
Learning: In SvelteKit apps, shared layout components (like headers) that use `$derived(page.data.*)` should use optional chaining when accessing properties that may not be present on all routes. During page transitions, reactive statements can briefly evaluate with different page.data structures, so optional chaining prevents runtime errors when navigating between routes with different data shapes (e.g., between `/databases` and `/databases/database-[database]`).

Applied to files:

  • src/routes/(console)/project-[region]-[project]/overview/onboard.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/onboard.svelte (7)

31-31: LGTM: Appropriate use of resolve for dynamic route generation.

The change from base to resolve is correct for generating parameterized routes in SvelteKit.


39-45: LGTM: Correct Svelte 5 props syntax.

The migration from export let to $props() destructuring with inline types follows Svelte 5 best practices. The types and default values are properly defined.


47-55: Excellent: $derived implementation addresses previous review feedback.

This correctly implements the reactive platformMap using $derived.by(), which automatically updates whenever the platforms array changes. This addresses the previous review comment about the stale map issue when using onMount.


57-62: LGTM: Good pattern for centralized route generation.

The projectRoute derived value correctly uses resolve() to generate dynamic routes with parameters. This centralizes route generation and ensures consistency across navigation calls.


64-68: LGTM: Correctly updated to use projectRoute.

The createKey function properly uses the new projectRoute for navigation consistency.


418-418: LGTM: Navigation consistently uses projectRoute.

All navigation calls and hrefs correctly use the new projectRoute derived value, ensuring consistent routing throughout the component.

Also applies to: 513-513, 523-523, 531-531


70-77: The continuePlatform function signature matches the call correctly. The function definition in platforms/+page.svelte expects (platform: Platform, name: string, type: PlatformType), and the call at line 72 passes these exact parameters in order: (type, platform.name, platform.type). The key parameter has been properly removed as intended by the PR fix.


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.

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: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b18a769 and 4af5e83.

📒 Files selected for processing (3)
  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/wizard/store.ts
💤 Files with no reviewable changes (1)
  • src/routes/(console)/project-[region]-[project]/overview/platforms/wizard/store.ts
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx,js,jsx,svelte}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,svelte}: Import reusable modules from the src/lib directory using the $lib alias
Use minimal comments in code; reserve comments for TODOs or complex logic explanations
Use $lib, $routes, and $themes aliases instead of relative paths for module imports

Files:

  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
src/routes/**/*.svelte

📄 CodeRabbit inference engine (AGENTS.md)

Use SvelteKit file conventions: +page.svelte for components, +page.ts for data loaders, +layout.svelte for wrappers, +error.svelte for error handling, and dynamic route params in square brackets like [param]

Files:

  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
**/*.{ts,tsx,js,jsx,svelte,json}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration

Files:

  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
**/*.svelte

📄 CodeRabbit inference engine (AGENTS.md)

Use Svelte 5 + SvelteKit 2 syntax with TypeScript for component development

Files:

  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
src/routes/**

📄 CodeRabbit inference engine (AGENTS.md)

Configure dynamic routes using SvelteKit convention with [param] syntax in route directory names

Files:

  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to src/lib/components/**/*.svelte : Use PascalCase for component file names and place them in src/lib/components/[feature]/ directory structure
📚 Learning: 2025-11-19T11:22:42.553Z
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.553Z
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/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
📚 Learning: 2025-11-19T11:22:42.553Z
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.553Z
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/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to src/routes/**/*.svelte : Use SvelteKit file conventions: +page.svelte for components, +page.ts for data loaders, +layout.svelte for wrappers, +error.svelte for error handling, and dynamic route params in square brackets like [param]

Applied to files:

  • src/routes/(console)/project-[region]-[project]/overview/onboard.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/onboard.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/onboard.svelte (6)

31-31: LGTM: Import additions support Svelte 5 migration.

The new imports (resolve for route computation and onMount for lifecycle management) are correctly used throughout the refactored component.

Also applies to: 38-38


40-46: LGTM: Correct migration to Svelte 5 $props() syntax.

The props are properly typed and destructured with default values, following Svelte 5 best practices.


50-55: LGTM: Route derivation improves maintainability.

Using $derived.by() to compute projectRoute centralizes path construction and eliminates repetition throughout the template.


64-68: LGTM: Route-aware navigation.

The createKey function correctly uses the derived projectRoute for navigation.


72-72: LGTM: Function call aligns with updated signature.

The call correctly passes type (Platform enum), platform.name, and platform.type (PlatformType) to match the updated continuePlatform signature that removed the key parameter.


418-418: LGTM: Consistent use of derived route.

All navigation and link paths correctly reference the derived projectRoute, ensuring consistency and reducing hard-coded path strings.

Also applies to: 513-513, 523-523, 531-531

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

30-45: LGTM: Removal of key parameter fixes the crash.

The updated continuePlatform function signature removes the problematic key parameter from the platform creation flow. This change:

  • Eliminates the empty-string key mismatch that caused the TypeError when accessing icon.smallIcon
  • Simplifies the wizard initialization by passing only platform: type in options
  • Maintains consistency across the platform creation state

This directly addresses the PR objective of fixing the crash caused by incorrect key handling.

@ItzNotABug ItzNotABug merged commit cd161af into main Dec 24, 2025
3 of 4 checks passed
@ItzNotABug ItzNotABug deleted the fix-web-crash branch December 24, 2025 07:37
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.

3 participants