Skip to content

Conversation

@suhaniawasthi10
Copy link

@suhaniawasthi10 suhaniawasthi10 commented Dec 26, 2025

What does this PR do?

Fixes Safari's Smart Quotes issue in the Function Execution Body field.

When users type JSON (e.g., { "test": "value" }) in the Body textarea on Safari/macOS, the browser's Smart Quotes feature automatically converts straight quotes (") to curly/typographic quotes (" "), which are invalid JSON characters. This causes a FormatException when trying to create the execution.

Solution: Added spellcheck={false} to both Body InputTextarea components (for v2 and v3 functions). This disables Safari's spell-checking suite, which includes the Smart Quotes auto-replacement feature.

This pattern is already used in rawVariableEditor.svelte in this codebase.

Test Plan

  1. Run the Console locally: pnpm dev
  2. Open Safari on macOS
  3. Navigate to: Functions → [any function] → Executions → Create Execution
  4. In the Body field, type: { "test": "value" }
  5. Expected: Quotes remain as straight quotes (") - no curly quotes
  6. Click Create - should NOT show FormatException

Also tested in Chrome/Firefox to ensure no regressions.

Related PRs and Issues

Have you read the Contributing Guidelines on issues?

Yes

Summary by CodeRabbit

  • Bug Fixes

    • Fixed platform details display to only render when a framework is selected, preventing UI from appearing in unintended states.
  • New Features

    • Enhanced platform wizard functionality to properly handle and preserve platform information when opening with existing platforms.
  • UX Improvements

    • Disabled spellcheck in request body input fields for a cleaner editing experience without automatic spell-checking suggestions.

✏️ 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 26, 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

HTTPS and SSL certificates are handled automatically for all your Sites

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2025

Walkthrough

This pull request modifies the platform wizard initialization flow and a related UI component. Changes include: (1) disabling spellcheck on request body textarea fields in the function execution page, (2) threading an optional platform key parameter through the platform onboarding and continuation logic from the onboard component through the continuePlatform function call, and (3) refining conditional rendering in the web platform creation component to only display details when a framework is selected.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes changes to function signatures (continuePlatform) and conditional rendering in createWeb.svelte that are unrelated to the Safari Smart Quotes fix described in the objectives. Remove the unrelated changes to continuePlatform function signature and createWeb.svelte conditional rendering, or clarify their necessity in the PR description.
✅ Passed checks (4 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 fix: preventing Safari Smart Quotes from corrupting JSON in the execution body textarea.
Linked Issues check ✅ Passed The PR adds spellcheck={false} to Body InputTextarea components in the function execution page, directly addressing issue #11021 which reports Safari Smart Quotes corrupting JSON input.
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 3b75d4a.

📒 Files selected for processing (4)
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • 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/onboard.svelte
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte
🧠 Learnings (3)
📚 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
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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/platforms/createWeb.svelte
🔇 Additional comments (3)
src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte (1)

179-183: LGTM! Fix correctly prevents Safari Smart Quotes corruption.

The addition of spellcheck={false} to both body textareas (v2 and v3 functions) effectively disables Safari's spell-checking suite, which includes the Smart Quotes auto-replacement feature that was causing JSON parsing errors. This is a clean, minimal fix that follows the existing pattern mentioned in the PR (rawVariableEditor.svelte).

The trade-off of disabling spell-checking is acceptable for JSON input fields where preserving exact character input matters more than spelling corrections.

Also applies to: 293-297

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

337-351: LGTM: Conditional rendering now properly guards against undefined framework.

The change from {:else} to {:else if selectedFramework} ensures the Details block only renders when a framework is actually selected. This prevents displaying framework-specific UI when key doesn't match any entry in the frameworks array.

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

70-77: LGTM: Correctly passes platform key to updated API.

The call to continuePlatform now includes platform.key as the fourth argument, properly aligning with the updated function signature in +page.svelte.


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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte (1)

30-51: The key parameter handling issue is in createWeb.svelte, not wizard.start.

While wizard.start handles the undefined key gracefully by passing it through props, the CreateWeb component does not handle this case. On line 160 of createWeb.svelte, the code derives selectedFramework using frameworks.find((framework) => framework.key === key), which will be undefined if key is not provided. This causes a crash on line 231 when accessing selectedFramework.label.

Since continuePlatform is only called with existing platforms (where key exists), the risk is low in current usage. However, the optional key? parameter signature could lead to misuse. Consider either:

  • Making key required in the function signature, or
  • Adding a null/undefined check in CreateWeb before accessing selectedFramework properties
📜 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 3b75d4a.

📒 Files selected for processing (4)
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • 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/onboard.svelte
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte
🧠 Learnings (3)
📚 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
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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
  • src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
  • src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.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/platforms/createWeb.svelte
🔇 Additional comments (3)
src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/execute-function/+page.svelte (1)

179-183: LGTM! Fix correctly prevents Safari Smart Quotes corruption.

The addition of spellcheck={false} to both body textareas (v2 and v3 functions) effectively disables Safari's spell-checking suite, which includes the Smart Quotes auto-replacement feature that was causing JSON parsing errors. This is a clean, minimal fix that follows the existing pattern mentioned in the PR (rawVariableEditor.svelte).

The trade-off of disabling spell-checking is acceptable for JSON input fields where preserving exact character input matters more than spelling corrections.

Also applies to: 293-297

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

337-351: LGTM: Conditional rendering now properly guards against undefined framework.

The change from {:else} to {:else if selectedFramework} ensures the Details block only renders when a framework is actually selected. This prevents displaying framework-specific UI when key doesn't match any entry in the frameworks array.

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

70-77: LGTM: Correctly passes platform key to updated API.

The call to continuePlatform now includes platform.key as the fourth argument, properly aligning with the updated function signature in +page.svelte.

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.

Smart Quotes used in Console Functions > [function name] > Executions > Create Execution > Body > [type JSON\] > Create

1 participant