feat(frontend): mobile-friendly config editor with find bar and unsaved-changes guard (#326)

* feat(frontend): mobile-friendly config editor with find bar and unsaved-changes guard

* refactor: remove retry-clone flow and share destructive-confirm dialog

Backend drops POST /:id/retry-clone and the supporting retryCloneRepo service
and claimRepoForRetry query; failed clones now delete the repo row rather than
lingering in error state. Frontend extracts ConfirmDestructiveDialog shared by
Delete/Discard/UnsavedChanges dialogs, memoizes CodeEditor rows, fixes scroll
jump while typing away from the active match, and aligns the responsive
breakpoint to 768px.
This commit is contained in:
Chris Scott authored and GitHub committed 2026-07-27 16:46:12 -04:00
1 parent f8e361c0b8
commit a73ac19bbc
29 files changed
+2032 -356

No files matched your search

@@ -154,15 +154,15 @@ export function OpenCodeConfigManager({ hideHealthStatus = false }: OpenCodeConf
return getApiErrorMessage(error, 'Failed to import existing OpenCode host data')
}
const fetchConfigs = async () => {
const fetchConfigs = async (silent = false) => {
try {
setIsLoading(true)
if (!silent) setIsLoading(true)
const data = await settingsApi.getOpenCodeConfigs()
setConfigs(data.configs)
} catch (error) {
console.error('Failed to fetch configs:', error)
} finally {
setIsLoading(false)
if (!silent) setIsLoading(false)
}
}
@@ -677,7 +677,7 @@ export function OpenCodeConfigManager({ hideHealthStatus = false }: OpenCodeConf
showToast.loading('Saving configuration...', { id: 'edit-config' })
try {
const result = await settingsApi.updateOpenCodeConfig(editingConfig.name, { content: rawContent })
await fetchConfigs()
await fetchConfigs(true)
const successMsg = result.restartRequired
? 'Configuration saved. Restart the server to apply changes.'
: 'Configuration saved'
@@ -688,13 +688,12 @@ export function OpenCodeConfigManager({ hideHealthStatus = false }: OpenCodeConf
throw error
}
}}
isUpdating={isUpdating}
/>
{/* Global AGENTS.md Section */}
<div className="mt-8 space-y-6">
<div className="border-t border-border pt-6">
<div className="bg-card border border-border rounded-lg overflow-hidden min-w-0 mb-6">
<div className="bg-card border border-border rounded-lg overflow-clip min-w-0 mb-6">
<button
ref={agentsMdRef}
className={cn("w-full px-4 py-3 flex items-center justify-between transition-colors min-w-0", expandedSections.agentsMd ? "bg-muted/40 hover:bg-muted/50" : "hover:bg-muted/50")}