Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/internal/db/applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (a *ApplicationDB) GetApplication(ctx context.Context, appID string) (*mode
COALESCE(ct.name, '') as template_name, COALESCE(ct.display_name, ia.display_name) as template_display_name,
COALESCE(ct.description, '') as description, COALESCE(ct.category, '') as category,
COALESCE(ct.app_type, '') as app_type, COALESCE(ct.icon_url, '') as icon_url,
COALESCE(ct.manifest, '') as manifest,
COALESCE(ct.manifest::text, '{}') as manifest,
COALESCE(ia.install_status, '') as install_status,
COALESCE(ia.install_message, '') as install_message
FROM installed_applications ia
Expand Down
2 changes: 1 addition & 1 deletion ui/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ class APIClient {
// ============================================================================

async listApplications(enabledOnly?: boolean): Promise<{ applications: InstalledApplication[]; total: number }> {
const params: Record<string, string> = {};
const params: Record<string, string> = { _t: Date.now().toString() }; // Cache bust
if (enabledOnly) params.enabled = 'true';
const response = await this.client.get<{ applications: InstalledApplication[]; total: number }>('/applications', { params });
return response.data;
Expand Down
3 changes: 3 additions & 0 deletions ui/src/pages/Applications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,16 @@ function ApplicationsContent() {

try {
await api.deleteApplication(selectedApp.id);
// Optimistically remove from state immediately for instant UI feedback
setApplications(prev => prev.filter(app => app.id !== selectedApp.id));
addNotification({
message: 'Application deleted successfully',
severity: 'success',
priority: 'medium',
});
setDeleteDialogOpen(false);
setSelectedApp(null);
// Still refresh to ensure consistency with server
await loadApplications();
} catch (error) {
console.error('Failed to delete application:', error);
Expand Down
Loading