-
Notifications
You must be signed in to change notification settings - Fork 19
(do not merge) feat: add option to enable Ask Fern through dashboard #3604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
</div> | ||
</div> | ||
<div className="mt-5 flex justify-center md:justify-end"> | ||
<ArchiveSiteButton docsUrl={docsUrl} /> | ||
<div className="border-border mx-auto mt-6 flex max-w-[750px] flex-1 flex-col rounded-xl border bg-gray-100 p-4 sm:mt-8 md:mt-10"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Settings component contains a duplicated archive site section with an empty title, creating redundant UI elements and functionality.
View Details
📝 Patch Details
diff --git a/packages/fern-dashboard/src/components/settings/Settings.tsx b/packages/fern-dashboard/src/components/settings/Settings.tsx
index 92397e7f2..feab83bf1 100644
--- a/packages/fern-dashboard/src/components/settings/Settings.tsx
+++ b/packages/fern-dashboard/src/components/settings/Settings.tsx
@@ -23,18 +23,6 @@ export function Settings({ docsUrl }: Settings.Props) {
<ArchiveSiteButton docsUrl={docsUrl} />
</div>
</div>
- <div className="border-border mx-auto mt-6 flex max-w-[750px] flex-1 flex-col rounded-xl border bg-gray-100 p-4 sm:mt-8 md:mt-10">
- <div className="flex flex-col gap-1">
- <div className="font-bold"></div>
- <div className="text-gray-900">
- This will hide the site from the dashboard, but any deployed domains
- will remain live.
- </div>
- </div>
- <div className="mt-5 flex justify-center md:justify-end">
- <ArchiveSiteButton docsUrl={docsUrl} />
- </div>
- </div>
</div>
);
}
Analysis
Duplicate Archive Site Section Bug Fix
Bug Summary
The Settings.tsx
component contained a duplicated archive site section that rendered two nearly identical UI elements, creating a confusing user experience and redundant functionality.
Bug Details
Location: packages/fern-dashboard/src/components/settings/Settings.tsx
(lines 26-37)
Issue Description:
The Settings component was rendering two identical archive site sections:
- First section (lines 14-25): Complete section with proper title "Archive site"
- Second section (lines 26-37): Duplicate section with empty title element
Both sections contained:
- Identical CSS styling and layout classes
- Same description text about hiding the site from dashboard
- Same
ArchiveSiteButton
component functionality - Same visual container structure
Impact Analysis
User Experience Issues:
- Duplicate UI: Users saw two identical "Archive site" sections, causing confusion
- Empty DOM element: The second section had an empty
<div className="font-bold"></div>
serving no purpose - Potential double-action: Users could potentially trigger the same archive action twice through both buttons
Code Quality Issues:
- DRY violation: Identical code blocks repeated unnecessarily
- Maintenance burden: Changes to archive functionality would need to be made in two places
- Unnecessary markup: Extra DOM elements and CSS classes without purpose
Root Cause
This appears to be an accidental duplication that occurred during development, possibly through:
- Copy-paste error during implementation
- Incomplete refactoring where the second section was meant for different functionality
- Merge conflict resolution that left both sections in place
Solution Implemented
Fix: Removed the duplicate second section (lines 26-37) while preserving the complete, functional first section.
Benefits:
- Single archive section: Clean, unambiguous user interface
- Eliminated redundancy: No duplicate buttons or actions
- Cleaner DOM: Removed unnecessary markup and empty elements
- Improved maintainability: Single location for archive functionality
Verification
The fix was verified by:
- Code inspection: Confirmed duplicate removal and proper structure preservation
- Component usage analysis: Verified the component is actively used in production routes
- Functionality preservation: Ensured all necessary functionality remains intact
The Settings component now renders a single, clean archive site section as originally intended.
Fixes FER-
Short description of the changes made
What was the motivation & context behind this PR?
How has this PR been tested?