Chore: Upgrade SDK to new platforms API#2965
Conversation
Greptile SummaryThis PR migrates the Appwrite Console's platforms and API-keys management to use the new SDK project-scoped API ( Key changes:
Confidence Score: 5/5This PR is safe to merge — it is a well-executed, mechanical API migration with no new logic bugs introduced. All three concerns raised in previous review threads have been resolved: dead component files are deleted, the updateName switch has a default throw branch, and the createFlutterPlatform switch has a default throw branch. The API migration itself is consistent across all 40 files. The android.svelte disabled-button comparison bug is also incidentally fixed. No new P0/P1 issues were found. No files require special attention.
|
| Filename | Overview |
|---|---|
| src/lib/helpers/platform.ts | Adds AnyPlatform union type, rewrites getPlatformInfo as a strict switch, and introduces getPlatformIdentifier helper — clean, well-typed refactor. |
| src/routes/(console)/project-[region]-[project]/overview/platforms/[platform]/+page@project-[region]-[project].svelte | Migrates updateName to type-specific API calls; removes dead platform components from the types map; adds a default throw branch addressing the previous review concern. |
| src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte | Simplifies PlatformTypes map to new unified types, renames getPlatformInfo to getPlatformIcon (now includes Linux/Windows icons), and migrates deletePlatform to project-scoped SDK. |
| src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte | Migrates Flutter platform creation to type-specific API methods; flutter-macos correctly maps to createApplePlatform (Apple bundle identifier); adds default throw branch. |
| src/routes/(console)/project-[region]-[project]/overview/platforms/wizard/store.ts | Replaces Partial<Models.Platform> with an explicit PlatformFormData type; adds key field, removes store/$id fields — matches new API requirements. |
| src/routes/(console)/project-[region]-[project]/overview/platforms/[platform]/android.svelte | Fixes longstanding disabled-button bug (was comparing key to hostname); migrates to updateAndroidPlatform with correct applicationId field. |
| src/routes/(console)/project-[region]-[project]/settings/migrations/+page.svelte | Migrates auto-generated migration API key creation to project-scoped SDK with caller-supplied keyId; no functional changes to scopes. |
| src/routes/(console)/organization-[organization]/settings/BAA.svelte | Removes hardcoded key: 'baa' from createBaaAddon call — the new API infers the key from the endpoint. |
Reviews (3): Last reviewed commit: "AI review fixes" | Re-trigger Greptile
src/routes/(console)/project-[region]-[project]/overview/platforms/+page.svelte
Show resolved
Hide resolved
...ect-[region]-[project]/overview/platforms/[platform]/+page@project-[region]-[project].svelte
Show resolved
Hide resolved
src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte
Show resolved
Hide resolved
|
Tip: Greploops — Automatically fix all review issues by running Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal. |
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)