SurfSense/surfsense_web/components
Matt Van Horn 8cf957b301
fix(theme-toggle): use functional setIsDark in toggleTheme (#1247)
Closes #1247.

toggleTheme's previous implementation read isDark from the closure via
setIsDark(!isDark), which forced isDark into the useCallback dependency
array. As a result toggleTheme's reference changed on every click,
invalidating any downstream memoization.

Switched to the functional updater setIsDark((prev) => !prev) and
dropped isDark from the dependency list. The sibling setCrazyLightTheme
and setCrazyDarkTheme callbacks already use this pattern (they pass
concrete values to setIsDark without listing isDark in deps), so this
keeps the three theme callbacks consistent.

No observable behavior change — clicking the theme toggle still flips
isDark. The callback reference is now stable between clicks, which is
also safer under concurrent updates per React's standard guidance.
2026-04-20 01:58:20 -07:00
..
announcements feat: no login experience and prem tokens 2026-04-15 17:02:00 -07:00
assistant-ui Merge pull request #1240 from AnishSarkar22/feat/resume-builder 2026-04-17 13:41:32 -07:00
auth chore: linting 2026-03-27 03:17:05 -07:00
chat-comments feat: add processing mode support for document uploads and ETL pipeline, improded error handling ux 2026-04-14 21:26:00 -07:00
connectors feat: enhance OneDrive folder management by adding mimeType handling and integrating DriveFolderTree component for improved UI 2026-03-29 03:29:31 +05:30
contact feat: add processing mode support for document uploads and ETL pipeline, improded error handling ux 2026-04-14 21:26:00 -07:00
desktop Formatting 2026-04-07 20:28:07 +02:00
documents feat: no login experience and prem tokens 2026-04-15 17:02:00 -07:00
editor feat: add processing mode support for document uploads and ETL pipeline, improded error handling ux 2026-04-14 21:26:00 -07:00
editor-panel Merge remote-tracking branch 'upstream/dev' into feat/unified-etl-pipeline 2026-04-06 22:04:51 +05:30
free-chat cloud: added openrouter integration with global configs 2026-04-15 23:46:29 -07:00
hitl-edit-panel chore: linting 2026-03-31 14:45:46 -07:00
homepage try: ip fix for cludflare 2026-04-16 02:13:52 -07:00
icons/providers feat: enhance model selector UI abd added github models icon 2026-04-14 20:35:16 +05:30
layout feat: no login experience and prem tokens 2026-04-15 17:02:00 -07:00
new-chat fix(new-chat): remove unused _hasScrolledToCited state in source-detail-panel 2026-04-17 02:00:29 -04:00
pricing cloud: added openrouter integration with global configs 2026-04-15 23:46:29 -07:00
prompt-kit refactor: improve write_todos tool and UI components 2025-12-26 17:49:56 +05:30
providers feat: no login experience and prem tokens 2026-04-15 17:02:00 -07:00
public-chat refactor: update UI components for improved layout in assistant message, public chat footer, and report panel 2026-04-17 09:03:34 +05:30
public-chat-snapshots feat: add processing mode support for document uploads and ETL pipeline, improded error handling ux 2026-04-14 21:26:00 -07:00
report-panel chore: ran linting 2026-04-17 16:45:14 +05:30
seo feat: add processing mode support for document uploads and ETL pipeline, improded error handling ux 2026-04-14 21:26:00 -07:00
settings feat: add maxLength constraints to auth and settings form inputs 2026-04-16 22:33:01 +08:00
shared feat: implement PDF viewer for resume previews and integrate with report panel 2026-04-15 21:42:50 +05:30
sources refactor: improve content extraction and encoding handling 2026-04-16 00:25:46 -07:00
theme fix(theme-toggle): use functional setIsDark in toggleTheme (#1247) 2026-04-20 01:58:20 -07:00
tool-ui Merge pull request #1240 from AnishSarkar22/feat/resume-builder 2026-04-17 13:41:32 -07:00
ui refactor: simplify alert descriptions, improved icons, improved UI in LLM settings 2026-04-10 19:07:35 +05:30
container.tsx feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
document-viewer.tsx Biome: fixes for compontents directory 2025-07-27 10:41:15 -07:00
inference-params-editor.tsx feat: integrate document upload dialog in ComposerAction and update sidebar components for improved user interaction and styling consistency 2026-03-07 03:29:46 +05:30
json-metadata-viewer.tsx chore: linting 2026-02-09 16:49:11 -08:00
LanguageSwitcher.tsx feat: add support for additional languages in LanguageSwitcher and SidebarUserProfile components 2026-02-11 00:39:01 -08:00
Logo.tsx feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
markdown-viewer.tsx refactor: remove unused drizzle-orm import from markdown-viewer 2026-04-08 06:36:50 +05:30
onboarding-tour.tsx perf: add passive option to scroll and touch event listeners 2026-04-04 22:03:06 -07:00
platform-gate.tsx feat: enhance keyboard shortcut management and improve app responsiveness 2026-04-07 00:43:40 -07:00
pricing.tsx feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
search-space-form.tsx ui: adjust dashboard search spaces heading text and padding responsiveness 2026-01-03 01:09:33 +07:00
TokenHandler.tsx Formatting 2026-04-07 20:28:07 +02:00
UserDropdown.tsx fix: replace window.location with router.push for client-side navigation 2026-04-08 00:01:30 -07:00