Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

fix(frontend): Phase 5 §8.2 A3 — add type="button" to raw action buttons

Juan Denisb70277ef67c6
diff --git a/frontend/src/components/EnvironmentVariables.jsx b/frontend/src/components/EnvironmentVariables.jsx
index 766e14d1..617b1278 100644
--- a/frontend/src/components/EnvironmentVariables.jsx
+++ b/frontend/src/components/EnvironmentVariables.jsx
@@ -372,7 +372,7 @@ const EnvironmentVariables = ({ appId }) => {
placeholder="Filter variables..."
/>
{filter && (
- <button className="filter-clear" onClick={() => setFilter('')}>&times;</button>
+ <button type="button" className="filter-clear" onClick={() => setFilter('')}>&times;</button>
)}
</div>
)}
@@ -407,7 +407,7 @@ const EnvironmentVariables = ({ appId }) => {
)}
</span>
<div className="env-item-actions">
- <button
+ <button type="button"
className="btn-icon"
onClick={() => toggleShowValue(envVar.id)}
title={showValues[envVar.id] ? 'Hide value' : 'Show value'}
@@ -424,7 +424,7 @@ const EnvironmentVariables = ({ appId }) => {
</svg>
)}
</button>
- <button
+ <button type="button"
className="btn-icon"
onClick={() => copyToClipboard(envVar.value)}
title="Copy value"
@@ -434,7 +434,7 @@ const EnvironmentVariables = ({ appId }) => {
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
</svg>
</button>
- <button
+ <button type="button"
className="btn-icon"
onClick={() => startEditing(envVar)}
title="Edit"
@@ -444,7 +444,7 @@ const EnvironmentVariables = ({ appId }) => {
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>
</svg>
</button>
- <button
+ <button type="button"
className="btn-icon"
onClick={() => handleToggleSecret(envVar)}
title={envVar.is_secret ? 'Mark as non-secret' : 'Mark as secret'}
@@ -461,7 +461,7 @@ const EnvironmentVariables = ({ appId }) => {
</svg>
)}
</button>
- <button
+ <button type="button"
className="btn-icon btn-danger"
onClick={() => handleDelete(envVar.key)}
title="Delete"
diff --git a/frontend/src/components/ErrorBoundary.jsx b/frontend/src/components/ErrorBoundary.jsx
index 787145f7..029c0d20 100644
--- a/frontend/src/components/ErrorBoundary.jsx
+++ b/frontend/src/components/ErrorBoundary.jsx
@@ -33,7 +33,7 @@ export class ErrorBoundary extends Component {
<p className="error-boundary-message">
{this.state.error?.message || 'An unexpected error occurred'}
</p>
- <button className="btn btn-primary" onClick={this.handleRetry}>
+ <button type="button" className="btn btn-primary" onClick={this.handleRetry}>
<RefreshCw size={14} />
Try Again
</button>
@@ -61,7 +61,7 @@ export function ErrorState({
<AlertTriangle size={16} />
<span>{errorMessage}</span>
{onRetry && (
- <button className="btn btn-ghost btn-sm" onClick={onRetry}>
+ <button type="button" className="btn btn-ghost btn-sm" onClick={onRetry}>
<RefreshCw size={14} /> Retry
</button>
)}
@@ -77,7 +77,7 @@ export function ErrorState({
<h3 className="error-state-title">{title}</h3>
<p className="error-state-message">{errorMessage}</p>
{onRetry && (
- <button className="btn btn-primary" onClick={onRetry}>
+ <button type="button" className="btn btn-primary" onClick={onRetry}>
<RefreshCw size={14} />
Try Again
</button>
diff --git a/frontend/src/components/JournalControls.jsx b/frontend/src/components/JournalControls.jsx
index b1aaf9ac..e2fc45d8 100644
--- a/frontend/src/components/JournalControls.jsx
+++ b/frontend/src/components/JournalControls.jsx
@@ -44,7 +44,7 @@ export function JournalControls({
{showQuickUnits && quickUnits.length > 0 && (
<div className="quick-units">
{quickUnits.map(u => (
- <button
+ <button type="button"
key={u}
className={`unit-chip ${unit === u ? 'active' : ''}`}
onClick={() => onUnitChange?.(unit === u ? '' : u)}
diff --git a/frontend/src/components/LinkAppModal.jsx b/frontend/src/components/LinkAppModal.jsx
index 6366b271..c828540c 100644
--- a/frontend/src/components/LinkAppModal.jsx
+++ b/frontend/src/components/LinkAppModal.jsx
@@ -88,7 +88,7 @@ const LinkAppModal = ({ app, onClose, onLinked }) => {
Create another {app.app_type} app first, or ensure existing apps
are not already linked.
</p>
- <button className="btn btn-secondary" onClick={onClose}>
+ <button type="button" className="btn btn-secondary" onClick={onClose}>
Close
</button>
</div>
diff --git a/frontend/src/components/LinkedAppsSection.jsx b/frontend/src/components/LinkedAppsSection.jsx
index 62b0bb0d..6dfca7be 100644
--- a/frontend/src/components/LinkedAppsSection.jsx
+++ b/frontend/src/components/LinkedAppsSection.jsx
@@ -38,7 +38,7 @@ const LinkedAppsSection = ({
Environment Linking
</h3>
{!app.has_linked_app && (
- <button
+ <button type="button"
className="btn btn-secondary btn-sm"
onClick={onLink}
disabled={loading}
@@ -87,14 +87,14 @@ const LinkedAppsSection = ({
</div>
</div>
<div className="linked-app-actions">
- <button
+ <button type="button"
className="btn btn-secondary btn-sm btn-icon"
onClick={() => onNavigate(linkedApp.id)}
title="View app"
>
<ExternalLink size={14} />
</button>
- <button
+ <button type="button"
className="btn btn-secondary btn-sm btn-icon"
onClick={onUnlink}
disabled={loading}
@@ -109,7 +109,7 @@ const LinkedAppsSection = ({
) : app.environment_type !== 'standalone' ? (
<div className="linked-apps-empty">
<p>No linked apps. Link another app to share database resources.</p>
- <button
+ <button type="button"
className="btn btn-secondary btn-sm"
onClick={onLink}
disabled={loading}
diff --git a/frontend/src/components/MetricsGraph.jsx b/frontend/src/components/MetricsGraph.jsx
index d060c0e1..9ef37ec9 100644
--- a/frontend/src/components/MetricsGraph.jsx
+++ b/frontend/src/components/MetricsGraph.jsx
@@ -155,7 +155,7 @@ const MetricsGraph = ({ compact = false, timezone, serverId }) => {
</div>
<div className="period-selector">
{periods.map(p => (
- <button
+ <button type="button"
key={p}
className={`period-btn ${period === p ? 'active' : ''}`}
onClick={() => setPeriod(p)}
@@ -213,19 +213,19 @@ const MetricsGraph = ({ compact = false, timezone, serverId }) => {
<span>Real-time Performance</span>
</div>
<div className="metrics-filter-legend">
- <button
+ <button type="button"
className={`filter-btn cpu ${visibleMetrics.cpu ? 'active' : ''}`}
onClick={() => toggleMetric('cpu')}
>
CPU
</button>
- <button
+ <button type="button"
className={`filter-btn memory ${visibleMetrics.memory ? 'active' : ''}`}
onClick={() => toggleMetric('memory')}
>
RAM
</button>
- <button
+ <button type="button"
className={`filter-btn disk ${visibleMetrics.disk ? 'active' : ''}`}
onClick={() => toggleMetric('disk')}
>
@@ -234,7 +234,7 @@ const MetricsGraph = ({ compact = false, timezone, serverId }) => {
</div>
<div className="period-selector">
{periods.map(p => (
- <button
+ <button type="button"
key={p}
className={`period-btn ${period === p ? 'active' : ''}`}
onClick={() => setPeriod(p)}
diff --git a/frontend/src/components/PrivateURLSection.jsx b/frontend/src/components/PrivateURLSection.jsx
index c9d12251..5c08b761 100644
--- a/frontend/src/components/PrivateURLSection.jsx
+++ b/frontend/src/components/PrivateURLSection.jsx
@@ -136,7 +136,7 @@ const PrivateURLSection = ({ app, onUpdate }) => {
<code className="url-value">{privateUrl}</code>
</div>
<div className="url-actions">
- <button
+ <button type="button"
className="btn btn-secondary btn-sm"
onClick={copyToClipboard}
title="Copy to clipboard"
@@ -147,7 +147,7 @@ const PrivateURLSection = ({ app, onUpdate }) => {
</svg>
Copy
</button>
- <button
+ <button type="button"
className="btn btn-secondary btn-sm"
onClick={handleRegenerate}
disabled={loading}
@@ -197,7 +197,7 @@ const PrivateURLSection = ({ app, onUpdate }) => {
</button>
</form>
) : (
- <button
+ <button type="button"
className="btn-link"
onClick={() => setEditMode(true)}
>
@@ -206,7 +206,7 @@ const PrivateURLSection = ({ app, onUpdate }) => {
)}
<div className="private-url-footer">
- <button
+ <button type="button"
className="btn btn-danger btn-sm"
onClick={handleDisable}
disabled={loading}
diff --git a/frontend/src/components/RemoteTerminal.jsx b/frontend/src/components/RemoteTerminal.jsx
index 3cf0d5a9..03784211 100644
--- a/frontend/src/components/RemoteTerminal.jsx
+++ b/frontend/src/components/RemoteTerminal.jsx
@@ -259,7 +259,7 @@ export default function RemoteTerminal({ serverId, onClose }) {
{sessionId && <span className="session-id">{sessionId}</span>}
</div>
<div className="terminal-actions">
- <button
+ <button type="button"
className="terminal-close-btn"
onClick={handleClose}
title="Close terminal"
diff --git a/frontend/src/components/appdetail/BuildTab.jsx b/frontend/src/components/appdetail/BuildTab.jsx
index 2a774d31..2519afb5 100644
--- a/frontend/src/components/appdetail/BuildTab.jsx
+++ b/frontend/src/components/appdetail/BuildTab.jsx
@@ -194,7 +194,7 @@ const BuildTab = ({ appId, appPath, app }) => {
{error && (
<div className="alert alert-danger">
{error}
- <button onClick={() => setError(null)} className="alert-close">&times;</button>
+ <button type="button" onClick={() => setError(null)} className="alert-close">&times;</button>
</div>
)}
diff --git a/frontend/src/components/appdetail/DeployTab.jsx b/frontend/src/components/appdetail/DeployTab.jsx
index 275a846d..ed79ed0f 100644
--- a/frontend/src/components/appdetail/DeployTab.jsx
+++ b/frontend/src/components/appdetail/DeployTab.jsx
@@ -155,7 +155,7 @@ const DeployTab = ({ appId, appPath }) => {
{error && (
<div className="alert alert-danger">
{error}
- <button onClick={() => setError(null)} className="alert-close">&times;</button>
+ <button type="button" onClick={() => setError(null)} className="alert-close">&times;</button>
</div>
)}
diff --git a/frontend/src/components/docker/ContainersTab.jsx b/frontend/src/components/docker/ContainersTab.jsx
index 21ad18ea..e5df2734 100644
--- a/frontend/src/components/docker/ContainersTab.jsx
+++ b/frontend/src/components/docker/ContainersTab.jsx
@@ -302,7 +302,7 @@ const ContainersTab = ({ onStatsChange }) => {
{ id: 'running', label: 'Running', count: counts.running },
{ id: 'stopped', label: 'Stopped', count: counts.stopped },
].map(c => (
- <button
+ <button type="button"
key={c.id}
className={`filter-chip ${statusFilter === c.id ? 'active' : ''}`}
onClick={() => setStatusFilter(c.id)}
@@ -324,7 +324,7 @@ const ContainersTab = ({ onStatsChange }) => {
<option value="memory">RAM</option>
<option value="created">Created</option>
</select>
- <button
+ <button type="button"
className="lv-icon-btn"
onClick={() => setSortDirection(prev => prev === 'asc' ? 'desc' : 'asc')}
title={`Sort ${sortDirection === 'asc' ? 'ascending' : 'descending'}`}
@@ -451,11 +451,11 @@ const ContainersTab = ({ onStatsChange }) => {
<span className="dx-muted-line">{container.created || container.CreatedAt || '-'}</span>
</td>
<td className="dx-row-actions" onClick={(e) => e.stopPropagation()}>
- <button className="dx-row-action" onClick={() => setLogsContainer(container)} title="Logs">
+ <button type="button" className="dx-row-action" onClick={() => setLogsContainer(container)} title="Logs">
<FileText size={13} />
</button>
{isRunning && !isRemote && (
- <button className="dx-row-action" onClick={() => setExecContainer(container)} title="Exec">
+ <button type="button" className="dx-row-action" onClick={() => setExecContainer(container)} title="Exec">
<TerminalLucide size={13} />
</button>
)}
@@ -465,19 +465,19 @@ const ContainersTab = ({ onStatsChange }) => {
</span>
) : isRunning ? (
<>
- <button className="dx-row-action" onClick={() => handleAction(containerId, 'restart')} title="Restart">
+ <button type="button" className="dx-row-action" onClick={() => handleAction(containerId, 'restart')} title="Restart">
<RotateCw size={13} />
</button>
- <button className="dx-row-action is-danger" onClick={() => handleAction(containerId, 'stop')} title="Stop">
+ <button type="button" className="dx-row-action is-danger" onClick={() => handleAction(containerId, 'stop')} title="Stop">
<Square size={13} />
</button>
</>
) : (
<>
- <button className="dx-row-action is-success" onClick={() => handleAction(containerId, 'start')} title="Start">
+ <button type="button" className="dx-row-action is-success" onClick={() => handleAction(containerId, 'start')} title="Start">
<Play size={13} />
</button>
- <button className="dx-row-action is-danger" onClick={() => handleAction(containerId, 'remove')} title="Remove">
+ <button type="button" className="dx-row-action is-danger" onClick={() => handleAction(containerId, 'remove')} title="Remove">
<Trash2 size={13} />
</button>
</>
@@ -614,10 +614,10 @@ const ContainerInspector = ({ container, stats, onAction, onOpenLogs, onOpenExec
<h3 title={getContainerName(container)}>{getContainerName(container)}</h3>
<span>{shortId(containerId)}</span>
</div>
- <button className="dx-row-action" onClick={copyContainerId} title="Copy container ID">
+ <button type="button" className="dx-row-action" onClick={copyContainerId} title="Copy container ID">
<Copy size={13} />
</button>
- <button className="dx-row-action" onClick={onClose} title="Close details">
+ <button type="button" className="dx-row-action" onClick={onClose} title="Close details">
<X size={13} />
</button>
</div>
@@ -630,11 +630,11 @@ const ContainerInspector = ({ container, stats, onAction, onOpenLogs, onOpenExec
</div>
<div className="dx-inspector-actions">
- <button className="dx-action-btn" onClick={() => onOpenLogs(container)}>
+ <button type="button" className="dx-action-btn" onClick={() => onOpenLogs(container)}>
<FileText size={13} /> Logs
</button>
{isRunning && !isRemote && (
- <button className="dx-action-btn" onClick={() => onOpenExec(container)}>
+ <button type="button" className="dx-action-btn" onClick={() => onOpenExec(container)}>
<TerminalLucide size={13} /> Exec
</button>
)}
@@ -644,19 +644,19 @@ const ContainerInspector = ({ container, stats, onAction, onOpenLogs, onOpenExec
</span>
) : isRunning ? (
<>
- <button className="dx-action-btn" onClick={() => onAction(containerId, 'restart')}>
+ <button type="button" className="dx-action-btn" onClick={() => onAction(containerId, 'restart')}>
<RotateCw size={13} /> Restart
</button>
- <button className="dx-action-btn is-danger" onClick={() => onAction(containerId, 'stop')}>
+ <button type="button" className="dx-action-btn is-danger" onClick={() => onAction(containerId, 'stop')}>
<Square size={13} /> Stop
</button>
</>
) : (
<>
- <button className="dx-action-btn is-success" onClick={() => onAction(containerId, 'start')}>
+ <button type="button" className="dx-action-btn is-success" onClick={() => onAction(containerId, 'start')}>
<Play size={13} /> Start
</button>
- <button className="dx-action-btn is-danger" onClick={() => onAction(containerId, 'remove')}>
+ <button type="button" className="dx-action-btn is-danger" onClick={() => onAction(containerId, 'remove')}>
<Trash2 size={13} /> Remove
</button>
</>
@@ -665,7 +665,7 @@ const ContainerInspector = ({ container, stats, onAction, onOpenLogs, onOpenExec
<div className="dx-inspector-tabs">
{['overview', 'ports', 'mounts', 'env'].map(section => (
- <button
+ <button type="button"
key={section}
className={activeSection === section ? 'active' : ''}
onClick={() => setActiveSection(section)}
@@ -953,7 +953,7 @@ const ContainerLogsModal = ({ container, onClose }) => {
<h3>{getContainerName(container)}</h3>
<p className="preview-drawer-path">{getContainerImage(container)} - {shortId(containerId)}</p>
</div>
- <button className="preview-drawer-close" onClick={onClose}>
+ <button type="button" className="preview-drawer-close" onClick={onClose}>
<X size={18} />
</button>
</header>
diff --git a/frontend/src/components/docker/dockerShared.jsx b/frontend/src/components/docker/dockerShared.jsx
index 2076320e..36541d1d 100644
--- a/frontend/src/components/docker/dockerShared.jsx
+++ b/frontend/src/components/docker/dockerShared.jsx
@@ -3,7 +3,7 @@ import { Trash2 } from 'lucide-react';
// Icon Action button used by remaining (legacy) tabs (Images, Networks, Volumes).
// Containers tab now renders cards with full action buttons inline.
export const IconAction = ({ title, onClick, color, children, disabled }) => (
- <button
+ <button type="button"
className="docker-icon-action"
title={title}
onClick={onClick}
diff --git a/frontend/src/components/domains/DdnsTokenCallout.jsx b/frontend/src/components/domains/DdnsTokenCallout.jsx
index 3a1be84f..78b82906 100644
--- a/frontend/src/components/domains/DdnsTokenCallout.jsx
+++ b/frontend/src/components/domains/DdnsTokenCallout.jsx
@@ -16,7 +16,7 @@ export default function DdnsTokenCallout({ host, onDismiss }) {
Token for <strong>{host.hostname || host.record_name}</strong> — shown once. Save it now.
</span>
{onDismiss && (
- <button className="ddns-token-callout__close" onClick={onDismiss} aria-label="Dismiss">
+ <button type="button" className="ddns-token-callout__close" onClick={onDismiss} aria-label="Dismiss">
&times;
</button>
)}
diff --git a/frontend/src/components/file-manager/ContextMenu.jsx b/frontend/src/components/file-manager/ContextMenu.jsx
index b480fb86..0b77ead2 100644
--- a/frontend/src/components/file-manager/ContextMenu.jsx
+++ b/frontend/src/components/file-manager/ContextMenu.jsx
@@ -23,26 +23,26 @@ export default function ContextMenu({
style={{ top: y, left: x }}
onClick={(e) => e.stopPropagation()}
>
- <button onClick={() => { onOpen(entry); onClose(); }}>
+ <button type="button" onClick={() => { onOpen(entry); onClose(); }}>
{entry.is_dir ? <Folder size={14} /> : <Eye size={14} />}
{entry.is_dir ? 'Open' : 'Preview'}
</button>
{!entry.is_dir && (
- <button onClick={() => { onDownload(entry); onClose(); }}>
+ <button type="button" onClick={() => { onDownload(entry); onClose(); }}>
<Download size={14} /> Download
</button>
)}
- <button onClick={() => { onRename(entry); onClose(); }}>
+ <button type="button" onClick={() => { onRename(entry); onClose(); }}>
<Edit3 size={14} /> Rename
</button>
- <button onClick={() => { onPermissions(entry); onClose(); }}>
+ <button type="button" onClick={() => { onPermissions(entry); onClose(); }}>
<Lock size={14} /> Permissions
</button>
- <button onClick={() => { onCopyPath(entry.path); onClose(); }}>
+ <button type="button" onClick={() => { onCopyPath(entry.path); onClose(); }}>
<Copy size={14} /> Copy path
</button>
<div className="context-menu-divider" />
- <button className="danger" onClick={() => { onDelete(entry); onClose(); }}>
+ <button type="button" className="danger" onClick={() => { onDelete(entry); onClose(); }}>
<Trash2 size={14} /> Delete{multi ? ` ${selectionCount} items` : ''}
</button>
</div>
diff --git a/frontend/src/components/file-manager/FileCard.jsx b/frontend/src/components/file-manager/FileCard.jsx
index 4464d972..41bc9579 100644
--- a/frontend/src/components/file-manager/FileCard.jsx
+++ b/frontend/src/components/file-manager/FileCard.jsx
@@ -33,7 +33,7 @@ function FileCard({
}}
onContextMenu={(e) => onContext(e, entry)}
>
- <button
+ <button type="button"
className="file-card-check"
onClick={(e) => {
e.stopPropagation();
diff --git a/frontend/src/components/file-manager/FileRow.jsx b/frontend/src/components/file-manager/FileRow.jsx
index e17a58ed..cd7e2ea3 100644
--- a/frontend/src/components/file-manager/FileRow.jsx
+++ b/frontend/src/components/file-manager/FileRow.jsx
@@ -31,7 +31,7 @@ function FileRow({
onContextMenu={(e) => onContext(e, entry)}
>
<span className="col-check" onClick={(e) => e.stopPropagation()}>
- <button
+ <button type="button"
className="checkbox-btn"
onClick={(e) => onToggleSelect(entry, { ...e, ctrlKey: true })}
aria-label={selected ? 'Deselect' : 'Select'}
@@ -54,17 +54,17 @@ function FileRow({
<span className="col-owner">{entry.owner}</span>
<span className="col-actions" onClick={(e) => e.stopPropagation()}>
{!entry.is_dir && (
- <button className="row-action" onClick={() => onDownload(entry)} title="Download">
+ <button type="button" className="row-action" onClick={() => onDownload(entry)} title="Download">
<Download size={14} />
</button>
)}
- <button className="row-action" onClick={() => onRename(entry)} title="Rename">
+ <button type="button" className="row-action" onClick={() => onRename(entry)} title="Rename">
<Edit3 size={14} />
</button>
- <button className="row-action" onClick={() => onPermissions(entry)} title="Permissions">
+ <button type="button" className="row-action" onClick={() => onPermissions(entry)} title="Permissions">
<Lock size={14} />
</button>
- <button className="row-action danger" onClick={() => onDelete(entry)} title="Delete">
+ <button type="button" className="row-action danger" onClick={() => onDelete(entry)} title="Delete">
<Trash2 size={14} />
</button>
</span>
diff --git a/frontend/src/components/file-manager/FolderTree.jsx b/frontend/src/components/file-manager/FolderTree.jsx
index ae02b267..3cff5c3c 100644
--- a/frontend/src/components/file-manager/FolderTree.jsx
+++ b/frontend/src/components/file-manager/FolderTree.jsx
@@ -14,7 +14,7 @@ function TreeNode({ node, level, expanded, treeCache, treeLoading, currentPath,
style={{ paddingLeft: 6 + level * 14 }}
onClick={() => onNavigate(node.path)}
>
- <button
+ <button type="button"
className="tree-chevron"
onClick={(e) => { e.stopPropagation(); onToggle(node.path); }}
aria-label={isExpanded ? 'Collapse' : 'Expand'}
diff --git a/frontend/src/components/file-manager/PreviewDrawer.jsx b/frontend/src/components/file-manager/PreviewDrawer.jsx
index b80d45e1..29c263fb 100644
--- a/frontend/src/components/file-manager/PreviewDrawer.jsx
+++ b/frontend/src/components/file-manager/PreviewDrawer.jsx
@@ -52,7 +52,7 @@ export default function PreviewDrawer({
<h3>{file.name}</h3>
<p className="preview-drawer-path">{file.path}</p>
</div>
- <button className="preview-drawer-close" onClick={onClose} aria-label="Close">
+ <button type="button" className="preview-drawer-close" onClick={onClose} aria-label="Close">
<X size={18} />
</button>
</header>
@@ -88,20 +88,20 @@ export default function PreviewDrawer({
<div className="preview-drawer-actions">
{!file.is_dir && (
- <button className="drawer-action-btn" onClick={() => onDownload(file)}>
+ <button type="button" className="drawer-action-btn" onClick={() => onDownload(file)}>
<Download size={14} /> Download
</button>
)}
- <button className="drawer-action-btn" onClick={() => onCopyPath(file.path)}>
+ <button type="button" className="drawer-action-btn" onClick={() => onCopyPath(file.path)}>
<Copy size={14} /> Copy path
</button>
- <button className="drawer-action-btn" onClick={() => onRename(file)}>
+ <button type="button" className="drawer-action-btn" onClick={() => onRename(file)}>
<Edit3 size={14} /> Rename
</button>
- <button className="drawer-action-btn" onClick={() => onPermissions(file)}>
+ <button type="button" className="drawer-action-btn" onClick={() => onPermissions(file)}>
<Lock size={14} /> Permissions
</button>
- <button className="drawer-action-btn danger" onClick={() => onDelete(file)}>
+ <button type="button" className="drawer-action-btn danger" onClick={() => onDelete(file)}>
<Trash2 size={14} /> Delete
</button>
</div>
diff --git a/frontend/src/components/log-viewer/LogFileList.jsx b/frontend/src/components/log-viewer/LogFileList.jsx
index b5664337..161c6dd5 100644
--- a/frontend/src/components/log-viewer/LogFileList.jsx
+++ b/frontend/src/components/log-viewer/LogFileList.jsx
@@ -57,7 +57,7 @@ export default function LogFileList({ files, selectedPath, onSelect, onRefresh,
placeholder="Filter log files…"
/>
</div>
- <button
+ <button type="button"
className="lv-icon-btn"
onClick={onRefresh}
disabled={loading}
@@ -83,7 +83,7 @@ export default function LogFileList({ files, selectedPath, onSelect, onRefresh,
const isCollapsed = collapsed.has(group.id);
return (
<div key={group.id} className="lv-group">
- <button
+ <button type="button"
className="lv-group-header"
onClick={() => toggleGroup(group.id)}
>
@@ -98,7 +98,7 @@ export default function LogFileList({ files, selectedPath, onSelect, onRefresh,
const kind = logKindFromPath(log.path || log.name);
const isActive = selectedPath === log.path;
return (
- <button
+ <button type="button"
key={log.path}
className={`lv-file ${isActive ? 'active' : ''}`}
onClick={() => onSelect(log)}
diff --git a/frontend/src/components/log-viewer/LogToolbar.jsx b/frontend/src/components/log-viewer/LogToolbar.jsx
index 9c0065a0..e030328f 100644
--- a/frontend/src/components/log-viewer/LogToolbar.jsx
+++ b/frontend/src/components/log-viewer/LogToolbar.jsx
@@ -23,7 +23,7 @@ export default function LogToolbar({
onKeyDown={(e) => e.key === 'Enter' && onSearchSubmit()}
/>
{searchPattern && (
- <button className="lv-search-field-clear" onClick={onSearchClear} title="Clear">
+ <button type="button" className="lv-search-field-clear" onClick={onSearchClear} title="Clear">
<X size={11} />
</button>
)}
@@ -41,7 +41,7 @@ export default function LogToolbar({
</div>
<div className="lv-toolbar-right">
- <button
+ <button type="button"
className={`lv-chip ${autoRefresh ? 'active' : ''}`}
onClick={onAutoRefreshToggle}
disabled={!canAct}
@@ -50,21 +50,21 @@ export default function LogToolbar({
<span className={`lv-pulse ${autoRefresh ? 'on' : ''}`} />
<span>Live</span>
</button>
- <button
+ <button type="button"
className={`lv-icon-btn ${showLineNumbers ? 'active' : ''}`}
onClick={onToggleLineNumbers}
title="Toggle line numbers"
>
<Hash size={13} />
</button>
- <button
+ <button type="button"
className={`lv-icon-btn ${wrapLines ? 'active' : ''}`}
onClick={onToggleWrap}
title="Toggle word wrap"
>
<WrapText size={13} />
</button>
- <button
+ <button type="button"
className="lv-icon-btn"
onClick={onScrollToBottom}
disabled={!canAct}
@@ -72,7 +72,7 @@ export default function LogToolbar({
>
<ArrowDownToLine size={13} />
</button>
- <button
+ <button type="button"
className="lv-icon-btn"
onClick={onRefresh}
disabled={!canAct}
@@ -80,7 +80,7 @@ export default function LogToolbar({
>
<RefreshCw size={13} />
</button>
- <button
+ <button type="button"
className="lv-icon-btn"
onClick={onDownload}
disabled={!canAct}
@@ -88,7 +88,7 @@ export default function LogToolbar({
>
<Download size={13} />
</button>
- <button
+ <button type="button"
className="lv-icon-btn danger"
onClick={onClear}
disabled={!canAct}
@@ -96,7 +96,7 @@ export default function LogToolbar({
>
<Trash2 size={13} />
</button>
- <button
+ <button type="button"
className="lv-icon-btn"
onClick={onToggleFullscreen}
title={isFullscreen ? 'Exit fullscreen' : 'Fullscreen'}
diff --git a/frontend/src/components/serverdetail/CloudflaredTab.jsx b/frontend/src/components/serverdetail/CloudflaredTab.jsx
index 04aeaf3d..5d600349 100644
--- a/frontend/src/components/serverdetail/CloudflaredTab.jsx
+++ b/frontend/src/components/serverdetail/CloudflaredTab.jsx
@@ -304,7 +304,7 @@ const CloudflaredTab = ({ serverId, serverStatus }) => {
>
Route subdomain
</Button>
- <button
+ <button type="button"
className="btn-icon danger"
onClick={() => handleDelete(t)}
title="Delete"
diff --git a/frontend/src/components/serverdetail/CronTab.jsx b/frontend/src/components/serverdetail/CronTab.jsx
index da838678..541ae2ab 100644
--- a/frontend/src/components/serverdetail/CronTab.jsx
+++ b/frontend/src/components/serverdetail/CronTab.jsx
@@ -210,14 +210,14 @@ const CronTab = ({ serverId, serverStatus }) => {
</Pill>
</td>
<td className="actions-cell">
- <button
+ <button type="button"
className="btn-icon"
onClick={() => handleToggle(job)}
title={job.enabled ? 'Disable' : 'Enable'}
>
{job.enabled ? <StopIcon /> : <PlayIcon />}
</button>
- <button
+ <button type="button"
className="btn-icon danger"
onClick={() => handleRemove(job)}
title="Remove"
diff --git a/frontend/src/components/serverdetail/ServerDockerTab.jsx b/frontend/src/components/serverdetail/ServerDockerTab.jsx
index 9f1e7445..5254fa39 100644
--- a/frontend/src/components/serverdetail/ServerDockerTab.jsx
+++ b/frontend/src/components/serverdetail/ServerDockerTab.jsx
@@ -150,13 +150,13 @@ const ServerDockerTab = ({ serverId, serverStatus, server }) => {
</div>
)}
<div className="docker-sub-tabs">
- <button
+ <button type="button"
className={`sub-tab ${subTab === 'containers' ? 'active' : ''}`}
onClick={() => setSubTab('containers')}
>
Containers ({containers.length})
</button>
- <button
+ <button type="button"
className={`sub-tab ${subTab === 'images' ? 'active' : ''}`}
onClick={() => setSubTab('images')}
>
@@ -198,14 +198,14 @@ const ServerDockerTab = ({ serverId, serverStatus, server }) => {
<td className="actions-cell">
{isRunning ? (
<>
- <button
+ <button type="button"
className="btn-icon"
onClick={() => handleContainerAction(container.id, 'restart')}
title="Restart"
>
<RefreshIcon />
</button>
- <button
+ <button type="button"
className="btn-icon danger"
onClick={() => handleContainerAction(container.id, 'stop')}
title="Stop"
@@ -215,14 +215,14 @@ const ServerDockerTab = ({ serverId, serverStatus, server }) => {
</>
) : (
<>
- <button
+ <button type="button"
className="btn-icon success"
onClick={() => handleContainerAction(container.id, 'start')}
title="Start"
>
<PlayIcon />
</button>
- <button
+ <button type="button"
className="btn-icon danger"
onClick={() => handleContainerAction(container.id, 'remove')}
title="Remove"
diff --git a/frontend/src/components/serverdetail/ServerSettingsTab.jsx b/frontend/src/components/serverdetail/ServerSettingsTab.jsx
index 9725b821..26a41b2e 100644
--- a/frontend/src/components/serverdetail/ServerSettingsTab.jsx
+++ b/frontend/src/components/serverdetail/ServerSettingsTab.jsx
@@ -285,7 +285,7 @@ const ServerSettingsTab = ({ server, onUpdate, onRegenerateToken, onDelete }) =>
{connectionInfo?.ip_address === ip && (
<Pill kind="green" dot={false}>Current</Pill>
)}
- <button
+ <button type="button"
className="btn-icon danger"
onClick={() => handleRemoveIP(ip)}
title="Remove"
diff --git a/frontend/src/components/settings/AboutTab.jsx b/frontend/src/components/settings/AboutTab.jsx
index 599fc71e..542e0fca 100644
--- a/frontend/src/components/settings/AboutTab.jsx
+++ b/frontend/src/components/settings/AboutTab.jsx
@@ -80,7 +80,7 @@ const AboutTab = () => {
) : updateInfo.error ? (
<div className="update-status error">
<span>{updateInfo.error}</span>
- <button className="btn-link" onClick={checkForUpdate}>Retry</button>
+ <button type="button" className="btn-link" onClick={checkForUpdate}>Retry</button>
</div>
) : updateInfo.update_available ? (
<div className="update-status available">
@@ -106,7 +106,7 @@ const AboutTab = () => {
{showStarPrompt && (
<div className="star-prompt-card">
- <button className="dismiss-btn" onClick={dismissStarPrompt} title="Dismiss">
+ <button type="button" className="dismiss-btn" onClick={dismissStarPrompt} title="Dismiss">
<X size={16} />
</button>
<div className="star-icon">
diff --git a/frontend/src/components/settings/AppearanceTab.jsx b/frontend/src/components/settings/AppearanceTab.jsx
index 623cd664..09ee922a 100644
--- a/frontend/src/components/settings/AppearanceTab.jsx
+++ b/frontend/src/components/settings/AppearanceTab.jsx
@@ -30,7 +30,7 @@ const AppearanceTab = () => {
<h3>Theme</h3>
<p>Select your preferred color scheme</p>
<div className="theme-options">
- <button
+ <button type="button"
className={`theme-option ${theme === 'dark' ? 'active' : ''}`}
onClick={() => setTheme('dark')}
>
@@ -43,7 +43,7 @@ const AppearanceTab = () => {
</div>
<span>Dark</span>
</button>
- <button
+ <button type="button"
className={`theme-option ${theme === 'light' ? 'active' : ''}`}
onClick={() => setTheme('light')}
>
@@ -56,7 +56,7 @@ const AppearanceTab = () => {
</div>
<span>Light</span>
</button>
- <button
+ <button type="button"
className={`theme-option ${theme === 'system' ? 'active' : ''}`}
onClick={() => setTheme('system')}
>
@@ -77,7 +77,7 @@ const AppearanceTab = () => {
<p>Choose the primary accent color used across the interface</p>
<div className="accent-presets">
{ACCENT_PRESETS.map(({ label, color }) => (
- <button
+ <button type="button"
key={color}
className={`accent-preset${accentColor === color ? ' active' : ''}`}
onClick={() => setAccentColor(color)}
@@ -115,7 +115,7 @@ const AppearanceTab = () => {
<span className="widget-item__label">{widget.label}</span>
</div>
<div className="widget-item__controls">
- <button
+ <button type="button"
className="widget-move-btn"
onClick={() => moveWidget(widget.id, 'up')}
disabled={idx === 0}
@@ -123,7 +123,7 @@ const AppearanceTab = () => {
>
<ChevronUp size={14} />
</button>
- <button
+ <button type="button"
className="widget-move-btn"
onClick={() => moveWidget(widget.id, 'down')}
disabled={idx === widgets.length - 1}
diff --git a/frontend/src/components/settings/IconReferenceTab.jsx b/frontend/src/components/settings/IconReferenceTab.jsx
index 71077000..7114d3d7 100644
--- a/frontend/src/components/settings/IconReferenceTab.jsx
+++ b/frontend/src/components/settings/IconReferenceTab.jsx
@@ -104,7 +104,7 @@ const IconReferenceTab = () => {
<h3>{group}</h3>
<div className="icon-reference-grid">
{Object.entries(icons).map(([name, IconComp]) => (
- <button
+ <button type="button"
key={name}
className={`icon-reference-item ${copiedIcon === name ? 'copied' : ''}`}
onClick={() => handleCopyImport(name)}
diff --git a/frontend/src/components/settings/NotificationsTab.jsx b/frontend/src/components/settings/NotificationsTab.jsx
index 146b6d17..300e6183 100644
--- a/frontend/src/components/settings/NotificationsTab.jsx
+++ b/frontend/src/components/settings/NotificationsTab.jsx
@@ -375,7 +375,7 @@ const NotificationsTab = () => {
)}
<div className="notification-tabs">
- <button
+ <button type="button"
className={`notification-tab ${activeSection === 'personal' ? 'active' : ''}`}
onClick={() => setActiveSection('personal')}
>
@@ -386,7 +386,7 @@ const NotificationsTab = () => {
My Preferences
</button>
{isAdmin && (
- <button
+ <button type="button"
className={`notification-tab ${activeSection === 'admin' ? 'active' : ''}`}
onClick={() => setActiveSection('admin')}
>
diff --git a/frontend/src/components/settings/SidebarSettings.jsx b/frontend/src/components/settings/SidebarSettings.jsx
index e1e1fd93..22dcd32b 100644
--- a/frontend/src/components/settings/SidebarSettings.jsx
+++ b/frontend/src/components/settings/SidebarSettings.jsx
@@ -102,7 +102,7 @@ const SidebarSettings = () => {
<div className="sidebar-presets">
{Object.entries(SIDEBAR_PRESETS).map(([key, profile]) => (
- <button
+ <button type="button"
key={key}
className={`sidebar-preset-card ${preset === key ? 'active' : ''}`}
onClick={() => handlePresetChange(key)}
@@ -121,7 +121,7 @@ const SidebarSettings = () => {
)}
</button>
))}
- <button
+ <button type="button"
className={`sidebar-preset-card ${preset === 'custom' ? 'active' : ''}`}
onClick={() => handlePresetChange('custom')}
>
diff --git a/frontend/src/components/settings/WhiteLabelTab.jsx b/frontend/src/components/settings/WhiteLabelTab.jsx
index 04a32c5f..a59a4db3 100644
--- a/frontend/src/components/settings/WhiteLabelTab.jsx
+++ b/frontend/src/components/settings/WhiteLabelTab.jsx
@@ -44,7 +44,7 @@ const WhiteLabelTab = () => {
<>
<div className="whitelabel-modes">
{WHITELABEL_MODES.map(({ id, label, icon: Icon, desc }) => (
- <button
+ <button type="button"
key={id}
className={`whitelabel-mode${whiteLabel.mode === id ? ' active' : ''}`}
onClick={() => setWhiteLabel({ mode: id })}
diff --git a/frontend/src/components/setup/SetupStepIntent.jsx b/frontend/src/components/setup/SetupStepIntent.jsx
index d055f36e..be0caff9 100644
--- a/frontend/src/components/setup/SetupStepIntent.jsx
+++ b/frontend/src/components/setup/SetupStepIntent.jsx
@@ -79,7 +79,7 @@ const SetupStepIntent = ({ selections, onComplete }) => {
</div>
<div className="wizard-nav" style={{ borderTop: 'none', marginTop: 0, paddingTop: 0 }}>
- <button className="btn-wizard-next" onClick={handleContinue}>
+ <button type="button" className="btn-wizard-next" onClick={handleContinue}>
Continue
</button>
</div>
diff --git a/frontend/src/components/setup/SetupStepSummary.jsx b/frontend/src/components/setup/SetupStepSummary.jsx
index 2619b977..2bc0e2f7 100644
--- a/frontend/src/components/setup/SetupStepSummary.jsx
+++ b/frontend/src/components/setup/SetupStepSummary.jsx
@@ -118,7 +118,7 @@ const SetupStepSummary = ({ accountInfo, useCases, onFinish }) => {
</div>
<div className="wizard-nav" style={{ borderTop: 'none', marginTop: 0, paddingTop: 0 }}>
- <button className="btn-wizard-next" onClick={onFinish}>
+ <button type="button" className="btn-wizard-next" onClick={onFinish}>
Go to Dashboard
</button>
</div>
diff --git a/frontend/src/components/setup/SetupStepTier.jsx b/frontend/src/components/setup/SetupStepTier.jsx
index c3e08e4f..5f4d4fb2 100644
--- a/frontend/src/components/setup/SetupStepTier.jsx
+++ b/frontend/src/components/setup/SetupStepTier.jsx
@@ -116,7 +116,7 @@ const SetupStepTier = ({ useCases, onComplete }) => {
</div>
<div className="wizard-nav" style={{ borderTop: 'none', marginTop: 0, paddingTop: 0 }}>
- <button className="btn-wizard-next" onClick={onComplete}>
+ <button type="button" className="btn-wizard-next" onClick={onComplete}>
Continue
</button>
</div>
diff --git a/frontend/src/components/wordpress/EnvironmentCard.jsx b/frontend/src/components/wordpress/EnvironmentCard.jsx
index 63ed7c61..b64f3dc2 100644
--- a/frontend/src/components/wordpress/EnvironmentCard.jsx
+++ b/frontend/src/components/wordpress/EnvironmentCard.jsx
@@ -150,7 +150,7 @@ const EnvironmentCard = ({ environment, productionUrl, onSync, onDelete, onViewL
</div>
<div className="wp-env-footer">
- <button
+ <button type="button"
className="btn btn-ghost btn-sm"
onClick={handleVisit}
disabled={!environment.url}
@@ -161,7 +161,7 @@ const EnvironmentCard = ({ environment, productionUrl, onSync, onDelete, onViewL
{!isProduction && (
<>
- <button
+ <button type="button"
className="btn btn-ghost btn-sm"
onClick={() => setShowSyncConfirm(true)}
disabled={syncing || !productionUrl}
@@ -171,7 +171,7 @@ const EnvironmentCard = ({ environment, productionUrl, onSync, onDelete, onViewL
{syncing ? 'Syncing...' : 'Sync'}
</button>
{onViewLogs && (
- <button
+ <button type="button"
className="btn btn-ghost btn-sm"
onClick={() => onViewLogs?.(environment.id)}
title="View sync logs"
@@ -180,7 +180,7 @@ const EnvironmentCard = ({ environment, productionUrl, onSync, onDelete, onViewL
Logs
</button>
)}
- <button
+ <button type="button"
className="btn btn-ghost btn-sm btn-danger"
onClick={() => setShowDeleteConfirm(true)}
disabled={deleting}
diff --git a/frontend/src/components/wordpress/PipelineView.jsx b/frontend/src/components/wordpress/PipelineView.jsx
index 4051f43b..55f20428 100644
--- a/frontend/src/components/wordpress/PipelineView.jsx
+++ b/frontend/src/components/wordpress/PipelineView.jsx
@@ -321,48 +321,48 @@ const PipelineCard = ({
<div className="pipeline-card-menu" onMouseLeave={() => setShowMenu(false)}>
{isRunning ? (
<>
- <button onClick={() => { onStop?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onStop?.(env); setShowMenu(false); }}>
<Square size={12} /> Stop
</button>
- <button onClick={() => { onRestart?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onRestart?.(env); setShowMenu(false); }}>
<RefreshCw size={12} /> Restart
</button>
</>
) : (
- <button onClick={() => { onStart?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onStart?.(env); setShowMenu(false); }}>
<Play size={12} /> Start
</button>
)}
- <button onClick={() => { onViewLogs?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onViewLogs?.(env); setShowMenu(false); }}>
<FileText size={12} /> Logs
</button>
<div className="pipeline-card-menu-divider" />
- <button onClick={() => { onResourceLimits?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onResourceLimits?.(env); setShowMenu(false); }}>
<Cpu size={12} /> Resources
</button>
- <button onClick={() => { onBasicAuth?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onBasicAuth?.(env); setShowMenu(false); }}>
<Shield size={12} /> Basic Auth
</button>
- <button onClick={() => { onWpCli?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onWpCli?.(env); setShowMenu(false); }}>
<Terminal size={12} /> WP-CLI
</button>
{!isProduction && onAutoSync && (
- <button onClick={() => { onAutoSync?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onAutoSync?.(env); setShowMenu(false); }}>
<Clock size={12} /> Auto-Sync
</button>
)}
<div className="pipeline-card-menu-divider" />
{env.is_locked ? (
- <button onClick={() => { onUnlock?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onUnlock?.(env); setShowMenu(false); }}>
<Unlock size={12} /> Unlock
</button>
) : (
- <button onClick={() => { onLock?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onLock?.(env); setShowMenu(false); }}>
<Lock size={12} /> Lock
</button>
)}
{!isProduction && (
- <button className="danger" onClick={() => { onDelete?.(env); setShowMenu(false); }}>
+ <button type="button" className="danger" onClick={() => { onDelete?.(env); setShowMenu(false); }}>
<Trash2 size={12} /> Delete
</button>
)}
@@ -427,7 +427,7 @@ const PipelineCard = ({
const PipelineArrow = ({ label, direction, disabled, onClick }) => {
return (
<div className={`pipeline-arrow ${disabled ? 'disabled' : ''}`}>
- <button
+ <button type="button"
className="pipeline-arrow-btn"
onClick={onClick}
disabled={disabled}
@@ -489,34 +489,34 @@ const MultidevCard = ({
<div className="pipeline-card-menu" onMouseLeave={() => setShowMenu(false)}>
{isRunning ? (
<>
- <button onClick={() => { onStop?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onStop?.(env); setShowMenu(false); }}>
<Square size={12} /> Stop
</button>
- <button onClick={() => { onRestart?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onRestart?.(env); setShowMenu(false); }}>
<RefreshCw size={12} /> Restart
</button>
</>
) : (
- <button onClick={() => { onStart?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onStart?.(env); setShowMenu(false); }}>
<Play size={12} /> Start
</button>
)}
- <button onClick={() => { onSync?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onSync?.(env); setShowMenu(false); }}>
<ArrowDownLeft size={12} /> Sync from Prod
</button>
- <button onClick={() => { onViewLogs?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onViewLogs?.(env); setShowMenu(false); }}>
<FileText size={12} /> Logs
</button>
{env.is_locked ? (
- <button onClick={() => { onUnlock?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onUnlock?.(env); setShowMenu(false); }}>
<Unlock size={12} /> Unlock
</button>
) : (
- <button onClick={() => { onLock?.(env); setShowMenu(false); }}>
+ <button type="button" onClick={() => { onLock?.(env); setShowMenu(false); }}>
<Lock size={12} /> Lock
</button>
)}
- <button className="danger" onClick={() => { onDelete?.(env); setShowMenu(false); }}>
+ <button type="button" className="danger" onClick={() => { onDelete?.(env); setShowMenu(false); }}>
<Trash2 size={12} /> Delete
</button>
</div>
diff --git a/frontend/src/components/wordpress/SnapshotTable.jsx b/frontend/src/components/wordpress/SnapshotTable.jsx
index 1de523af..4f2b90b9 100644
--- a/frontend/src/components/wordpress/SnapshotTable.jsx
+++ b/frontend/src/components/wordpress/SnapshotTable.jsx
@@ -99,7 +99,7 @@ const SnapshotTable = ({ snapshots, onRestore, onDelete, loading = false }) => {
)}
</td>
<td className="wp-cell-actions">
- <button
+ <button type="button"
className="wp-row-action"
title="Restore"
onClick={() => setConfirmRestore(snapshot)}
@@ -107,7 +107,7 @@ const SnapshotTable = ({ snapshots, onRestore, onDelete, loading = false }) => {
>
<RotateCcw size={14} />
</button>
- <button
+ <button type="button"
className="wp-row-action wp-row-action--danger"
title="Delete"
onClick={() => setConfirmDelete(snapshot)}
diff --git a/frontend/src/components/wordpress/WpCliTerminal.jsx b/frontend/src/components/wordpress/WpCliTerminal.jsx
index 78d500b7..f7aac279 100644
--- a/frontend/src/components/wordpress/WpCliTerminal.jsx
+++ b/frontend/src/components/wordpress/WpCliTerminal.jsx
@@ -120,7 +120,7 @@ const WpCliTerminal = ({ environment, prodId, onClose, api }) => {
{showHistory && history.length > 0 && (
<div className="wpcli-history">
{history.slice(0, 10).map((cmd, i) => (
- <button
+ <button type="button"
key={i}
className="wpcli-history-item"
onClick={() => {
diff --git a/frontend/src/components/wordpress/detail/OverviewTab.jsx b/frontend/src/components/wordpress/detail/OverviewTab.jsx
index d9bd4b3c..b50d4a84 100644
--- a/frontend/src/components/wordpress/detail/OverviewTab.jsx
+++ b/frontend/src/components/wordpress/detail/OverviewTab.jsx
@@ -261,7 +261,7 @@ const OverviewTab = ({ site, onUpdate }) => {
</>
)}
{site.is_production && (site.environments || []).length < 2 && (
- <button
+ <button type="button"
className="quick-action-btn"
onClick={() => setShowEnvModal(true)}
>
@@ -269,7 +269,7 @@ const OverviewTab = ({ site, onUpdate }) => {
Create Environment
</button>
)}
- <button
+ <button type="button"
className="quick-action-btn"
onClick={handleQuickSnapshot}
disabled={creatingSnapshot}
@@ -278,7 +278,7 @@ const OverviewTab = ({ site, onUpdate }) => {
{creatingSnapshot ? 'Creating...' : 'Create Snapshot'}
</button>
{site.environments?.length > 0 && (
- <button
+ <button type="button"
className="quick-action-btn"
onClick={handleSyncAll}
disabled={syncingAll}
@@ -287,7 +287,7 @@ const OverviewTab = ({ site, onUpdate }) => {
{syncingAll ? 'Syncing...' : 'Sync All Envs'}
</button>
)}
- <button
+ <button type="button"
className="quick-action-btn"
onClick={handleFlushCache}
disabled={flushingCache}
@@ -295,7 +295,7 @@ const OverviewTab = ({ site, onUpdate }) => {
<Trash2 size={16} />
{flushingCache ? 'Flushing...' : 'Purge Cache'}
</button>
- <button
+ <button type="button"
className="quick-action-btn"
onClick={handleTogglePageCache}
disabled={togglingPageCache}
@@ -306,14 +306,14 @@ const OverviewTab = ({ site, onUpdate }) => {
? 'Working...'
: (pageCacheActive ? 'Page Cache: On' : 'Enable Page Cache')}
</button>
- <button
+ <button type="button"
className="quick-action-btn"
onClick={() => setShowSearchReplace(true)}
>
<Replace size={16} />
Search &amp; Replace
</button>
- <button
+ <button type="button"
className="quick-action-btn"
onClick={handleHarden}
disabled={hardening}
@@ -321,7 +321,7 @@ const OverviewTab = ({ site, onUpdate }) => {
<ShieldCheck size={16} />
{hardening ? 'Hardening...' : 'Harden'}
</button>
- <button
+ <button type="button"
className="quick-action-btn"
onClick={handleToggleObjectCache}
disabled={togglingCache}
diff --git a/frontend/src/components/workflow/ConnectionEdge.jsx b/frontend/src/components/workflow/ConnectionEdge.jsx
index f10849d6..df0fdd95 100644
--- a/frontend/src/components/workflow/ConnectionEdge.jsx
+++ b/frontend/src/components/workflow/ConnectionEdge.jsx
@@ -74,7 +74,7 @@ const ConnectionEdge = ({
>
<span className="edge-label-text">{label}</span>
{selected && data?.onDelete && (
- <button
+ <button type="button"
className="edge-delete-btn"
onClick={(e) => {
e.stopPropagation();
diff --git a/frontend/src/components/workflow/panels/NotificationConfigPanel.jsx b/frontend/src/components/workflow/panels/NotificationConfigPanel.jsx
index 57b7a835..696a36d7 100644
--- a/frontend/src/components/workflow/panels/NotificationConfigPanel.jsx
+++ b/frontend/src/components/workflow/panels/NotificationConfigPanel.jsx
@@ -43,7 +43,7 @@ const NotificationConfigPanel = ({ node, onChange, onClose, onDelete }) => {
<Label>Channel</Label>
<div className="channel-grid">
{channels.map(({ id, icon: Icon, label: chLabel }) => (
- <button
+ <button type="button"
key={id}
className={`channel-btn ${channel === id ? 'active' : ''}`}
onClick={() => onChange({ ...data, channel: id })}
diff --git a/frontend/src/components/workflow/panels/ScriptConfigPanel.jsx b/frontend/src/components/workflow/panels/ScriptConfigPanel.jsx
index 3b29d2d5..91660cc9 100644
--- a/frontend/src/components/workflow/panels/ScriptConfigPanel.jsx
+++ b/frontend/src/components/workflow/panels/ScriptConfigPanel.jsx
@@ -40,14 +40,14 @@ const ScriptConfigPanel = ({ node, onChange, onClose, onDelete }) => {
<div className="form-group">
<Label>Language</Label>
<div className="lang-toggle">
- <button
+ <button type="button"
className={`lang-btn ${language === 'bash' ? 'active' : ''}`}
onClick={() => onChange({ ...data, language: 'bash' })}
>
<Terminal size={14} />
Bash
</button>
- <button
+ <button type="button"
className={`lang-btn ${language === 'python' ? 'active' : ''}`}
onClick={() => onChange({ ...data, language: 'python' })}
>
diff --git a/frontend/src/components/workflow/panels/TriggerConfigPanel.jsx b/frontend/src/components/workflow/panels/TriggerConfigPanel.jsx
index dee8751e..443140b6 100644
--- a/frontend/src/components/workflow/panels/TriggerConfigPanel.jsx
+++ b/frontend/src/components/workflow/panels/TriggerConfigPanel.jsx
@@ -81,7 +81,7 @@ const TriggerConfigPanel = ({ node, onChange, onClose, onDelete }) => {
<Label>Trigger Type</Label>
<div className="trigger-type-grid">
{triggerTypes.map(({ id, icon: Icon, label: typeLabel, desc }) => (
- <button
+ <button type="button"
key={id}
className={`trigger-type-btn ${triggerType === id ? 'active' : ''}`}
onClick={() => handleTypeChange(id)}
diff --git a/frontend/src/pages/Backups.jsx b/frontend/src/pages/Backups.jsx
index 3ef8d7b0..c9f7fc77 100644
--- a/frontend/src/pages/Backups.jsx
+++ b/frontend/src/pages/Backups.jsx
@@ -418,7 +418,7 @@ const Backups = () => {
{error && (
<div className="alert alert-danger">
{error}
- <button onClick={() => setError(null)} className="alert-close">&times;</button>
+ <button type="button" onClick={() => setError(null)} className="alert-close">&times;</button>
</div>
)}
diff --git a/frontend/src/pages/CronJobs.jsx b/frontend/src/pages/CronJobs.jsx
index 48c2b5d4..68ce6822 100644
--- a/frontend/src/pages/CronJobs.jsx
+++ b/frontend/src/pages/CronJobs.jsx
@@ -239,7 +239,7 @@ const CronJobs = () => {
{error && (
<div className="alert alert-danger">
{error}
- <button onClick={() => setError(null)} className="alert-close">&times;</button>
+ <button type="button" onClick={() => setError(null)} className="alert-close">&times;</button>
</div>
)}
diff --git a/frontend/src/pages/Dashboard.jsx b/frontend/src/pages/Dashboard.jsx
index 299d5832..6fb863bc 100644
--- a/frontend/src/pages/Dashboard.jsx
+++ b/frontend/src/pages/Dashboard.jsx
@@ -356,7 +356,7 @@ const Dashboard = () => {
<span className="clock-zone">{serverTime?.timezone_id || 'UTC'}</span>
</div>
<div className="refresh-control">
- <button
+ <button type="button"
className="btn-refresh"
onClick={handleRefreshAll}
title="Refresh now"
@@ -451,15 +451,15 @@ const Dashboard = () => {
specs: () => (
<div key="specs" className="spec-panel">
<h3 className="spec-panel-title">Quick Actions</h3>
- <button className="btn-action" onClick={() => navigate('/servers')}>
+ <button type="button" className="btn-action" onClick={() => navigate('/servers')}>
<span>Manage Servers</span>
<span><Server size={14} /></span>
</button>
- <button className="btn-action" onClick={() => navigate('/docker')}>
+ <button type="button" className="btn-action" onClick={() => navigate('/docker')}>
<span>Docker Containers</span>
<span><Container size={14} /></span>
</button>
- <button className="btn-action" onClick={() => navigate('/terminal')}>
+ <button type="button" className="btn-action" onClick={() => navigate('/terminal')}>
<span>Open Terminal</span>
<span><Terminal size={14} /></span>
</button>
diff --git a/frontend/src/pages/Docker.jsx b/frontend/src/pages/Docker.jsx
index 570d81a7..1afc2153 100644
--- a/frontend/src/pages/Docker.jsx
+++ b/frontend/src/pages/Docker.jsx
@@ -244,7 +244,7 @@ const Docker = () => {
</div>
<div className="dx-resource-nav">
{availableServers.map(server => (
- <button
+ <button type="button"
key={server.id}
className={`dx-resource-nav-item ${selectedServer.id === server.id ? 'active' : ''}`}
onClick={() => setSelectedServer(server)}
@@ -267,7 +267,7 @@ const Docker = () => {
{tabs.map(tab => {
const Icon = tab.icon;
return (
- <button
+ <button type="button"
key={tab.id}
className={`dx-resource-nav-item ${activeTab === tab.id ? 'active' : ''}`}
onClick={() => setActiveTab(tab.id)}
diff --git a/frontend/src/pages/Downloads.jsx b/frontend/src/pages/Downloads.jsx
index 3e0f2113..3b716ec7 100644
--- a/frontend/src/pages/Downloads.jsx
+++ b/frontend/src/pages/Downloads.jsx
@@ -164,7 +164,7 @@ function Downloads() {
{error && (
<div className="alert alert-error">
<p>{error}</p>
- <button onClick={fetchVersionInfo}>Try Again</button>
+ <button type="button" onClick={fetchVersionInfo}>Try Again</button>
</div>
)}
@@ -251,7 +251,7 @@ function Downloads() {
<pre>
<code>{platforms[0].command}</code>
</pre>
- <button
+ <button type="button"
className="copy-btn"
onClick={() => copyToClipboard(platforms[0].command, 'linux')}
title="Copy to clipboard"
@@ -270,7 +270,7 @@ function Downloads() {
<pre>
<code>{platforms[2].command}</code>
</pre>
- <button
+ <button type="button"
className="copy-btn"
onClick={() => copyToClipboard(platforms[2].command, 'windows')}
title="Copy to clipboard"
diff --git a/frontend/src/pages/FileManager.jsx b/frontend/src/pages/FileManager.jsx
index fa967a56..eef1e60f 100644
--- a/frontend/src/pages/FileManager.jsx
+++ b/frontend/src/pages/FileManager.jsx
@@ -843,7 +843,7 @@ function FileManager() {
{activeUploads.length > 0 && (
<span className="upload-tray-percent">{Math.round(totalUploadProgress)}%</span>
)}
- <button className="toolbar-icon-btn small" onClick={() => setUploads([])} title="Clear">
+ <button type="button" className="toolbar-icon-btn small" onClick={() => setUploads([])} title="Clear">
<X size={14} />
</button>
</div>
@@ -865,7 +865,7 @@ function FileManager() {
<div className="file-manager-toolbar">
<div className="toolbar-left">
- <button
+ <button type="button"
className="toolbar-icon-btn"
onClick={() => setSidebarVisible(!sidebarVisible)}
title={sidebarVisible ? 'Hide sidebar' : 'Show sidebar'}
@@ -873,16 +873,16 @@ function FileManager() {
{sidebarVisible ? <PanelLeftClose size={14} /> : <PanelLeftOpen size={14} />}
</button>
<div className="nav-buttons">
- <button className="nav-btn" onClick={goBack} disabled={historyIdx === 0} title="Back">
+ <button type="button" className="nav-btn" onClick={goBack} disabled={historyIdx === 0} title="Back">
<ArrowLeft size={14} />
</button>
- <button className="nav-btn" onClick={goForward} disabled={historyIdx >= history.length - 1} title="Forward">
+ <button type="button" className="nav-btn" onClick={goForward} disabled={historyIdx >= history.length - 1} title="Forward">
<ArrowRight size={14} />
</button>
- <button className="nav-btn" onClick={goUp} disabled={!parentPath} title="Up">
+ <button type="button" className="nav-btn" onClick={goUp} disabled={!parentPath} title="Up">
<ArrowUp size={14} />
</button>
- <button className="nav-btn" onClick={() => navigateTo(isS3 ? '/' : '/home')} title="Home">
+ <button type="button" className="nav-btn" onClick={() => navigateTo(isS3 ? '/' : '/home')} title="Home">
<Home size={14} />
</button>
</div>
@@ -890,7 +890,7 @@ function FileManager() {
{breadcrumbs.map((crumb, idx) => (
<span key={crumb.path + idx} className="crumb-segment">
{idx > 0 && <span className="crumb-separator">/</span>}
- <button
+ <button type="button"
className={`crumb ${idx === breadcrumbs.length - 1 ? 'crumb-active' : ''}`}
onClick={() => navigateTo(crumb.path)}
>
@@ -917,7 +917,7 @@ function FileManager() {
onKeyDown={(e) => e.key === 'Enter' && handleSearch()}
/>
{(searchResults || searchQuery) && (
- <button
+ <button type="button"
className="search-field-clear"
onClick={() => { setSearchResults(null); setSearchQuery(''); }}
title="Clear"
@@ -926,19 +926,19 @@ function FileManager() {
</button>
)}
</div>
- <button className="toolbar-chip" onClick={() => fileInputRef.current?.click()} disabled={isRemote}>
+ <button type="button" className="toolbar-chip" onClick={() => fileInputRef.current?.click()} disabled={isRemote}>
<Upload size={14} />
<span>Upload</span>
</button>
<div className="view-toggle">
- <button
+ <button type="button"
className={`view-toggle-btn ${viewMode === 'grid' ? 'active' : ''}`}
onClick={() => setViewMode('grid')}
title="Grid view"
>
<LayoutGrid size={14} />
</button>
- <button
+ <button type="button"
className={`view-toggle-btn ${viewMode === 'list' ? 'active' : ''}`}
onClick={() => setViewMode('list')}
title="List view"
@@ -946,14 +946,14 @@ function FileManager() {
<List size={14} />
</button>
</div>
- <button
+ <button type="button"
className={`toolbar-icon-btn ${showHidden ? 'active' : ''}`}
onClick={() => setShowHidden(!showHidden)}
title="Toggle hidden files"
>
{showHidden ? <Eye size={14} /> : <EyeOff size={14} />}
</button>
- <button
+ <button type="button"
className="toolbar-icon-btn"
onClick={() => loadDirectory(currentPath)}
title="Refresh"
@@ -970,23 +970,23 @@ function FileManager() {
<span>{selectedPaths.size} selected · {formatBytes(stats.selectedBytes)}</span>
</div>
<div className="bulk-bar-actions">
- <button className="bulk-btn" onClick={downloadSelected}>
+ <button type="button" className="bulk-btn" onClick={downloadSelected}>
<Download size={14} /> Download
</button>
{selectedEntries.length === 1 && (
<>
- <button className="bulk-btn" onClick={() => openRenameModal(selectedEntries[0])}>
+ <button type="button" className="bulk-btn" onClick={() => openRenameModal(selectedEntries[0])}>
<Edit3 size={14} /> Rename
</button>
- <button className="bulk-btn" onClick={() => copyPathToClipboard(selectedEntries[0].path)}>
+ <button type="button" className="bulk-btn" onClick={() => copyPathToClipboard(selectedEntries[0].path)}>
<Copy size={14} /> Copy path
</button>
</>
)}
- <button className="bulk-btn danger" onClick={() => handleDelete(selectedEntries)}>
+ <button type="button" className="bulk-btn danger" onClick={() => handleDelete(selectedEntries)}>
<Trash2 size={14} /> Delete
</button>
- <button className="bulk-btn ghost" onClick={clearSelection}>
+ <button type="button" className="bulk-btn ghost" onClick={clearSelection}>
<X size={14} /> Clear
</button>
</div>
@@ -1005,7 +1005,7 @@ function FileManager() {
</div>
<div className="sidebar-section-content quick-access-list">
{QUICK_ACCESS.map(q => (
- <button
+ <button type="button"
key={q.label}
className={`quick-access-item ${currentPath === q.path ? 'active' : ''}`}
onClick={() => navigateTo(q.path)}
@@ -1020,12 +1020,12 @@ function FileManager() {
{/* Folder Tree */}
<div className="sidebar-section">
<div className="sidebar-section-header sidebar-section-header--split">
- <button className="sidebar-section-toggle" onClick={() => setTreeCollapsed(!treeCollapsed)}>
+ <button type="button" className="sidebar-section-toggle" onClick={() => setTreeCollapsed(!treeCollapsed)}>
<FolderTreeIcon size={16} />
<span>Folders</span>
{treeCollapsed ? <ChevronRight size={16} /> : <ChevronDown size={16} />}
</button>
- <button
+ <button type="button"
className="sidebar-action-btn"
onClick={() => setShowNewFolderModal(true)}
disabled={isRemote}
@@ -1061,7 +1061,7 @@ function FileManager() {
{FILTER_OPTIONS.map((opt) => {
const count = filterCounts[opt.id] ?? 0;
return (
- <button
+ <button type="button"
key={opt.id}
className={`type-filter-item ${activeFilter === opt.id ? 'active' : ''}`}
onClick={() => setActiveFilter(opt.id)}
@@ -1091,7 +1091,7 @@ function FileManager() {
{/* Disk Usage */}
<div className="sidebar-section">
- <button className="sidebar-section-header" onClick={() => setDiskCollapsed(!diskCollapsed)}>
+ <button type="button" className="sidebar-section-header" onClick={() => setDiskCollapsed(!diskCollapsed)}>
<HardDrive size={16} />
<span>Disk Usage</span>
{diskCollapsed ? <ChevronRight size={16} /> : <ChevronDown size={16} />}
@@ -1105,7 +1105,7 @@ function FileManager() {
{diskLastUpdated.toLocaleTimeString()}
</span>
)}
- <button className="toolbar-icon-btn small" onClick={loadDiskMounts} disabled={diskLoading} title="Refresh">
+ <button type="button" className="toolbar-icon-btn small" onClick={loadDiskMounts} disabled={diskLoading} title="Refresh">
<RefreshCw size={12} className={diskLoading ? 'spinning' : ''} />
</button>
</div>
@@ -1181,7 +1181,7 @@ function FileManager() {
<div className="file-list">
<div className="file-list-header">
<span className="col-check">
- <button
+ <button type="button"
className="checkbox-btn"
onClick={() => {
if (selectedPaths.size === sortedFiltered.length) clearSelection();
diff --git a/frontend/src/pages/Git.jsx b/frontend/src/pages/Git.jsx
index 00d8ce94..c96475b2 100644
--- a/frontend/src/pages/Git.jsx
+++ b/frontend/src/pages/Git.jsx
@@ -1038,7 +1038,7 @@ function Git({ basePath = '/git' }) {
{pageError && (
<div className="error-banner">
{pageError}
- <button onClick={() => setPageError('')} style={{ float: 'right', background: 'none', border: 'none', cursor: 'pointer' }}>×</button>
+ <button type="button" onClick={() => setPageError('')} style={{ float: 'right', background: 'none', border: 'none', cursor: 'pointer' }}>×</button>
</div>
)}
@@ -1132,9 +1132,9 @@ function Git({ basePath = '/git' }) {
<div className="files-browser">
{currentPath && (
<div className="breadcrumb">
- <button onClick={() => navigateToPath('')}>{selectedRepo.name}</button>
+ <button type="button" onClick={() => navigateToPath('')}>{selectedRepo.name}</button>
{currentPath.split('/').map((part, i, arr) => (
- <span key={i}><span className="separator">/</span><button onClick={() => navigateToPath(arr.slice(0, i + 1).join('/'))}>{part}</button></span>
+ <span key={i}><span className="separator">/</span><button type="button" onClick={() => navigateToPath(arr.slice(0, i + 1).join('/'))}>{part}</button></span>
))}
</div>
)}
diff --git a/frontend/src/pages/Login.jsx b/frontend/src/pages/Login.jsx
index 02733511..4c2cd8f7 100644
--- a/frontend/src/pages/Login.jsx
+++ b/frontend/src/pages/Login.jsx
@@ -258,7 +258,7 @@ const Login = () => {
{ssoProviders && ssoProviders.length > 0 && (
<div className="sso-providers">
{ssoProviders.map(p => (
- <button
+ <button type="button"
key={p.id}
className={`btn-sso btn-sso--${p.id}`}
onClick={() => handleSSOLogin(p.id)}
diff --git a/frontend/src/pages/Monitoring.jsx b/frontend/src/pages/Monitoring.jsx
index c55c0c91..cffd4018 100644
--- a/frontend/src/pages/Monitoring.jsx
+++ b/frontend/src/pages/Monitoring.jsx
@@ -326,7 +326,7 @@ const Monitoring = () => {
{error && (
<div className="alert alert-danger">
{error}
- <button onClick={() => setError(null)} className="alert-close">&times;</button>
+ <button type="button" onClick={() => setError(null)} className="alert-close">&times;</button>
</div>
)}
diff --git a/frontend/src/pages/Servers.jsx b/frontend/src/pages/Servers.jsx
index 0808ec23..a1fdc8d3 100644
--- a/frontend/src/pages/Servers.jsx
+++ b/frontend/src/pages/Servers.jsx
@@ -931,7 +931,7 @@ Install-ServerKitAgent -Server "${window.location.origin}" -Token "${registratio
: 'Connect an existing agent or set up a brand-new machine.'}
</p>
</div>
- <button className="modal-close" onClick={onClose}>&times;</button>
+ <button type="button" className="modal-close" onClick={onClose}>&times;</button>
</div>
{step === 1 && (
@@ -1192,14 +1192,14 @@ const ManageGroupsModal = ({ groups, onClose, onUpdated }) => {
</span>
<span className="group-count">{group.server_count || 0} servers</span>
<div className="group-actions">
- <button
+ <button type="button"
className="btn-icon"
onClick={() => setEditingGroup(group.id)}
title="Edit"
>
<EditIcon />
</button>
- <button
+ <button type="button"
className="btn-icon danger"
onClick={() => handleDeleteGroup(group.id)}
title="Delete"
diff --git a/frontend/src/pages/ServiceDetail.jsx b/frontend/src/pages/ServiceDetail.jsx
index 2308d004..b2685efb 100644
--- a/frontend/src/pages/ServiceDetail.jsx
+++ b/frontend/src/pages/ServiceDetail.jsx
@@ -260,7 +260,7 @@ const ServiceDetail = () => {
</Button>
{showDeployMenu && (
<div className="svc-detail__dropdown-menu">
- <button onClick={() => handleAction('restart')} disabled={actionLoading === 'restart'}>
+ <button type="button" onClick={() => handleAction('restart')} disabled={actionLoading === 'restart'}>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
<polyline points="23 4 23 10 17 10"/>
<path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/>
@@ -268,7 +268,7 @@ const ServiceDetail = () => {
Manual Deploy (Restart)
</button>
{isGitBased && deployConfig && (
- <button onClick={handleDeployLatest} disabled={actionLoading === 'deploy-latest'}>
+ <button type="button" onClick={handleDeployLatest} disabled={actionLoading === 'deploy-latest'}>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
<circle cx="18" cy="18" r="3"/>
<circle cx="6" cy="6" r="3"/>
@@ -319,7 +319,7 @@ const ServiceDetail = () => {
{showMoreMenu && (
<div className="svc-detail__dropdown-menu svc-detail__dropdown-menu--right">
{service.isRunning && (
- <button onClick={() => handleAction('stop')} disabled={actionLoading === 'stop'}>
+ <button type="button" onClick={() => handleAction('stop')} disabled={actionLoading === 'stop'}>
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor">
<rect x="6" y="6" width="12" height="12"/>
</svg>
@@ -342,7 +342,7 @@ const ServiceDetail = () => {
</a>
)}
<div className="svc-detail__dropdown-divider" />
- <button
+ <button type="button"
className="svc-detail__dropdown-danger"
onClick={handleDelete}
disabled={actionLoading === 'delete'}
@@ -440,7 +440,7 @@ const ServiceDetail = () => {
)}
</div>
) : (
- <button className="svc-detail__connect-repo" onClick={() => navigate(`/services/${id}/settings/git`)}>
+ <button type="button" className="svc-detail__connect-repo" onClick={() => navigate(`/services/${id}/settings/git`)}>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
<circle cx="18" cy="18" r="3"/>
<circle cx="6" cy="6" r="3"/>
@@ -502,7 +502,7 @@ const ServiceDetail = () => {
{availableTabs.map(tab => {
const Icon = TAB_ICONS[tab];
return (
- <button
+ <button type="button"
key={tab}
className={`app-detail-tab ${activeTab === tab ? 'active' : ''} ${tab === 'settings' ? 'app-detail-tab--end' : ''}`}
onClick={() => setActiveTab(tab)}
diff --git a/frontend/src/pages/SourceConnectionCallback.jsx b/frontend/src/pages/SourceConnectionCallback.jsx
index e162d9d3..7925c573 100644
--- a/frontend/src/pages/SourceConnectionCallback.jsx
+++ b/frontend/src/pages/SourceConnectionCallback.jsx
@@ -66,7 +66,7 @@ const SourceConnectionCallback = () => {
{error ? (
<>
<p className="auth-error">{error}</p>
- <button className="btn btn-primary" onClick={() => navigate('/settings/connections')}>
+ <button type="button" className="btn btn-primary" onClick={() => navigate('/settings/connections')}>
Back to Connections
</button>
</>
diff --git a/frontend/src/pages/Templates.jsx b/frontend/src/pages/Templates.jsx
index 99a800cb..13262047 100644
--- a/frontend/src/pages/Templates.jsx
+++ b/frontend/src/pages/Templates.jsx
@@ -446,14 +446,14 @@ const Templates = () => {
{sortedTemplates.length} template{sortedTemplates.length !== 1 ? 's' : ''}
</span>
<div className="category-filters" aria-label="Template categories">
- <button
+ <button type="button"
className={`category-btn ${!selectedCategory ? 'active' : ''}`}
onClick={() => setSelectedCategoryFilter(null)}
>
All
</button>
{visibleCategories.map(category => (
- <button
+ <button type="button"
key={category}
className={`category-btn ${selectedCategory === category ? 'active' : ''}`}
onClick={() => setSelectedCategoryFilter(category)}
@@ -462,7 +462,7 @@ const Templates = () => {
</button>
))}
{categories.length > 10 && (
- <button
+ <button type="button"
className="category-btn category-btn--more"
onClick={() => setShowAllCategories(prev => !prev)}
>
@@ -488,7 +488,7 @@ const Templates = () => {
<span className="filter-chip">
<Tag size={14} />
{selectedCategory}
- <button onClick={() => setSelectedCategoryFilter(null)}>
+ <button type="button" onClick={() => setSelectedCategoryFilter(null)}>
<X size={14} />
</button>
</span>
@@ -497,7 +497,7 @@ const Templates = () => {
<span className="filter-chip">
<Search size={14} />
&ldquo;{searchQuery}&rdquo;
- <button onClick={() => setSearchQueryFilter('')}>
+ <button type="button" onClick={() => setSearchQueryFilter('')}>
<X size={14} />
</button>
</span>
@@ -585,7 +585,7 @@ const Templates = () => {
<span className="template-version">Version {selectedTemplate.version}</span>
</div>
</div>
- <button className="modal-close" onClick={() => setSelectedTemplate(null)}>&times;</button>
+ <button type="button" className="modal-close" onClick={() => setSelectedTemplate(null)}>&times;</button>
</div>
<div className="modal-body">
<p className="template-full-description">{selectedTemplate.description}</p>
diff --git a/frontend/src/pages/Terminal.jsx b/frontend/src/pages/Terminal.jsx
index c95631d3..25d2e671 100644
--- a/frontend/src/pages/Terminal.jsx
+++ b/frontend/src/pages/Terminal.jsx
@@ -366,7 +366,7 @@ const LogFilesTab = () => {
<div className="lv-error">
<AlertCircle size={14} />
<span>{error}</span>
- <button onClick={() => setError(null)}>&times;</button>
+ <button type="button" onClick={() => setError(null)}>&times;</button>
</div>
)}
@@ -653,14 +653,14 @@ const JournalTab = () => {
placeholder="Type unit name…"
/>
</div>
- <button className="lv-icon-btn" onClick={applyUnitInput} title="Apply unit filter">
+ <button type="button" className="lv-icon-btn" onClick={applyUnitInput} title="Apply unit filter">
<Search size={13} />
</button>
</div>
<div className="lv-sidebar-body">
<div className="lv-group">
- <button
+ <button type="button"
className={`lv-file lv-file--compact ${!unit ? 'active' : ''}`}
onClick={clearUnit}
>
@@ -677,7 +677,7 @@ const JournalTab = () => {
</div>
<div className="lv-group-files">
{filteredUnits.map(u => (
- <button
+ <button type="button"
key={u.id}
className={`lv-file lv-file--compact ${unit === u.id ? 'active' : ''}}`}
onClick={() => pickUnit(u.id)}
@@ -702,7 +702,7 @@ const JournalTab = () => {
</div>
<div className="lv-group-files">
{PRIORITY_OPTIONS.map(opt => (
- <button
+ <button type="button"
key={opt.value}
className={`lv-file lv-file--compact ${priority === opt.value ? 'active' : ''}`}
onClick={() => { setPriority(opt.value); setTimeout(loadJournalLogs, 0); }}
@@ -954,7 +954,7 @@ const ProcessesTab = () => {
{ id: 'stopped', label: 'Stopped', count: statusCounts.stopped },
{ id: 'zombie', label: 'Zombie', count: statusCounts.zombie },
].map(c => (
- <button
+ <button type="button"
key={c.id}
className={`proc-chip ${statusFilter === c.id ? 'active' : ''}`}
onClick={() => setStatusFilter(c.id)}
@@ -975,7 +975,7 @@ const ProcessesTab = () => {
placeholder="Filter PID, name, command…"
/>
{searchTerm && (
- <button className="lv-search-field-clear" onClick={() => setSearchTerm('')}>
+ <button type="button" className="lv-search-field-clear" onClick={() => setSearchTerm('')}>
<X size={11} />
</button>
)}
@@ -990,7 +990,7 @@ const ProcessesTab = () => {
<option value={100}>Top 100</option>
<option value={250}>Top 250</option>
</select>
- <button
+ <button type="button"
className={`lv-chip ${autoRefresh ? 'active' : ''}`}
onClick={() => setAutoRefresh(!autoRefresh)}
disabled={isRemote}
@@ -1010,7 +1010,7 @@ const ProcessesTab = () => {
<span className="lv-header-label is-indented">Users</span>
</div>
<div className="lv-sidebar-body">
- <button
+ <button type="button"
className={`lv-file ${!userFilter ? 'active' : ''}`}
onClick={() => setUserFilter(null)}
>
@@ -1019,7 +1019,7 @@ const ProcessesTab = () => {
<span className="lv-file-size">{processes.length}</span>
</button>
{userGroups.map(([user, count]) => (
- <button
+ <button type="button"
key={user}
className={`lv-file ${userFilter === user ? 'active' : ''}`}
onClick={() => setUserFilter(user)}
@@ -1105,10 +1105,10 @@ const ProcessesTab = () => {
<Pill kind={processStatusKind(p.status)}>{p.status}</Pill>
</td>
<td className="proc-actions" onClick={(e) => e.stopPropagation()}>
- <button className="lv-icon-btn" onClick={() => handleKillProcess(p.pid)} title="Kill (SIGTERM)">
+ <button type="button" className="lv-icon-btn" onClick={() => handleKillProcess(p.pid)} title="Kill (SIGTERM)">
<X size={13} />
</button>
- <button className="lv-icon-btn danger" onClick={() => handleKillProcess(p.pid, true)} title="Force kill (SIGKILL)">
+ <button type="button" className="lv-icon-btn danger" onClick={() => handleKillProcess(p.pid, true)} title="Force kill (SIGKILL)">
<AlertTriangle size={13} />
</button>
</td>
@@ -1132,7 +1132,7 @@ const ProcessesTab = () => {
<h3>{selectedProcess.name}</h3>
<p className="preview-drawer-path">PID {selectedProcess.pid} · {selectedProcess.user}</p>
</div>
- <button className="preview-drawer-close" onClick={() => setSelectedProcess(null)}>
+ <button type="button" className="preview-drawer-close" onClick={() => setSelectedProcess(null)}>
<X size={18} />
</button>
</header>
@@ -1171,10 +1171,10 @@ const ProcessesTab = () => {
</div>
</div>
<div className="preview-drawer-actions">
- <button className="drawer-action-btn" onClick={() => handleKillProcess(selectedProcess.pid)}>
+ <button type="button" className="drawer-action-btn" onClick={() => handleKillProcess(selectedProcess.pid)}>
<X size={14} /> Kill (SIGTERM)
</button>
- <button className="drawer-action-btn danger" onClick={() => handleKillProcess(selectedProcess.pid, true)}>
+ <button type="button" className="drawer-action-btn danger" onClick={() => handleKillProcess(selectedProcess.pid, true)}>
<AlertTriangle size={14} /> Force kill (SIGKILL)
</button>
</div>
@@ -1364,7 +1364,7 @@ const ServicesTab = () => {
<span className="lv-stat-label">Total</span>
<span className="lv-stat-value">{services.length}</span>
</span>
- <button
+ <button type="button"
className="lv-icon-btn"
onClick={loadServices}
title="Refresh"
@@ -1382,7 +1382,7 @@ const ServicesTab = () => {
{ id: 'failed', label: 'Failed', count: counts.failed },
{ id: 'stopped', label: 'Stopped', count: counts.stopped },
].map(c => (
- <button
+ <button type="button"
key={c.id}
className={`proc-chip ${statusFilter === c.id ? 'active' : ''}`}
onClick={() => setStatusFilter(c.id)}
@@ -1402,7 +1402,7 @@ const ServicesTab = () => {
placeholder="Filter services…"
/>
{searchTerm && (
- <button className="lv-search-field-clear" onClick={() => setSearchTerm('')}>
+ <button type="button" className="lv-search-field-clear" onClick={() => setSearchTerm('')}>
<X size={11} />
</button>
)}
@@ -1452,14 +1452,14 @@ const ServicesTab = () => {
<div className="svc-card-actions" onClick={(e) => e.stopPropagation()}>
{isRunning ? (
<>
- <button
+ <button type="button"
className="svc-action-btn"
onClick={() => handleAction(service.name, 'restart')}
disabled={actionLoading === `${service.name}-restart`}
>
<RotateCw size={12} /> Restart
</button>
- <button
+ <button type="button"
className="svc-action-btn"
onClick={() => handleAction(service.name, 'stop')}
disabled={actionLoading === `${service.name}-stop`}
@@ -1468,7 +1468,7 @@ const ServicesTab = () => {
</button>
</>
) : (
- <button
+ <button type="button"
className={`svc-action-btn primary ${isFailed ? 'danger' : ''}`}
onClick={() => handleAction(service.name, 'start')}
disabled={actionLoading === `${service.name}-start`}
@@ -1476,7 +1476,7 @@ const ServicesTab = () => {
<Play size={12} /> Start
</button>
)}
- <button
+ <button type="button"
className="svc-action-btn ghost"
onClick={() => openServiceDrawer(service)}
>
@@ -1501,7 +1501,7 @@ const ServicesTab = () => {
{selectedService.description || `journalctl -u ${selectedService.name}`}
</p>
</div>
- <button className="preview-drawer-close" onClick={closeServiceDrawer}>
+ <button type="button" className="preview-drawer-close" onClick={closeServiceDrawer}>
<X size={18} />
</button>
</header>
@@ -1528,14 +1528,14 @@ const ServicesTab = () => {
<div className="preview-drawer-actions">
{statusKind(selectedService.status) === 'running' ? (
<>
- <button
+ <button type="button"
className="drawer-action-btn"
onClick={() => handleAction(selectedService.name, 'restart')}
disabled={actionLoading === `${selectedService.name}-restart`}
>
<RotateCw size={14} /> Restart
</button>
- <button
+ <button type="button"
className="drawer-action-btn"
onClick={() => handleAction(selectedService.name, 'stop')}
disabled={actionLoading === `${selectedService.name}-stop`}
@@ -1544,7 +1544,7 @@ const ServicesTab = () => {
</button>
</>
) : (
- <button
+ <button type="button"
className="drawer-action-btn"
onClick={() => handleAction(selectedService.name, 'start')}
disabled={actionLoading === `${selectedService.name}-start`}
diff --git a/frontend/src/pages/WordPress.jsx b/frontend/src/pages/WordPress.jsx
index 73858989..99826c45 100644
--- a/frontend/src/pages/WordPress.jsx
+++ b/frontend/src/pages/WordPress.jsx
@@ -323,14 +323,14 @@ function WordPress() {
searchPlaceholder="Search sites…"
toolbarExtra={allTags.length > 0 && (
<div className="wp-tag-filter">
- <button
+ <button type="button"
className={`wp-tag-chip wp-tag-chip--filter ${activeTag === null ? 'is-active' : ''}`}
onClick={() => setActiveTag(null)}
>
All tags
</button>
{allTags.map(tag => (
- <button
+ <button type="button"
key={tag}
className={`wp-tag-chip wp-tag-chip--filter ${activeTag === tag ? 'is-active' : ''}`}
onClick={() => setActiveTag(tag)}
diff --git a/frontend/src/pages/WordPressDetail.jsx b/frontend/src/pages/WordPressDetail.jsx
index 857a54a0..06c86fe8 100644
--- a/frontend/src/pages/WordPressDetail.jsx
+++ b/frontend/src/pages/WordPressDetail.jsx
@@ -316,7 +316,7 @@ const WordPressDetail = () => {
)}
</div>
) : (
- <button
+ <button type="button"
className="wp-detail__connect-repo"
onClick={() => navigate(`/wordpress/${id}/settings/git`)}
>
diff --git a/frontend/src/plugins/serverkit-gui/components/ServerGui.jsx b/frontend/src/plugins/serverkit-gui/components/ServerGui.jsx
index 21ff35c4..2153c9ec 100644
--- a/frontend/src/plugins/serverkit-gui/components/ServerGui.jsx
+++ b/frontend/src/plugins/serverkit-gui/components/ServerGui.jsx
@@ -251,7 +251,7 @@ function ScreenshotView({ baseUrl, fetchJson, intervalMs, scale, quality }) {
return (
<div className="sk-gui__viewport">
- <button
+ <button type="button"
className="sk-gui__viewport-btn"
onClick={() => setPaused(p => !p)}
>
diff --git a/frontend/src/plugins/serverkit-gui/components/ServerGuiLauncher.jsx b/frontend/src/plugins/serverkit-gui/components/ServerGuiLauncher.jsx
index 3565695b..97650d76 100644
--- a/frontend/src/plugins/serverkit-gui/components/ServerGuiLauncher.jsx
+++ b/frontend/src/plugins/serverkit-gui/components/ServerGuiLauncher.jsx
@@ -27,7 +27,7 @@ export default function ServerGuiLauncher({ api }) {
return (
<>
- <button
+ <button type="button"
className="sk-gui-launcher"
onClick={() => setOpen(true)}
title="Open desktop view"
@@ -41,7 +41,7 @@ export default function ServerGuiLauncher({ api }) {
<div className="sk-gui-modal__inner" onClick={e => e.stopPropagation()}>
<header className="sk-gui-modal__header">
<h3>Desktop view</h3>
- <button
+ <button type="button"
className="sk-gui-modal__close"
onClick={() => setOpen(false)}
aria-label="Close"