Skip to content

Conversation

@suhaniawasthi10
Copy link

@suhaniawasthi10 suhaniawasthi10 commented Dec 25, 2025

Fixes #10873 - Cannot read properties of undefined (reading 'smallIcon')

When clicking 'Continue' on an existing web platform, the wizard was not receiving the framework key, causing selectedFramework to be undefined.

What does this PR do?

Fixes the crash that occurs when clicking "Continue" on an existing web platform in the onboarding flow.

Root Cause: The continuePlatform() function was not passing the framework key to the wizard, causing selectedFramework to be undefined.

Changes:

  • +page.svelte: Added key parameter to continuePlatform()
  • onboard.svelte: Pass platform.key when calling the function
  • createWeb.svelte: Added defensive null check

Test Plan

  1. Create a project with both Web and Android platforms
  2. Go to Project → Overview
  3. Click "Continue" on the Web platform card
  4. Verify the wizard opens without crashing

Ran pnpm run check (0 errors) and pnpm run lint (passed).

Related PRs and Issues

Fixes appwrite/appwrite#10873

Have you read the Contributing Guidelines on issues?

Yes

Summary by CodeRabbit

  • Bug Fixes

    • Framework details section now only displays when a framework is selected, improving clarity during setup.
  • Refactor

    • Enhanced platform wizard initialization to properly handle additional platform metadata.

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

Fixes #10873 - Cannot read properties of undefined (reading 'smallIcon')

When clicking 'Continue' on an existing web platform, the wizard was not
receiving the framework key, causing selectedFramework to be undefined.
@appwrite
Copy link

appwrite bot commented Dec 25, 2025

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

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

Tip

GraphQL API works alongside REST and WebSocket protocols

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 25, 2025

Walkthrough

The pull request adds a new optional key parameter to the continuePlatform function in the platforms module. When opening a platform wizard with an existing platform, the code now passes the platform.key as a fourth argument to continuePlatform. The function signature and implementation are updated to accept and forward this key parameter to the wizard.start call. Additionally, conditional rendering logic in the createWeb component is tightened to only render the "Details" card when a framework is selected, rather than whenever the framework selection state is not being changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: passing the platform key parameter to the wizard during continued platform setup, which directly addresses the root cause of the reported crash.
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

📜 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 e446f7f and 67121a1.

📒 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/createWeb.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/platforms/createWeb.svelte
  • 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/createWeb.svelte
  • 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/createWeb.svelte
  • 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/createWeb.svelte
  • 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/createWeb.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
🧠 Learnings (2)
📚 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/createWeb.svelte
  • 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/createWeb.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/onboard.svelte
🔇 Additional comments (4)
src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte (1)

337-337: LGTM! Defensive null check prevents crash.

This additional check ensures the Details card only renders when selectedFramework is defined, preventing the crash when accessing selectedFramework.smallIcon on line 341. This addresses the root cause mentioned in the PR objectives.

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

70-77: LGTM! Correctly passes platform key to continuePlatform.

The addition of platform.key as the fourth argument ensures the wizard receives the framework key when a user continues setup of an existing platform. This is essential for properly initializing selectedFramework in the wizard component.

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

30-35: LGTM! Function signature correctly updated.

The addition of the optional key parameter allows the function to accept the framework key when continuing platform setup. Making it optional ensures backward compatibility with any other callers that might not provide this parameter.


46-50: LGTM! Key correctly forwarded to wizard.

The key is properly passed to wizard.start options, ensuring the wizard component receives the framework key. This completes the fix by enabling createWeb.svelte to derive the correct selectedFramework when continuing platform setup.


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.

@suhaniawasthi10 suhaniawasthi10 closed this by deleting the head repository Dec 26, 2025
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.

Connect to web app screen thows error

1 participant