Skip to content

Clean up dead code AND incomplete features in frontend #201

@mmogr

Description

@mmogr

Problem

Several pieces of dead code and incomplete features are shipping in the frontend:

1. downloadDismissed is dead code

In ModelControlCenterPage.tsx:

const [downloadDismissed] = useState(false);

The setter is never destructured or called. The download completion banner can never be dismissed by the user. This is either dead code or an incomplete feature.

2. Conversation export only exports metadata

In ChatPage.tsx, the export function creates a "simplified version" that exports conversation metadata but not the actual messages. The export button is visible and functional, but produces incomplete output that's essentially useless.

3. McpServersPanel has hardcoded light-mode colors

In McpServersPanel.tsx, validation badges use hardcoded light-theme colors:

background: #fef3c7  /* light yellow */
color: #d97706       /* amber text */

And validation errors use:

background: #fef2f2  /* light pink */

These render as bright light-colored patches in the otherwise dark-themed UI.

4. Double semicolon in DownloadQueuePopover

In GlobalDownloadStatus/DownloadQueuePopover.tsx line ~108:

onRefresh?.();;  // double semicolon

Cosmetic but indicates insufficient linting.

5. Success message in SettingsModal never auto-clears

The SettingsModal shows a success message after saving, but there's no setTimeout to clear it. It persists until the next save action, which feels stale.

Proposed Solution

Item Action
downloadDismissed Either wire up the setter to a dismiss button on the completion banner, or remove the state entirely if the banner auto-clears
Conversation export Implement full export including message history (JSON or Markdown format), or remove the export button until ready
MCP light-mode colors Replace hardcoded hex values with CSS custom properties (var(--color-warning-*), var(--color-danger-*))
Double semicolon Remove the extra semicolon
Settings success message Add a setTimeout(() => setSuccess(null), 3000) to auto-clear

Files to update

  • src/pages/ModelControlCenterPage.tsx — fix downloadDismissed
  • src/pages/ChatPage.tsx — fix conversation export
  • src/components/McpServersPanel.tsx — fix hardcoded colors
  • src/components/GlobalDownloadStatus/DownloadQueuePopover.tsx — fix double semicolon
  • src/components/SettingsModal.tsx — fix success message auto-clear

Acceptance Criteria

  • No dead useState declarations
  • Conversation export includes full message history or button is hidden
  • All colors in McpServersPanel use design tokens / CSS custom properties
  • No double semicolons
  • Settings success message auto-clears after ~3 seconds
  • hasUpdates check in SettingsModal properly compares against original values (or document why always-save is intentional)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions