Skip to content

Fix: mark Forms as coming soon and disable toggle#164

Merged
breadddevv merged 1 commit into
PlanetaryOrbit:mainfrom
BuddyWinte:add-coming-soon
Jul 9, 2026
Merged

Fix: mark Forms as coming soon and disable toggle#164
breadddevv merged 1 commit into
PlanetaryOrbit:mainfrom
BuddyWinte:add-coming-soon

Conversation

@BuddyWinte

@BuddyWinte BuddyWinte commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

The Forms FF was added in #154 and it seems was not disabled

Summary by CodeRabbit

  • New Features
    • Updated the Forms section to indicate the feature is “Coming Soon.”
  • UI Changes
    • Disabled the related toggle so it no longer appears as an active setting.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Forms settings description text now includes a "(Coming Soon)" note. The associated switch component was changed from dynamically reflecting a workspace policy setting to a hardcoded, disabled, unchecked state, with the previous implementation commented out.

Changes

Forms settings switch disabled

Layer / File(s) Summary
Disable Forms switch and update description
components/settings/general/form.tsx
Updated Forms description to add "(Coming Soon)" and changed the switch to a hardcoded disabled, unchecked state instead of reflecting workspace.settings?.policiesEnabled.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: marking Forms as coming soon and disabling the toggle.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
components/settings/general/form.tsx (1)

29-33: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove commented-out code.

The previous SwitchComponenet usage should be deleted rather than left as commented-out dead code. It clutters the file and can cause confusion in future maintenance.

♻️ Remove commented-out block
-      {/*<SwitchComponenet
-        checked={workspace.settings?.policiesEnabled}
-        label=""
-        classoverride="mt-0"
-      />*/}
       <SwitchComponenet
         checked={false}
         disabled
         label=""
         classoverride="mt-0"
       />
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/settings/general/form.tsx` around lines 29 - 33, Remove the
commented-out SwitchComponenet block from the general form component instead of
leaving dead code in place. Update the JSX in the form rendering area of the
general settings form so only active code remains, and keep the cleanup focused
around the existing settings form markup where SwitchComponenet was previously
used.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/settings/general/form.tsx`:
- Around line 34-39: The disabled state is being dropped in `SwitchComponenet`,
so the underlying `Switch` still renders as interactive even when callers pass
`disabled`. Update `components/switch.tsx` inside `SwitchComponenet` to forward
the `disabled` prop directly to the rendered `Switch`, alongside the existing
`checked`, `onChange`, and styling props, so the control reflects its disabled
state consistently.

---

Nitpick comments:
In `@components/settings/general/form.tsx`:
- Around line 29-33: Remove the commented-out SwitchComponenet block from the
general form component instead of leaving dead code in place. Update the JSX in
the form rendering area of the general settings form so only active code
remains, and keep the cleanup focused around the existing settings form markup
where SwitchComponenet was previously used.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f4a6d196-6cd8-4e82-a71c-9448ae813911

📥 Commits

Reviewing files that changed from the base of the PR and between a1a2837 and 7166071.

📒 Files selected for processing (1)
  • components/settings/general/form.tsx

Comment on lines +34 to 39
<SwitchComponenet
checked={false}
disabled
label=""
classoverride="mt-0"
/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

disabled prop is silently ignored by SwitchComponenet.

The SwitchComponenet in components/switch.tsx destructures disabled but never forwards it to the underlying <Switch>. As a result, the switch still appears interactive (pointer cursor, hover/focus styles) despite the intent to disable it. While the missing onChange prevents state mutation, the UX is misleading — users will think the toggle is clickable.

The fix belongs in components/switch.tsx:

🔧 Forward `disabled` to the underlying `Switch`
 const SwitchComponenet: FC<Props> = ({ disabled, onChange, label, checked }: Props) => {
   return (
     <div className="flex flex-row">
       <Switch
         checked={checked}
+        disabled={disabled}
         className={`${checked ? 'bg-primary' : 'bg-zinc-200'
           } relative inline-flex h-6 w-11 items-center rounded-full shadow-inner mb-2`}
         onChange={onChange}
       >
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/settings/general/form.tsx` around lines 34 - 39, The disabled
state is being dropped in `SwitchComponenet`, so the underlying `Switch` still
renders as interactive even when callers pass `disabled`. Update
`components/switch.tsx` inside `SwitchComponenet` to forward the `disabled` prop
directly to the rendered `Switch`, alongside the existing `checked`, `onChange`,
and styling props, so the control reflects its disabled state consistently.

@breadddevv breadddevv merged commit 7023e89 into PlanetaryOrbit:main Jul 9, 2026
2 checks passed
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.

2 participants