Skip to content

Conversation

@ItzNotABug
Copy link
Member

@ItzNotABug ItzNotABug commented Jan 30, 2026

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.)

Summary by CodeRabbit

  • Refactor
    • Enhanced plan change feedback form by replacing dropdown selector with a text area for free-form input
    • Updated form label to "Reason for plan change" for improved clarity
    • Refined placeholder text to guide users on providing feedback

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

@ItzNotABug ItzNotABug self-assigned this Jan 30, 2026
@appwrite
Copy link

appwrite bot commented Jan 30, 2026

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

SSR frameworks are fully supported with configurable build runtimes

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 30, 2026

Walkthrough

This pull request modifies the plan change downgrade flow in the organization console. The changes include removing the InputSelect import from the forms module, updating the Fieldset legend text from "Feedback" to "Reason for plan change", and replacing the InputSelect component with a commented-out block while preserving only the InputTextarea for user feedback. The placeholder text is updated to "Please enter your feedback" and a previously used label is removed. Overall, the modification eliminates the selectable reason dropdown in favor of a text-only feedback input.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ 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 'Update: remove downgrade options' directly relates to the main change: removing the InputSelect (downgrade options) and replacing it with a textarea in the plan change flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hide-options

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

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)/organization-[organization]/change-plan/+page.svelte (1)

153-162: ⚠️ Potential issue | 🔴 Critical

Bug: feedbackDowngradeReason is never set, causing reason to always be undefined.

The InputSelect that bound feedbackDowngradeReason is commented out, so this variable remains undefined. The find() will never match, and the API call will always receive reason: undefined.

Either remove the reason lookup entirely or restore the InputSelect.

🐛 Proposed fix if removing the reason field
     async function trackDowngradeFeedback() {
         await sdk.forConsole.organizations.createDowngradeFeedback({
             organizationId: data.organization.$id,
-            reason: feedbackDowngradeOptions.find(
-                (option) => option.value === feedbackDowngradeReason
-            )?.label,
+            reason: null,
             message: feedbackMessage ?? '',
             fromPlanId: data.organization.billingPlanId,
             toPlanId: selectedPlan.$id
         });
     }
🤖 Fix all issues with AI agents
In `@src/routes/`(console)/organization-[organization]/change-plan/+page.svelte:
- Around line 8-9: Remove the dead import feedbackDowngradeOptions from the
import list in +page.svelte and delete the unused variable declaration that
referenced it; update the trackDowngradeFeedback function to stop referencing
feedbackDowngradeOptions (remove that branch/parameter or replace with the
current data flow), and clean up any commented InputSelect usage or related
references so there are no lingering references to feedbackDowngradeOptions,
InputSelect, or the removed variable.
🧹 Nitpick comments (2)
src/routes/(console)/organization-[organization]/change-plan/+page.svelte (2)

454-460: Remove commented-out code instead of leaving it in place.

Commented-out code adds noise and confusion. If this feature is being removed, delete the code entirely. Version control preserves history if it's ever needed again. As per coding guidelines, reserve comments for TODOs or complex logic explanations.

♻️ Proposed fix
                 <Fieldset legend="Reason for plan change">
                     <Layout.Stack gap="xl">
-                        <!--<InputSelect
-                            id="reason"
-                            label="Reason for plan change"
-                            placeholder="Select one"
-                            required
-                            options={feedbackDowngradeOptions}
-                            bind:value={feedbackDowngradeReason} />-->
                         <InputTextarea
                             id="comment"
                             required
                             placeholder="Please enter your feedback"
                             bind:value={feedbackMessage} />
                     </Layout.Stack>
                 </Fieldset>

461-465: Consider adding a label for accessibility.

The InputTextarea previously had a label but it was removed. Screen readers rely on labels to announce form fields. Consider adding label="Feedback" or using aria-label if a visible label is not desired.

♿ Proposed fix
                         <InputTextarea
                             id="comment"
+                            label="Feedback"
                             required
                             placeholder="Please enter your feedback"
                             bind:value={feedbackMessage} />

@ItzNotABug ItzNotABug merged commit decd580 into main Jan 30, 2026
4 checks passed
@ItzNotABug ItzNotABug deleted the hide-options branch January 30, 2026 12:21
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