Skip to content

Conversation

sahil485
Copy link
Contributor

@sahil485 sahil485 commented Sep 8, 2025

Fixes FER-

Short description of the changes made

What was the motivation & context behind this PR?

How has this PR been tested?

Remove this, otherwise it will alert all that this template has not been filled out

Copy link
Contributor

vercel bot commented Sep 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
dev.ferndocs.com Ready Ready Preview Sep 8, 2025 4:54pm
fern-dashboard Ready Ready Preview Sep 8, 2025 4:54pm
fern-dashboard-dev Ready Ready Preview Sep 8, 2025 4:54pm
ferndocs.com Ready Ready Preview Sep 8, 2025 4:54pm
3 Skipped Deployments
Project Deployment Preview Updated (UTC)
preview.ferndocs.com Skipped Skipped Sep 8, 2025 4:54pm
prod-assets.ferndocs.com Skipped Skipped Sep 8, 2025 4:54pm
prod.ferndocs.com Skipped Skipped Sep 8, 2025 4:54pm

</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">
Copy link
Contributor

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:

  1. First section (lines 14-25): Complete section with proper title "Archive site"
  2. 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:

  1. Code inspection: Confirmed duplicate removal and proper structure preservation
  2. Component usage analysis: Verified the component is actively used in production routes
  3. Functionality preservation: Ensured all necessary functionality remains intact

The Settings component now renders a single, clean archive site section as originally intended.

@fern-support fern-support changed the title initial commit (do not merge) feat: add option to enable Ask Fern through dashboard Sep 8, 2025
@sahil485 sahil485 closed this Sep 9, 2025
@sahil485 sahil485 deleted the schatiwala/turn-on-ask-ai-in-dashboard branch September 9, 2025 14:07
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.

1 participant