Frontend audit: refinements (#2083)

* (fix:attachements) sep id for redux ops

* (fix:ui) popups, toast, share modal

* (feat:agentsPreview) stable preview, ui fixes

* (fix:ui) light theme icon, sleek scroll

---------

Co-authored-by: GH Action - Upstream Sync <action@github.com>
This commit is contained in:
Manish Madan
2025-10-22 14:42:05 +05:30
committed by GitHub
parent 5aa4ec1b9f
commit c4e8daf50e
21 changed files with 121 additions and 86 deletions

View File

@@ -2,11 +2,11 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { RootState } from '../store';
export interface Attachment {
id: string; // Unique identifier for the attachment (required for state management)
fileName: string;
progress: number;
status: 'uploading' | 'processing' | 'completed' | 'failed';
taskId: string;
id?: string;
taskId: string; // Server-assigned task ID (used for API calls)
token_count?: number;
}
@@ -47,12 +47,12 @@ export const uploadSlice = createSlice({
updateAttachment: (
state,
action: PayloadAction<{
taskId: string;
id: string;
updates: Partial<Attachment>;
}>,
) => {
const index = state.attachments.findIndex(
(att) => att.taskId === action.payload.taskId,
(att) => att.id === action.payload.id,
);
if (index !== -1) {
state.attachments[index] = {
@@ -63,7 +63,7 @@ export const uploadSlice = createSlice({
},
removeAttachment: (state, action: PayloadAction<string>) => {
state.attachments = state.attachments.filter(
(att) => att.taskId !== action.payload && att.id !== action.payload,
(att) => att.id !== action.payload,
);
},
clearAttachments: (state) => {