Skip to content

Commit f8efcf4

Browse files
refactor: default accordion values in ChatsList component
- Introduced a new function `getDefaultAccordionValues` to dynamically calculate which accordions should be open by default. - The function checks for the existence of system conversations and starred chats, adding them to the default values if they exist. - Expanded the default values to include all time frame sections, ensuring all are displayed expanded by default. - Updated the Accordion component to use the new function for setting default values, improving readability and maintainability.
1 parent f20aa7e commit f8efcf4

File tree

3 files changed

+6312
-6618
lines changed

3 files changed

+6312
-6618
lines changed

frontend/package.json

Lines changed: 88 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"@heroui/checkbox": "2.3.15",
3434
"@heroui/chip": "2.2.12",
3535
"@heroui/code": "2.2.12",
36-
"@heroui/date-picker": "^2.3.22",
36+
"@heroui/date-picker": "^2.3.25",
37+
"@heroui/divider": "^2.2.17",
3738
"@heroui/dropdown": "2.3.16",
3839
"@heroui/input": "2.4.16",
3940
"@heroui/kbd": "2.2.12",
@@ -42,89 +43,88 @@
4243
"@heroui/modal": "2.2.13",
4344
"@heroui/navbar": "2.2.14",
4445
"@heroui/pagination": "2.2.14",
46+
"@heroui/progress": "^2.2.20",
4547
"@heroui/radio": "2.3.15",
4648
"@heroui/react": "2.8.0-beta.1",
47-
"@heroui/scroll-shadow": "^2.3.13",
49+
"@heroui/scroll-shadow": "^2.3.16",
4850
"@heroui/select": "2.4.16",
4951
"@heroui/skeleton": "2.2.10",
5052
"@heroui/slider": "2.4.13",
5153
"@heroui/snippet": "2.2.17",
5254
"@heroui/spinner": "2.2.13",
5355
"@heroui/switch": "2.2.14",
5456
"@heroui/system": "2.4.12",
55-
"@heroui/table": "^2.2.18",
57+
"@heroui/table": "^2.2.24",
5658
"@heroui/tabs": "2.2.13",
5759
"@heroui/theme": "2.4.14-beta.1",
5860
"@heroui/tooltip": "2.2.13",
5961
"@heroui/user": "2.2.12",
60-
"@hookform/resolvers": "^5.0.1",
62+
"@hookform/resolvers": "^5.2.1",
6163
"@iconify/react": "^6.0.0",
62-
"@internationalized/date": "^3.8.1",
64+
"@internationalized/date": "^3.8.2",
6365
"@mdx-js/loader": "^3.1.0",
6466
"@mdx-js/react": "^3.1.0",
6567
"@microsoft/fetch-event-source": "^2.0.1",
66-
"@next/bundle-analyzer": "^15.3.1",
67-
"@next/eslint-plugin-next": "^15.3.4",
68-
"@next/mdx": "^15.3.3",
69-
"@next/third-parties": "^15.4.4",
70-
"@radix-ui/react-accordion": "^1.2.8",
71-
"@radix-ui/react-alert-dialog": "^1.1.11",
72-
"@radix-ui/react-aspect-ratio": "^1.1.4",
73-
"@radix-ui/react-avatar": "^1.1.7",
74-
"@radix-ui/react-checkbox": "^1.2.3",
75-
"@radix-ui/react-collapsible": "^1.1.8",
76-
"@radix-ui/react-context-menu": "^2.2.12",
77-
"@radix-ui/react-dialog": "^1.1.11",
78-
"@radix-ui/react-dropdown-menu": "^2.1.12",
79-
"@radix-ui/react-hover-card": "^1.1.11",
68+
"@next/bundle-analyzer": "^15.5.0",
69+
"@next/eslint-plugin-next": "^15.5.0",
70+
"@next/mdx": "^15.5.0",
71+
"@next/third-parties": "^15.5.0",
72+
"@radix-ui/react-accordion": "^1.2.12",
73+
"@radix-ui/react-alert-dialog": "^1.1.15",
74+
"@radix-ui/react-aspect-ratio": "^1.1.7",
75+
"@radix-ui/react-avatar": "^1.1.10",
76+
"@radix-ui/react-checkbox": "^1.3.3",
77+
"@radix-ui/react-collapsible": "^1.1.12",
78+
"@radix-ui/react-context-menu": "^2.2.16",
79+
"@radix-ui/react-dialog": "^1.1.15",
80+
"@radix-ui/react-dropdown-menu": "^2.1.16",
81+
"@radix-ui/react-hover-card": "^1.1.15",
8082
"@radix-ui/react-icons": "^1.3.2",
81-
"@radix-ui/react-label": "^2.1.4",
82-
"@radix-ui/react-menubar": "^1.1.12",
83-
"@radix-ui/react-navigation-menu": "^1.2.10",
84-
"@radix-ui/react-popover": "^1.1.11",
85-
"@radix-ui/react-progress": "^1.1.4",
86-
"@radix-ui/react-radio-group": "^1.3.4",
87-
"@radix-ui/react-scroll-area": "^1.2.6",
88-
"@radix-ui/react-select": "^2.2.2",
89-
"@radix-ui/react-separator": "^1.1.4",
90-
"@radix-ui/react-slider": "^1.3.2",
91-
"@radix-ui/react-slot": "^1.2.0",
92-
"@radix-ui/react-switch": "^1.2.2",
93-
"@radix-ui/react-tabs": "^1.1.9",
94-
"@radix-ui/react-toggle": "^1.1.6",
95-
"@radix-ui/react-toggle-group": "^1.1.7",
96-
"@radix-ui/react-tooltip": "^1.2.4",
97-
"@radix-ui/react-visually-hidden": "^1.2.0",
98-
"@react-types/shared": "^3.29.0",
99-
"@reduxjs/toolkit": "^2.7.0",
100-
"@sentry/nextjs": "^10.3.0",
101-
"@tailwindcss/postcss": "^4.1.5",
83+
"@radix-ui/react-label": "^2.1.7",
84+
"@radix-ui/react-menubar": "^1.1.16",
85+
"@radix-ui/react-navigation-menu": "^1.2.14",
86+
"@radix-ui/react-popover": "^1.1.15",
87+
"@radix-ui/react-progress": "^1.1.7",
88+
"@radix-ui/react-radio-group": "^1.3.8",
89+
"@radix-ui/react-scroll-area": "^1.2.10",
90+
"@radix-ui/react-select": "^2.2.6",
91+
"@radix-ui/react-separator": "^1.1.7",
92+
"@radix-ui/react-slider": "^1.3.6",
93+
"@radix-ui/react-slot": "^1.2.3",
94+
"@radix-ui/react-switch": "^1.2.6",
95+
"@radix-ui/react-tabs": "^1.1.13",
96+
"@radix-ui/react-toggle": "^1.1.10",
97+
"@radix-ui/react-toggle-group": "^1.1.11",
98+
"@radix-ui/react-tooltip": "^1.2.8",
99+
"@radix-ui/react-visually-hidden": "^1.2.3",
100+
"@react-types/shared": "^3.31.0",
101+
"@reduxjs/toolkit": "^2.8.2",
102+
"@sentry/nextjs": "^10.5.0",
103+
"@tailwindcss/postcss": "^4.1.12",
102104
"@tailwindcss/typography": "^0.5.16",
103-
"@tanstack/react-query": "^5.74.11",
104-
"@tanstack/react-query-persist-client": "^5.81.5",
105-
"@tiptap/extension-character-count": "^2.11.9",
106-
"@tiptap/extension-highlight": "^2.11.9",
107-
"@tiptap/extension-link": "^2.11.9",
108-
"@tiptap/extension-placeholder": "^2.11.9",
109-
"@tiptap/extension-typography": "^2.11.9",
110-
"@tiptap/extension-underline": "^2.11.9",
111-
"@tiptap/pm": "^2.11.9",
112-
"@tiptap/react": "^2.11.9",
113-
"@tiptap/starter-kit": "^2.11.9",
105+
"@tanstack/react-query": "^5.85.5",
106+
"@tanstack/react-query-persist-client": "^5.85.5",
107+
"@tiptap/extension-character-count": "^2.26.1",
108+
"@tiptap/extension-highlight": "^2.26.1",
109+
"@tiptap/extension-link": "^2.26.1",
110+
"@tiptap/extension-placeholder": "^2.26.1",
111+
"@tiptap/extension-typography": "^2.26.1",
112+
"@tiptap/extension-underline": "^2.26.1",
113+
"@tiptap/pm": "^2.26.1",
114+
"@tiptap/react": "^2.26.1",
115+
"@tiptap/starter-kit": "^2.26.1",
114116
"@types/canvas-confetti": "^1.9.0",
115117
"@types/d3": "^7.4.3",
116118
"@types/he": "^1.2.3",
117-
"@types/html-to-text": "^9.0.4",
118119
"@types/mdx": "^2.0.13",
119120
"@types/react-syntax-highlighter": "^15.5.13",
120121
"@types/react-twemoji": "^0.4.3",
121122
"@types/react-window": "^1.8.8",
122123
"@types/react-window-infinite-loader": "^1.0.9",
123124
"@types/tinycolor2": "^1.4.6",
124125
"@use-gesture/react": "^10.3.1",
125-
"@xyflow/react": "^12.6.0",
126-
"axios": "^1.9.0",
127-
"axios-cache-interceptor": "^1.8.0",
126+
"@xyflow/react": "^12.8.4",
127+
"axios": "^1.11.0",
128128
"bson-objectid": "^2.0.4",
129129
"canvas-confetti": "^1.9.3",
130130
"class-variance-authority": "^0.7.1",
@@ -134,82 +134,73 @@
134134
"dagre": "^0.8.5",
135135
"date-fns": "^4.1.0",
136136
"date-fns-tz": "^3.2.0",
137-
"dodopayments": "^1.44.0",
138-
"dompurify": "^3.2.5",
137+
"dompurify": "^3.2.6",
139138
"embla-carousel-react": "^8.6.0",
140139
"emblor": "^1.4.8",
141-
"eslint-config-next": "^15.3.1",
142-
"framer-motion": "^12.9.2",
143-
"google": "link:@next/third-parties/google",
140+
"eslint-config-next": "^15.5.0",
141+
"framer-motion": "^12.23.12",
144142
"gsap": "^3.13.0",
145143
"he": "^1.2.0",
146-
"html-react-parser": "^5.2.6",
147-
"html-to-text": "^9.0.5",
148144
"idb-keyval": "^6.2.2",
149145
"import-in-the-middle": "^1.14.2",
150146
"input-otp": "^1.4.2",
151-
"lenis": "^1.3.4",
147+
"lenis": "^1.3.9",
152148
"lucide-react": "^0.483.0",
153-
"marked": "^15.0.11",
154-
"mermaid": "^11.6.0",
149+
"marked": "^15.0.12",
150+
"mdx": "^0.3.1",
151+
"mermaid": "^11.10.1",
155152
"moment-timezone": "^0.6.0",
156-
"motion": "^12.9.2",
153+
"motion": "^12.23.12",
157154
"next": "15.3.3",
158155
"next-themes": "^0.4.6",
159-
"npm": "^11.3.0",
160-
"postcss": "^8.5.3",
161-
"posthog-js": "^1.259.0",
162-
"posthog-node": "^5.6.0",
163-
"prettier-plugin-tailwindcss": "^0.6.11",
164-
"react": "^19.1.0",
156+
"npm": "^11.5.2",
157+
"postcss": "^8.5.6",
158+
"posthog-js": "^1.260.2",
159+
"prettier-plugin-tailwindcss": "^0.6.14",
160+
"react": "^19.1.1",
165161
"react-day-picker": "8.10.1",
166-
"react-dom": "^19.1.0",
167-
"react-dropzone": "^14.3.8",
168-
"react-hook-form": "^7.56.1",
162+
"react-dom": "^19.1.1",
163+
"react-hook-form": "^7.62.0",
169164
"react-intersection-observer": "^9.16.0",
170165
"react-markdown": "^10.1.0",
171166
"react-pdf": "^9.2.1",
172167
"react-redux": "^9.2.0",
173168
"react-resizable-panels": "^2.1.9",
174169
"react-swipeable-list": "^1.10.0",
175-
"react-syntax-highlighter": "^15.6.1",
170+
"react-syntax-highlighter": "^15.6.3",
176171
"react-twemoji": "^0.6.0",
177172
"react-window": "^1.8.11",
178173
"react-window-infinite-loader": "^1.0.10",
179174
"reactflow": "^11.11.4",
180-
"recharts": "^2.15.3",
175+
"recharts": "^2.15.4",
181176
"redux": "^5.0.1",
182177
"rehype-highlight": "^7.0.2",
183178
"remark-gfm": "^4.0.1",
184179
"require-in-the-middle": "^7.5.2",
185180
"sharp": "^0.33.5",
186-
"sonner": "^2.0.3",
187-
"source-map-js": "^1.2.1",
188-
"tailwind-merge": "^3.2.0",
189-
"tailwindcss": "^4.1.5",
181+
"sonner": "^2.0.7",
182+
"tailwind-merge": "^3.3.1",
183+
"tailwindcss": "^4.1.12",
190184
"tailwindcss-animate": "^1.0.7",
191185
"tinycolor2": "^1.6.0",
192-
"uuid": "^11.1.0",
193186
"vaul": "^1.1.2",
194-
"zod": "^3.24.3"
187+
"zod": "^3.25.76"
195188
},
196189
"devDependencies": {
197190
"@eslint/eslintrc": "^3.3.1",
198-
"@types/dagre": "^0.7.52",
199-
"@types/moment-timezone": "^0.5.30",
200-
"@types/node": "22.15.21",
201-
"@types/react": "^19.1.2",
202-
"@types/react-dom": "^19.1.3",
203-
"@typescript-eslint/eslint-plugin": "^8.31.1",
204-
"@typescript-eslint/parser": "^8.31.1",
191+
"@types/dagre": "^0.7.53",
192+
"@types/react": "^19.1.11",
193+
"@types/react-dom": "^19.1.7",
194+
"@typescript-eslint/eslint-plugin": "^8.40.0",
195+
"@typescript-eslint/parser": "^8.40.0",
205196
"barrelsby": "^2.8.1",
206197
"depcheck": "^1.4.7",
207-
"eslint": "^9.25.1",
198+
"eslint": "^9.34.0",
208199
"eslint-plugin-simple-import-sort": "^12.1.1",
209-
"eslint-plugin-unused-imports": "^4.1.4",
200+
"eslint-plugin-unused-imports": "^4.2.0",
210201
"husky": "^9.1.7",
211-
"prettier": "^3.5.3",
212-
"typescript": "^5.8.3"
202+
"prettier": "^3.6.2",
203+
"typescript": "^5.9.2"
213204
},
214205
"pnpm": {
215206
"ignoredBuiltDependencies": [
@@ -218,12 +209,14 @@
218209
"onlyBuiltDependencies": [
219210
"@heroui/shared-utils",
220211
"@parcel/watcher",
212+
"@sentry/cli",
213+
"@tailwindcss/oxide",
221214
"canvas",
222215
"core-js",
223216
"heapdump",
224217
"sharp",
225218
"unrs-resolver"
226219
]
227220
},
228-
"packageManager": "pnpm@10.14.0"
221+
"packageManager": "pnpm@10.15.0"
229222
}

0 commit comments

Comments
 (0)