dify/web/app/components/base
-LAN- 1a65600b54
fix: conversation opener feature state persistence and display
This commit fixes issue #26500 where the conversation opener feature
doesn't preserve its enabled state and doesn't work correctly.

Changes:
1. Updated feature initialization logic to check for both opening_statement
   and suggested_questions when determining if the feature is enabled
2. Simplified save logic to always send the actual content instead of
   clearing it when disabled
3. Added automatic modal opening when user toggles feature on without content
4. Added logic to automatically set enabled state based on content presence
5. Added logic to disable feature if user cancels modal without adding content

This ensures that:
- The feature's enabled state is correctly determined from saved content
- Users must add content (opening statement or suggested questions) to enable the feature
- The enabled state is automatically managed based on content presence
- The feature state persists correctly across page refreshes
2025-09-30 18:18:01 +08:00
..
action-button feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
agent-log-modal Fix log time display bug (#25475) 2025-09-12 02:46:04 +09:00
answer-icon Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
app-icon feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
app-icon-picker [Chore/Refactor] Add missing 'type' attribute on 'button' components (#26249) 2025-09-28 13:43:43 +08:00
audio-btn [Chore/Refactor] Add missing 'type' attribute on 'button' components (#26249) 2025-09-28 13:43:43 +08:00
audio-gallery [Chore/Refactor] Add missing 'type' attribute on 'button' components (#26249) 2025-09-28 13:43:43 +08:00
auto-height-textarea remove overrides (#22575) 2025-07-17 21:47:48 +08:00
avatar fix: avatar is not updated after setted (#25414) 2025-09-09 16:00:50 +08:00
badge Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
block-input fix: XSS vulnerability in block-input and support-var-input components (#24835) 2025-08-31 17:01:10 +08:00
button feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
chat fix: debounce ref (#26433) 2025-09-29 16:13:38 +08:00
checkbox feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
chip Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
confirm Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
content-dialog feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
copy-btn Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
copy-feedback Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
copy-icon chore: refactor component exports for consistency (#26033) 2025-09-23 17:04:56 +08:00
corner-label feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
custom-icon Initial commit 2023-05-15 08:51:32 +08:00
date-and-time-picker [Chore/Refactor] Implement lazy initialization for useState calls to prevent re-computation (#26252) 2025-09-29 20:35:55 +09:00
dialog lint: fix tailwind lint issues (#23367) 2025-08-08 09:25:41 +08:00
divider chore: add unit test to high frequency component (#17423) 2025-04-03 18:19:11 +08:00
drawer fix: fix workflow as a tool confirm dialog layout issue (#18494) 2025-04-22 09:59:14 +08:00
drawer-plus fix: fix workflow as a tool confirm dialog layout issue (#18494) 2025-04-22 09:59:14 +08:00
dropdown feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
effect feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
emoji-picker chore: Optimize dark mode styles (#23222) (#23231) 2025-07-31 17:43:08 +08:00
features fix: conversation opener feature state persistence and display 2025-09-30 18:18:01 +08:00
file-icon fix: support mdx files close #11557 (#11565) 2024-12-12 13:37:56 +08:00
file-uploader fix: sync FileUploader context with props to fix inconsistent file parameter state in “View cached variables”. (#26199) 2025-09-25 22:43:26 +08:00
float-popover-container feat: fe mobile responsive next (#1609) 2023-11-27 11:47:48 +08:00
float-right-container feat: fe mobile responsive next (#1609) 2023-11-27 11:47:48 +08:00
form feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
fullscreen-modal lint: fix tailwind lint issues (#23367) 2025-08-08 09:25:41 +08:00
ga chore: support Zendesk widget (#25517) 2025-09-11 13:17:50 +08:00
grid-mask lint: fix tailwind lint issues (#23367) 2025-08-08 09:25:41 +08:00
icons fix: rollback aliyun_trace icon (#25921) 2025-09-18 18:01:08 +08:00
image-gallery Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
image-uploader style: replace `h-[1px]` with `h-px` to unify the writing format of Tailwind CSS (#24146) 2025-08-21 21:38:40 +08:00
input feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
input-number feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
install-button Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
linked-apps-panel feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
list-empty Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
loading chore: add unit test to high frequency component (#17423) 2025-04-03 18:19:11 +08:00
logo lint: fix tailwind lint issues (#23367) 2025-08-08 09:25:41 +08:00
markdown feat: custom components in markdown comp (#22776) 2025-07-22 15:30:22 +08:00
markdown-blocks [Chore/Refactor] Implement lazy initialization for useState calls to prevent re-computation (#26252) 2025-09-29 20:35:55 +09:00
mermaid [Chore/Refactor] Add missing 'type' attribute on 'button' components (#26249) 2025-09-28 13:43:43 +08:00
message-log-modal feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
modal fix: update modal component to use relative positioning (#23855) 2025-08-13 11:20:40 +08:00
modal-like-wrap Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
new-audio-button Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
notion-connector feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
notion-icon Feat: dataset dark mode (#17993) 2025-04-14 15:45:23 +08:00
notion-page-selector [Chore/Refactor] Implement lazy initialization for useState calls to prevent re-computation (#26252) 2025-09-29 20:35:55 +09:00
pagination [Chore/Refactor] Add missing 'type' attribute on 'button' components (#26249) 2025-09-28 13:43:43 +08:00
param-item feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
popover Fix/ serveral bugs fixed in enterprise (#21729) 2025-07-01 10:42:11 +08:00
portal-to-follow-elem refactor: simplify portal interactions and manage state in Configure component (#25906) 2025-09-18 15:57:33 +08:00
premium-badge lint: fix tailwind lint issues (#23367) 2025-08-08 09:25:41 +08:00
progress-bar feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
prompt-editor feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
prompt-log-modal Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
qrcode Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
radio feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
radio-card Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
search-input fix(search-input): ensure proper value extraction in composition end handler (#26147) 2025-09-24 15:53:59 +08:00
segmented-control feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
select [Chore/Refactor] Add missing 'type' attribute on 'button' components (#26249) 2025-09-28 13:43:43 +08:00
simple-pie-chart feat: parent child retrieval (#12106) 2024-12-26 12:01:51 +08:00
skeleton lint: fix tailwind lint issues (#23367) 2025-08-08 09:25:41 +08:00
slider feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
sort Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
spinner chore: add unit test to high frequency component (#17423) 2025-04-03 18:19:11 +08:00
svg Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
svg-gallery chore: refactor component exports for consistency (#26033) 2025-09-23 17:04:56 +08:00
switch lint: fix tailwind lint issues (#23367) 2025-08-08 09:25:41 +08:00
tab-header feat: last run frontend (#21369) 2025-06-24 09:10:30 +08:00
tab-slider [Chore/Refactor] Implement lazy initialization for useState calls to prevent re-computation (#26252) 2025-09-29 20:35:55 +09:00
tab-slider-new fix: resolve datasets container rounded corners disappearing during scroll (#23667) 2025-08-09 22:41:42 +08:00
tab-slider-plain Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
tag lint: fix tailwind lint issues (#23367) 2025-08-08 09:25:41 +08:00
tag-input feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
tag-management feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
text-generation Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
textarea feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
toast [Chore/Refactor] Add missing 'type' attribute on 'button' components (#26249) 2025-09-28 13:43:43 +08:00
tooltip Fix tooltip visibility issues during scroll in model selector popup (#24593) 2025-08-27 10:30:37 +08:00
video-gallery [Chore/Refactor] Add missing 'type' attribute on 'button' components (#26249) 2025-09-28 13:43:43 +08:00
voice-input Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
with-input-validation refactor & perf: `import { noop } from 'lodash-es'` across `web` (#17439) 2025-04-06 17:56:08 +08:00
zendesk chore: support Zendesk widget (#25517) 2025-09-11 13:17:50 +08:00
app-unavailable.tsx Fix/add webapp no permission page (#20819) 2025-06-09 15:44:49 +08:00
badge.tsx Chore: frontend infrastructure upgrade (#16420) 2025-03-21 17:41:03 +08:00
theme-selector.tsx [Chore/Refactor] Add missing 'type' attribute on 'button' components (#26249) 2025-09-28 13:43:43 +08:00
theme-switcher.tsx Feat: add theme switcher (#18093) 2025-05-14 09:06:14 +08:00